Merge pull request #6008 from cookta2012/troy09

Core/Commands: Some porting and organizing

Moving a commands around eliminating a unnecessary file, and porting the "demorph" command
 * moved the "wpgps" command into the cs_debug.cpp because it seems more fitting
 * organized the "modify speed" commands into a table of their own
 * moved the "gps" command into the cs_misc.cpp
This commit is contained in:
Shocker
2012-04-23 17:21:42 -07:00
9 changed files with 141 additions and 174 deletions
-1
View File
@@ -359,7 +359,6 @@ ChatCommand* ChatHandler::getCommandTable()
{ "summon", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleSummonCommand>, "", NULL },
{ "groupsummon", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGroupSummonCommand>, "", NULL },
{ "commands", SEC_PLAYER, true, OldHandler<&ChatHandler::HandleCommandsCommand>, "", NULL },
{ "demorph", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleDeMorphCommand>, "", NULL },
{ "die", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDieCommand>, "", NULL },
{ "revive", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleReviveCommand>, "", NULL },
{ "dismount", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleDismountCommand>, "", NULL },
-16
View File
@@ -205,22 +205,6 @@ bool ChatHandler::HandleItemMoveCommand(const char* args)
return true;
}
//demorph player or unit
bool ChatHandler::HandleDeMorphCommand(const char* /*args*/)
{
Unit* target = getSelectedUnit();
if (!target)
target = m_session->GetPlayer();
// check online security
else if (target->GetTypeId() == TYPEID_PLAYER && HasLowerSecurity((Player*)target, 0))
return false;
target->DeMorph();
return true;
}
//kick player
bool ChatHandler::HandleKickPlayerCommand(const char *args)
{
@@ -61,7 +61,6 @@ void AddSC_reload_commandscript();
void AddSC_tele_commandscript();
void AddSC_titles_commandscript();
void AddSC_wp_commandscript();
void AddSC_gps_commandscript();
#ifdef SCRIPTS
//world
@@ -664,7 +663,6 @@ void AddCommandScripts()
AddSC_tele_commandscript();
AddSC_titles_commandscript();
AddSC_wp_commandscript();
AddSC_gps_commandscript();
}
void AddWorldScripts()