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:
parent
fdd8ff6e04
commit
bb7765d91e
9 changed files with 53 additions and 35 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue