コード例 #1
0
        private static bool CommandHasBuff(int skill, BattlePet.Skills.PetOwner petOwner)
        {
            var find = false;

            for (var i = 0; i <= 3; i++)
            {
                var count = BattlePet.Skills.GetNumAuras(petOwner, i);
                for (var j = 0; j <= count; j++)
                {
                    var info = BattlePet.Skills.GetAuraInfo(petOwner, i, j);

                    if (info.AuraId != skill)
                    {
                        continue;
                    }
                    Logging.WriteDebug(info.AuraId + " " + info.InstanceId + " " + info.IsBuff + " " + " " +
                                       info.TurnsRemaining);
                    //проверку на скорость
                    if (info.TurnsRemaining > 1 || info.TurnsRemaining == -1)
                    {
                        find = true;
                    }

                    if (info.TurnsRemaining == 1)
                    {
                        if (GoldenPet.ActiveSlotMe.SpeedMe() > GoldenPet.ActiveSlotEnemy.SpeedEnemy())
                        {
                            find = true;
                        }
                    }
                }
            }

            return(find);
        }
コード例 #2
0
 public static int SppedActivePet(this BattlePet.Skills.PetOwner owner)
 {
     return(BattlePet.Skills.GetSpeed(owner, GetActiveSlot(owner)));
 }
コード例 #3
0
 public static int GetActiveSlot(BattlePet.Skills.PetOwner owner)
 {
     return(BattlePet.Skills.GetPetActive(owner));
 }