mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Spells: send spell error messages on spell cast condition checks.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user