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:
@@ -5674,13 +5674,16 @@ namespace Game.Spells
|
||||
|
||||
Pet pet = playerCaster.GetPet();
|
||||
if (pet != null && pet.IsAlive())
|
||||
{
|
||||
return SpellCastResult.AlreadyHaveSummon;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
PetStable petStable = playerCaster.GetPetStable();
|
||||
var deadPetInfo = petStable.ActivePets.FirstOrDefault(petInfo => petInfo?.Health == 0);
|
||||
|
||||
if (deadPetInfo == null)
|
||||
return SpellCastResult.BadTargets;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user