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