• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • ConditionParser

    Discussion in 'Community Developer Forum' started by Psicu, Apr 4, 2015.

    1. Psicu

      Psicu New Member

      Joined:
      Feb 1, 2015
      Messages:
      20
      Likes Received:
      3
      Trophy Points:
      0
      Hey guys,

      What's the best way for me to create a ConditionParser? Should be something like this? Do I need to use XmlElement?

      Thank you

      Code:
      namespace ff14bot.NeoProfiles
      {
          public class GetCount : ConditionParser
          {
              public static int GetCount(uint a)
              {
                  if (MainFun.Counter.ContainsKey(a))
                  {
                      return MainFun.Counter[a];
                  }
                  return 0;
      
              }
          }
      }
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,335
      Likes Received:
      380
      Trophy Points:
      83
      Not even close.

      First ConditionParser is a static class and as such cannot be inherited.

      Second anything that is static can be accessed.

      ie:

      Code:
      namespace ff14bot.Managers
      {
      public static class myclass
      {
      public static int InterestingFunction(bool boringvariable)
      {
      return int.MaxValue;
      }
      }
      
      }
      
      
      Could be accessed just by doing Condition="myclass.InterestingFunction(false)"
       
    3. Psicu

      Psicu New Member

      Joined:
      Feb 1, 2015
      Messages:
      20
      Likes Received:
      3
      Trophy Points:
      0
      ohh ok, it worked ! Thank you very much
       

    Share This Page