mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(Core/ChatHandler): Add SendErrorMessage helper (#17919)
* feat(Core/Chat): Add SendErrorMessage helper * lost boy
This commit is contained in:
@@ -163,15 +163,13 @@ public:
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_SELECT_CREATURE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->GetEntry() == 1)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage("%s%s|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -772,8 +770,7 @@ public:
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_SELECT_CREATURE);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -800,8 +797,7 @@ public:
|
||||
// Check if the user did specify a visual waypoint
|
||||
if (!target || target->GetEntry() != VISUAL_WAYPOINT)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_SELECT);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_WAYPOINT_VP_SELECT);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -848,8 +844,7 @@ public:
|
||||
|
||||
if (!result)
|
||||
{
|
||||
handler->SendSysMessage("|cffff33ffPath no found.|r");
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage("|cffff33ffPath no found.|r");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -958,8 +953,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUND, pathid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_WAYPOINT_NOTFOUND, pathid);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1008,8 +1002,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1056,8 +1049,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
handler->SendSysMessage(LANG_WAYPOINT_VP_NOTFOUND);
|
||||
handler->SetSentErrorMessage(true);
|
||||
handler->SendErrorMessage(LANG_WAYPOINT_VP_NOTFOUND);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user