aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-11-29 03:45:05 -0300
committerDoctorKraft <DoctorKraft@users.noreply.github.com>2018-03-11 16:42:43 +0100
commitce9d46b7d3b1763e57ad0c11731f0a9569df1b19 (patch)
tree1b52fc6ee487822a81b45b4793d1a1357a1c3e0d
parent1c46e7ca8414c7398f2e638bbcbadaceab53f327 (diff)
Core/Scripts: fix a failed assertion crash in Master's Call script
Closes #18316 Closes #18318 (cherry picked from commit 0f649d51e94794bbd3b54d9e83a2cc1fa09f4bbe)
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index ae5cfe1563a..5777d5f4fca 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -435,11 +435,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;