mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Scripts: fix a failed assertion crash in Master's Call script
Closes #18316 Closes #18318
This commit is contained in:
@@ -752,11 +752,11 @@ class spell_hun_masters_call : public SpellScriptLoader
|
||||
|
||||
SpellCastResult DoCheckCast()
|
||||
{
|
||||
Pet* pet = GetCaster()->ToPlayer()->GetPet();
|
||||
Guardian* pet = GetCaster()->ToPlayer()->GetGuardianPet();
|
||||
ASSERT(pet); // checked in Spell::CheckCast
|
||||
|
||||
if (!pet->IsAlive())
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
if (!pet->IsPet() || !pet->IsAlive())
|
||||
return SPELL_FAILED_NO_PET;
|
||||
|
||||
// Do a mini Spell::CheckCasterAuras on the pet, no other way of doing this
|
||||
SpellCastResult result = SPELL_CAST_OK;
|
||||
|
||||
Reference in New Issue
Block a user