Core/Spells: Don't report spell errors to client when spell was triggered and failed some internal condition

(cherry picked from commit a9b4375bb7)
This commit is contained in:
Shauren
2016-04-09 15:31:26 +02:00
parent d5d06cadf7
commit 417c19bdad

View File

@@ -4888,6 +4888,10 @@ SpellCastResult Spell::CheckCast(bool strict)
m_customError = SpellCustomErrors(condInfo.mLastFailedCondition->ErrorTextId);
return SpellCastResult(condInfo.mLastFailedCondition->ErrorType);
}
if (_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR)
return SPELL_FAILED_DONT_REPORT;
if (!condInfo.mLastFailedCondition || !condInfo.mLastFailedCondition->ConditionTarget)
return SPELL_FAILED_CASTER_AURASTATE;
return SPELL_FAILED_BAD_TARGETS;