aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 2ce3c72580e..66e44112b8a 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -441,9 +441,9 @@ public:
if (!spellId)
return;
- Unit* target = GetHitUnit();
- if (target->HasUnitState(UNIT_STATE_CASTING))
- target->CastSpell(target, spellId, true);
+ if (Player* target = GetHitPlayer())
+ if (target->HasUnitState(UNIT_STATE_CASTING))
+ target->CastSpell(target, spellId, true);
}
void Register()