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
+2 -2
View File
@@ -2366,8 +2366,8 @@ namespace Scripts.Spells.Generic
if (newPet.LoadPetFromDB(player, 0, player.GetLastPetNumber(), true))
{
// revive the pet if it is dead
if (newPet.GetDeathState() == DeathState.Dead)
newPet.SetDeathState(DeathState.Alive);
if (newPet.GetDeathState() != DeathState.Alive && newPet.GetDeathState() != DeathState.JustRespawned)
newPet.SetDeathState(DeathState.JustRespawned);
newPet.SetFullHealth();
newPet.SetFullPower(newPet.GetPowerType());