Core/Pets: Fixed automatic resurrecting pets on battleground graveyards

Port From (https://github.com/TrinityCore/TrinityCore/commit/914791836318c62d8b206ef3cbffe144e63bf928)
This commit is contained in:
hondacrx
2022-03-10 09:45:48 -05:00
parent 4a97585ee9
commit 9b2e317c44
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -109,7 +109,7 @@ namespace Game.Entities
return Tuple.Create(stable.StabledPets[stableSlot], PetSaveMode.FirstStableSlot + stableSlot);
foreach (var pet in stable.UnslottedPets)
if (pet.CreatureId == petEntry)
if (pet.PetNumber == petnumber)
return Tuple.Create(pet, PetSaveMode.NotInSlot);
}
else if (current)
@@ -280,6 +280,9 @@ namespace Game.Entities
petStable.CurrentPet = unslottedPetInfo;
petStable.UnslottedPets.Remove(unslottedPetInfo);
// old petInfo is no longer valid, refresh it
petInfo = petStable.CurrentPet;
}
// Send fake summon spell cast - this is needed for correct cooldown application for spells