Chat/Commands: Eradicate ChatHandler::extractOptFirstArg

Port From (https://github.com/TrinityCore/TrinityCore/commit/42be7836dfacd9e8d6b0c2b5d5f230ed6a55f088)
This commit is contained in:
hondacrx
2022-06-08 15:49:43 -04:00
parent f54dd5bba1
commit e6db88fa14
5 changed files with 65 additions and 109 deletions
-27
View File
@@ -322,33 +322,6 @@ namespace Game.Chat
return null;
}
public void ExtractOptFirstArg(StringArguments args, out string arg1, out string arg2)
{
string p1 = args.NextString();
string p2 = args.NextString();
if (string.IsNullOrEmpty(p2))
{
p2 = p1;
p1 = null;
}
arg1 = p1;
arg2 = p2;
}
public GameTele ExtractGameTeleFromLink(StringArguments args)
{
string cId = ExtractKeyFromLink(args, "Htele");
if (string.IsNullOrEmpty(cId))
return null;
if (uint.TryParse(cId, out uint id))
return Global.ObjectMgr.GetGameTele(id);
return Global.ObjectMgr.GetGameTele(cId);
}
public string ExtractQuotedArg(string str)
{
if (string.IsNullOrEmpty(str))