mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
refactor(Core/World): Move SendGMText to ChatHandler and allow fmt (#19490)
* refactor(Core/World): Move SendGMText to WorldSession and allow `fmt` - Move SendGMText from World to WorldSession - Make SendGMText use fmt - Make SendGMText parse acore_string entries * Update cs_message.cpp * tokenize the string only once * Move to chathandler * Update WorldSession.cpp * make sure we have a session
This commit is contained in:
@@ -77,7 +77,7 @@ public:
|
||||
if (WorldSession* session = handler->GetSession())
|
||||
name = session->GetPlayer()->GetName();
|
||||
|
||||
sWorld->SendGMText(LANG_GM_ANNOUNCE_COLOR, name.c_str(), message.data());
|
||||
handler->SendGMText(LANG_GM_ANNOUNCE_COLOR, name, message.data());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -92,12 +92,12 @@ public:
|
||||
}
|
||||
|
||||
// announce to logged in GMs
|
||||
static bool HandleGMAnnounceCommand(ChatHandler* /*handler*/, Tail message)
|
||||
static bool HandleGMAnnounceCommand(ChatHandler* handler, Tail message)
|
||||
{
|
||||
if (message.empty())
|
||||
return false;
|
||||
|
||||
sWorld->SendGMText(LANG_GM_BROADCAST, message.data());
|
||||
handler->SendGMText(LANG_GM_BROADCAST, message.data());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user