mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user