Old Command script:
static bool HandleTeleDelCommand(ChatHandler* handler, const char* args)
{
if (!*args)
return false;
std::string name = args;
if (!sObjectMgr->DeleteGameTele(name))
{
handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND);
handler->SetSentErrorMessage(true);
return false;
}
handler->SendSysMessage(LANG_COMMAND_TP_DELETED);
return true;
}
New Command script:
static bool HandleTeleDelCommand(ChatHandler* handler, const char* args)
{
if (!*args)
return false;
// id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r
GameTele const* tele = handler->extractGameTeleFromLink((char*)args);
if (!tele)
{
handler->SendSysMessage(LANG_COMMAND_TELE_NOTFOUND);
handler->SetSentErrorMessage(true);
return false;
}
std::string name = tele->name;
sObjectMgr->DeleteGameTele(name);
handler->SendSysMessage(LANG_COMMAND_TP_DELETED);
return true;
}
What this does:
This just adds the possibility of deleting a teleport location using its ID, Name.
The command script was just ignored, thats why no one ever made it this way lol.
Tested and working perfectly, all cases.
Poeple can now use .tele del NAME or .tele del ID
By the way, where do i go about requesting the adition of more enhancments to current trinitycode?
Aka, have my changes commited if they are valued good?