Core/Spells: Fixed Revive Pet not being usable if pet corpse is still in world

Port From (https://github.com/TrinityCore/TrinityCore/commit/6daf472e8131fdb9993a87483106af513e0ec398)
This commit is contained in:
Hondacrx
2025-08-19 21:38:12 -04:00
parent 0a77e07705
commit e25a3e5e5f
+9 -6
View File
@@ -5674,13 +5674,16 @@ namespace Game.Spells
Pet pet = playerCaster.GetPet();
if (pet != null && pet.IsAlive())
{
return SpellCastResult.AlreadyHaveSummon;
PetStable petStable = playerCaster.GetPetStable();
var deadPetInfo = petStable.ActivePets.FirstOrDefault(petInfo => petInfo?.Health == 0);
if (deadPetInfo == null)
return SpellCastResult.BadTargets;
}
else
{
PetStable petStable = playerCaster.GetPetStable();
var deadPetInfo = petStable.ActivePets.FirstOrDefault(petInfo => petInfo?.Health == 0);
if (deadPetInfo == null)
return SpellCastResult.BadTargets;
}
break;
}