Exemple #1
0
        public static void updateEnemyActivePet()
        {
            List <string> l = Lua.GetReturnValues("local petIndex = C_PetBattles.GetActivePet(2) local speciesID = C_PetBattles.GetPetSpeciesID(2, petIndex) local level = C_PetBattles.GetLevel(2, petIndex) local xp, maxXP = C_PetBattles.GetXP(2, petIndex) local displayID = C_PetBattles.GetDisplayID(2, petIndex) local name = C_PetBattles.GetName(2, petIndex) local icon = C_PetBattles.GetIcon(2, petIndex) local petType = C_PetBattles.GetPetType(2, petIndex) local health = C_PetBattles.GetHealth(2, petIndex) local maxHealth = C_PetBattles.GetMaxHealth(2, petIndex) local power = C_PetBattles.GetPower(2, petIndex) local speed = C_PetBattles.GetSpeed(2, petIndex) local rarity = C_PetBattles.GetBreedQuality(2, petIndex) return speciesID, level, xp, maxXP, displayID, name, icon, petType, health, maxHealth, power, speed, rarity");

            _enemeyActivePet.updateActive(l[0],
                                          Convert.ToInt32(l[1]),
                                          Convert.ToInt32(l[2]),
                                          Convert.ToInt32(l[3]),
                                          Convert.ToInt32(l[4]),
                                          l[5],
                                          l[6],
                                          Convert.ToInt32(l[7]),
                                          Convert.ToInt32(l[8]),
                                          Convert.ToInt32(l[9]),
                                          Convert.ToInt32(l[10]),
                                          Convert.ToInt32(l[11]),
                                          Convert.ToInt32(l[12]),
                                          "");
            int owned = _petLua.NumberOwnedBySpecies(EnemyActivePet.SpeciesID);

            if (Reported != EnemyActivePet.PetID)
            {
                Logger.WriteDebug(EnemyActivePet.Name + " Number owned: " + owned);
                Reported = EnemyActivePet.PetID;
            }
        }