feat(Core/ChatHandler): Add SendErrorMessage helper (#17919)

* feat(Core/Chat): Add SendErrorMessage helper

* lost boy
This commit is contained in:
Kitzunu
2023-12-02 19:25:32 +01:00
committed by GitHub
parent 5bfeabde81
commit db4b0b0d3d
40 changed files with 503 additions and 946 deletions

View File

@@ -1172,8 +1172,7 @@ public:
if (!SpellMgr::IsSpellValid(spell))
{
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spell->Id);
handler->SetSentErrorMessage(true);
handler->SendErrorMessage(LANG_COMMAND_SPELL_BROKEN, spell->Id);
return false;
}
@@ -1650,8 +1649,7 @@ public:
{
if (!result)
{
handler->PSendSysMessage(LANG_NO_PLAYERS_FOUND);
handler->SetSentErrorMessage(true);
handler->SendErrorMessage(LANG_NO_PLAYERS_FOUND);
return false;
}
@@ -1710,8 +1708,7 @@ public:
if (!counter) // empty accounts only
{
handler->PSendSysMessage(LANG_NO_PLAYERS_FOUND);
handler->SetSentErrorMessage(true);
handler->SendErrorMessage(LANG_NO_PLAYERS_FOUND);
return false;
}