Core/Scripts: fix a crash in Master's Call script

This commit is contained in:
hondacrx
2018-03-11 14:52:46 -04:00
parent 39b2467cd0
commit 2e6f6e1fef
+3 -3
View File
@@ -240,9 +240,9 @@ namespace Scripts.Spells.Hunter
SpellCastResult DoCheckCast()
{
Pet pet = GetCaster().ToPlayer().GetPet();
if (pet == null || !pet.IsAlive())
return SpellCastResult.CantDoThatRightNow;
Guardian pet = GetCaster().ToPlayer().GetGuardianPet();
if (pet == null || !pet.IsPet() || !pet.IsAlive())
return SpellCastResult.NoPet;
// Do a mini Spell::CheckCasterAuras on the pet, no other way of doing this
SpellCastResult result = SpellCastResult.SpellCastOk;