Core/Commands: Update TeleDel command to support id, shift click, or name of teleport location.

This commit is contained in:
Abdollah Hasan
2012-06-18 04:54:50 +03:00
parent 53b561f550
commit 32d3e33f87
+5 -4
View File
@@ -97,15 +97,16 @@ public:
if (!*args)
return false;
std::string name = args;
if (!sObjectMgr->DeleteGameTele(name))
// 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;
}