diff options
author | QAston <qaston@gmail.com> | 2012-02-25 11:52:28 +0100 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2012-02-25 11:54:12 +0100 |
commit | b7b37dca298682a44cd1d0c635e0bf40476eefb6 (patch) | |
tree | 5802a58fe3a433c8704f9a8b1450f4fd15c81e16 /src | |
parent | 1f373c0f3749e2c62ccdc3d19f2a753773e147c3 (diff) |
Core/Spells: send spell error messages on spell cast condition checks.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index db36eb30191..b8d3c5318aa 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4785,11 +4785,16 @@ SpellCastResult Spell::CheckCast(bool strict) // TODO: using WorldSession::SendNotification is not blizzlike if (Player* playerCaster = m_caster->ToPlayer()) { - if (playerCaster->GetSession() && condInfo.mLastFailedCondition + if (playerCaster->GetSession() && condInfo.mLastFailedCondition->ErrorTextId) + { playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextId); + return SPELL_FAILED_DONT_REPORT; + } } - return SPELL_FAILED_DONT_REPORT; + if (!condInfo.mLastFailedCondition->ConditionTarget) + return SPELL_FAILED_CASTER_AURASTATE; + return SPELL_FAILED_BAD_TARGETS; } } |