示例#1
0
        //Honorbuddy API version
        private static bool IsNumberPlayerHasInferiorOrEqualTo(GarrMissionReward reward, int x)
        {
            uint numCarried = 0;

            if (reward.IsItemReward())
            {
                numCarried = (uint)HbApi.GetNumberItemCarried((uint)reward.GarrisonButlerRewardId());
            }
            else if (reward.IsCurrencyReward())
            {
                var currencyInfo = WoWCurrency.GetCurrencyByType(reward.CurrencyType);
                if (currencyInfo == null)
                    numCarried = 0;
                else
                    numCarried = currencyInfo.Amount;
            }
            else if (reward.IsGold())
            {
                numCarried = (uint)StyxWoW.Me.Gold;
            }
            return numCarried != 0 && numCarried <= x;
        }
示例#2
0
 //Honorbuddy API version
 private static IEnumerable<object> GetNumberPlayerHasInferiorOrEqualTo(GarrMissionReward reward)
 {
     var numCarried = Enumerable.Empty<object>();
     if (reward.IsItemReward())
     {
         numCarried = HbApi.GetItemCarried((uint)reward.GarrisonButlerRewardId());
     }
     else if (reward.IsCurrencyReward())
     {
         var currency = WoWCurrency.GetCurrencyByType(reward.CurrencyType);
         numCarried = new List<WoWCurrency>();
         if (currency != null)
             ((List<WoWCurrency>)numCarried).Add(currency);
     }
     else if (reward.IsGold())
     {
         var gold = (int)StyxWoW.Me.Gold;
         numCarried = new List<object>();
         ((List<object>)numCarried).Add((object)gold);
     }
     return numCarried;
 }
示例#3
0
        //Honorbuddy API version
        private static bool IsNumberPlayerHasSuperiorTo(GarrMissionReward reward, int x)
        {
            uint numCarried = 0;

            if (reward.IsItemReward())
            {
                numCarried = (uint)HbApi.GetNumberItemCarried((uint)reward.GarrMissionId);
            }
            else if (reward.IsCurrencyReward())
            {
                var currencyInfo = WoWCurrency.GetCurrencyByType(reward.CurrencyType);
                if (currencyInfo == null)
                    numCarried = 0;
                else
                    numCarried = currencyInfo.Amount;
            }
            else if (reward.IsGold())
            {
                numCarried = (uint)StyxWoW.Me.Gold;
            }
            //else if (reward.IsFollowerXP)
            //{
            //    numCarried = x;
            //}
            return numCarried > x;
        }