mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Chat/Commands: Eradicate ChatHandler::extractOptFirstArg
(cherry picked from commit 4f636b80e4)
This commit is contained in:
@@ -797,21 +797,6 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text)
|
||||
return 0;
|
||||
}
|
||||
|
||||
GameTele const* ChatHandler::extractGameTeleFromLink(char* text)
|
||||
{
|
||||
// id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r
|
||||
char* cId = extractKeyFromLink(text, "Htele");
|
||||
if (!cId)
|
||||
return nullptr;
|
||||
|
||||
// id case (explicit or from shift link)
|
||||
if (cId[0] >= '0' && cId[0] <= '9')
|
||||
if (uint32 id = atoi(cId))
|
||||
return sObjectMgr->GetGameTele(id);
|
||||
|
||||
return sObjectMgr->GetGameTele(cId);
|
||||
}
|
||||
|
||||
enum GuidLinkType
|
||||
{
|
||||
GUID_LINK_PLAYER = 0, // must be first for selection in not link case
|
||||
@@ -941,24 +926,6 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, ObjectGuid* p
|
||||
return true;
|
||||
}
|
||||
|
||||
void ChatHandler::extractOptFirstArg(char* args, char** arg1, char** arg2)
|
||||
{
|
||||
char* p1 = strtok(args, " ");
|
||||
char* p2 = strtok(nullptr, " ");
|
||||
|
||||
if (!p2)
|
||||
{
|
||||
p2 = p1;
|
||||
p1 = nullptr;
|
||||
}
|
||||
|
||||
if (arg1)
|
||||
*arg1 = p1;
|
||||
|
||||
if (arg2)
|
||||
*arg2 = p2;
|
||||
}
|
||||
|
||||
char* ChatHandler::extractQuotedArg(char* args)
|
||||
{
|
||||
if (!args || !*args)
|
||||
|
||||
Reference in New Issue
Block a user