/*
* Ascent MMORPG Server
* Copyright (C) 2005-2007 Ascent Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
#include "StdAfx.h"
createFileSingleton( ChatHandler );
initialiseSingleton(CommandTableStorage);
ChatCommand * ChatHandler::getCommandTable()
{
ASSERT(false);
return 0;
}
ChatCommand * CommandTableStorage::GetSubCommandTable(const char * name)
{
if(!strcmp(name, "modify"))
return _modifyCommandTable;
else if(!strcmp(name, "debug"))
return _debugCommandTable;
else if(!strcmp(name, "waypoint"))
return _waypointCommandTable;
else if(!strcmp(name, "gmTicket"))
return _GMTicketCommandTable;
else if(!strcmp(name, "gobject"))
return _GameObjectCommandTable;
else if(!strcmp(name, "battleground"))
return _BattlegroundCommandTable;
else if(!strcmp(name, "npc"))
return _NPCCommandTable;
else if(!strcmp(name, "cheat"))
return _CheatCommandTable;
else if(!strcmp(name, "pet"))
return _petCommandTable;
else if(!strcmp(name, "recall"))
return _recallCommandTable;
else if(!strcmp(name, "honor"))
return _honorCommandTable;
return 0;
}
#define dupe_command_table(ct, dt) this->dt = (ChatCommand*)allocate_and_copy(sizeof(ct)/* / sizeof(ct[0])*/, ct)
inline void* allocate_and_copy(uint32 len, void * pointer)
{
void * data = (void*)malloc(len);
memcpy(data, pointer, len);
return data;
}
void CommandTableStorage::Load()
{
QueryResult * result = WorldDatabase.Query("SELECT * FROM command_overrides");
if(!result) return;
do
{
const char * name = result->Fetch()[0].GetString();
const char * level = result->Fetch()[1].GetString();
Override(name, level);
} while(result->NextRow());
delete result;
}
void CommandTableStorage::Override(const char * command, const char * level)
{
ASSERT(level[0] != '\0');
char * cmd = strdup(command);
// find the command we're talking about
char * sp = strchr(cmd, ' ');
const char * command_name = cmd;
const char * subcommand_name = 0;
if(sp != 0)
{
// we're dealing with a subcommand.
*sp = 0;
subcommand_name = sp + 1;
}
int len1 = strlen(command_name);
int len2 = subcommand_name ? strlen(subcommand_name) : 0;
// look for the command.
ChatCommand * p = &_commandTable[0];
while(p->Name != 0)
{
if(!strnicmp(p->Name, command_name, len1))
{
// this is the one we wanna modify
if(!subcommand_name)
{
// no subcommand, we can change it.
p->CommandGroup = level[0];
printf("Changing command level of command `%s` to %c.\n", p->Name, level[0]);
}
else
{
// assume this is a subcommand, loop the second set.
ChatCommand * p2 = p->ChildCommands;
if(!p2)
{
printf("Invalid command specified for override: %s\n", command_name);
}
else
{
while(p2->Name != 0)
{
if(!strnicmp(p2->Name, subcommand_name, len2))
{
// change the level
p2->CommandGroup = level[0];
printf("Changing command level of command `%s`:`%s` to %c.\n", p->Name, p2->Name, level[0]);
break;
}
p2++;
}
if(p2->Name == 0)
{
printf("Invalid subcommand referenced: `%s` under `%s`.\n", subcommand_name, p->Name);
break;
}
}
}
break;
}
++p;
}
if(p->Name == 0)
{
printf("Invalid command referenced: `%s`\n", command_name);
}
free(cmd);
}
void CommandTableStorage::Dealloc()
{
free( _modifyCommandTable );
free( _debugCommandTable );
free( _waypointCommandTable );
free( _GMTicketCommandTable );
free( _GameObjectCommandTable );
free( _BattlegroundCommandTable );
free( _NPCCommandTable );
free( _CheatCommandTable );
free( _petCommandTable );
free( _recallCommandTable );
free( _honorCommandTable );
free( _commandTable );
}
void CommandTableStorage::Init()
{
static ChatCommand modifyCommandTable[] =
{
{ "hp", 'm', NULL, "Health Points/HP", NULL, UNIT_FIELD_HEALTH, UNIT_FIELD_MAXHEALTH, 1 },
{ "mana", 'm', NULL, "Mana Points/MP", NULL, UNIT_FIELD_POWER1, UNIT_FIELD_MAXPOWER1, 1 },
{ "rage", 'm', NULL, "Rage Points", NULL, UNIT_FIELD_POWER2, UNIT_FIELD_MAXPOWER2, 1 },
{ "energy", 'm', NULL, "Energy Points", NULL, UNIT_FIELD_POWER4, UNIT_FIELD_MAXPOWER4, 1 },
{ "level", 'm', &ChatHandler::HandleModifyLevelCommand,"Level", NULL, 0, 0, 0 },
{ "armor", 'm', NULL, "Armor", NULL, UNIT_FIELD_STAT1, 0, 1 },
{ "holy", 'm', NULL, "Holy Resistance", NULL, UNIT_FIELD_RESISTANCES_01, 0, 1 },
{ "fire", 'm', NULL, "Fire Resistance", NULL, UNIT_FIELD_RESISTANCES_02, 0, 1 },
{ "nature", 'm', NULL, "Nature Resistance", NULL, UNIT_FIELD_RESISTANCES_03, 0, 1 },
{ "frost", 'm', NULL, "Frost Resistance", NULL, UNIT_FIELD_RESISTANCES_04, 0, 1 },
{ "shadow", 'm', NULL, "Shadow Resistance", NULL, UNIT_FIELD_RESISTANCES_05, 0, 1 },
{ "arcane", 'm', NULL, "Arcane Resistance", NULL, UNIT_FIELD_RESISTANCES_06, 0, 1 },
{ "damage", 'm', NULL, "Unit Damage Min/Max", NULL, UNIT_FIELD_MINDAMAGE, UNIT_FIELD_MAXDAMAGE,2 },
{ "scale", 'm', NULL, "Size/Scale", NULL, OBJECT_FIELD_SCALE_X, 0, 2 },
{ "gold", 'm', &ChatHandler::HandleModifyGoldCommand, "Gold/Money/Copper", NULL, 0, 0, 0 },
{ "speed", 'm', &ChatHandler::HandleModifySpeedCommand, "Movement Speed", NULL, 0, 0, 0 },
{ "nativedisplayid", 'm', NULL, "Native Display ID", NULL, UNIT_FIELD_NATIVEDISPLAYID, 0, 1 },
{ "displayid" , 'm', NULL, "Display ID", NULL, UNIT_FIELD_DISPLAYID, 0, 1 },
{ "flags" , 'm', NULL, "Unit Flags", NULL, UNIT_FIELD_FLAGS, 0, 1 },
{ "faction", 'm', NULL, "Faction Template", NULL, UNIT_FIELD_FACTIONTEMPLATE, 0, 1 },
{ "dynamicflags",'m',NULL, "Dynamic Flags", NULL, UNIT_DYNAMIC_FLAGS, 0, 1 },
{ "talentpoints",'m',NULL, "Talent Points", NULL, PLAYER_CHARACTER_POINTS1, 0, 1 },
{ "loyalty", 'm', NULL, "Loyalty", NULL, UNIT_FIELD_POWER5, UNIT_FIELD_MAXPOWER5, 1 },
{ "spirit", 'm', NULL, "Spirit", NULL, UNIT_FIELD_STAT0, 0, 1 },
{ "boundingraidus",'m',NULL, "Bounding Radius", NULL, UNIT_FIELD_BOUNDINGRADIUS, 0, 2 },
{ "combatreach",'m',NULL, "Combat Reach", NULL, UNIT_FIELD_COMBATREACH, 0, 2 },
{ "emotestate",'m', NULL, "NPC Emote State", NULL, UNIT_NPC_EMOTESTATE, 0, 1 },
{ NULL, 0, NULL, "", NULL, 0, 0 }
};
dupe_command_table(modifyCommandTable, _modifyCommandTable);
static ChatCommand debugCommandTable[] =
{
{ "infront", 'd', &ChatHandler::HandleDebugInFrontCommand, "", NULL, 0, 0, 0},
{ "showreact", 'd', &ChatHandler::HandleShowReactionCommand, "", NULL, 0, 0, 0},
{ "aimove", 'd', &ChatHandler::HandleAIMoveCommand, "", NULL, 0, 0, 0},
{ "dist", 'd', &ChatHandler::HandleDistanceCommand, "", NULL, 0, 0, 0},
{ "face", 'd', &ChatHandler::HandleFaceCommand, "", NULL, 0, 0, 0},
{ "moveinfo", 'd', &ChatHandler::HandleMoveInfoCommand, "", NULL, 0, 0, 0},
{ "setbytes", 'd', &ChatHandler::HandleSetBytesCommand, "", NULL, 0, 0, 0},
{ "getbytes", 'd', &ChatHandler::HandleGetBytesCommand, "", NULL, 0, 0, 0},
{ "unroot", 'd', &ChatHandler::HandleDebugUnroot, "", NULL, 0, 0, 0},
{ "root", 'd', &ChatHandler::HandleDebugRoot, "", NULL, 0, 0, 0},
{ "landwalk", 'd', &ChatHandler::HandleDebugLandWalk, "", NULL, 0, 0, 0},
{ "waterwalk", 'd', &ChatHandler::HandleDebugWaterWalk, "", NULL, 0, 0, 0},
{ "castspell", 'd', &ChatHandler::HandleCastSpellCommand, ".castspell - Casts spell on target.", NULL, 0, 0, 0 },
{ "castspellne", 'd', &ChatHandler::HandleCastSpellNECommand, ".castspellne - Casts spell on target (only plays animations, doesnt handle effects or range/facing/etc.", NULL, 0, 0, 0 },
{ "celldelete", 'd', &ChatHandler::HandleCellDeleteCommand, "!USE WITH CAUTION! '.celldelete YES' - Removes everything in current cell from game and database. '.celldelete YES YES' removes everything in a range of 1cell.", NULL, 0, 0, 0},
{ "addrestxp", 'd', &ChatHandler::HandleAddRestXPCommand, ".addrestxp - Adds x rest XP to player.", NULL, 0, 0, 0 },
{ "generatename",'d', &ChatHandler::HandleGenerateNameCommand, ".generatename - Generates name for pet, etc.", NULL, 0, 0, 0 },
{ "attackerinfo",'d', &ChatHandler::HandleAttackerInfoCommand, ".attackerinfo - Shows selected mob/player's attacker's infomation.", NULL, 0, 0, 0 },
{ "showattackers",'d',&ChatHandler::HandleShowAttackersCommand, ".showattackers - Shows selected mob/player's attacker on the minimap.", NULL, 0, 0, 0 },
{ "aggrorange", 'd', &ChatHandler::HandleAggroRangeCommand, ".aggrorange - Shows aggro Range of the selected Creature.", NULL, 0, 0, 0 },
{ "knockback ", 'd', &ChatHandler::HandleKnockBackCommand, ".knockback - Knocks you back.", NULL, 0, 0, 0 },
{ "fade ", 'd', &ChatHandler::HandleFadeCommand, ".fade - calls ModThreatModifyer().", NULL, 0, 0, 0 },
{ "threatMod ", 'd', &ChatHandler::HandleThreatModCommand, ".threatMod - calls ModGeneratedThreatModifyer().", NULL, 0, 0, 0 },
{ "calcThreat ", 'd', &ChatHandler::HandleCalcThreatCommand, ".calcThreat - calculates threat.", NULL, 0, 0, 0 },
{ "threatList ", 'd', &ChatHandler::HandleThreatListCommand, ".threatList - returns all AI_Targets of the selected Creature.", NULL, 0, 0, 0 },
{ "gettptime", 'd', &ChatHandler::HandleGetTransporterTime, "grabs transporter travel time",NULL, 0, 0, 0 },
{ "itempushresult",'d',&ChatHandler::HandleSendItemPushResult, "sends item push result", NULL, 0, 0, 0 },
{ "weather", 'd', &ChatHandler::HandleWeatherCommand, "", NULL, 0, 0, 0},
{ "setbit", 'd', &ChatHandler::HandleModifyBitCommand, "", NULL, 0, 0, 0},
{ "setvalue", 'd', &ChatHandler::HandleModifyValueCommand, "", NULL, 0, 0, 0},
{ "aispelltestbegin", 'd', &ChatHandler::HandleAIAgentDebugBegin, "", NULL, 0, 0, 0 },
{ "aispelltestcontinue", 'd', &ChatHandler::HandleAIAgentDebugContinue, "", NULL, 0, 0, 0 },
{ "aispelltestskip", 'd', &ChatHandler::HandleAIAgentDebugSkip, "", NULL, 0, 0, 0 },
{ "dumpcoords", 'd', &ChatHandler::HandleDebugDumpCoordsCommmand, "", NULL, 0, 0, 0 },
{ "speedchange", 'd', &ChatHandler::HandleSendRunSpeedChange, "", NULL, 0, 0, 0 },
{ NULL, 0, NULL, "", NULL, 0, 0 }
};
dupe_command_table(debugCommandTable, _debugCommandTable);
static ChatCommand waypointCommandTable[] =
{
{ "add", 'w', &ChatHandler::HandleWPAddCommand, "Add wp at current pos", NULL, 0, 0, 0},
{ "show", 'w', &ChatHandler::HandleWPShowCommand, "Show wp's for creature", NULL, 0, 0, 0},
{ "hide", 'w', &ChatHandler::HandleWPHideCommand, "Hide wp's for creature", NULL, 0, 0, 0},
{ "delete", 'w', &ChatHandler::HandleWPDeleteCommand, "Delete selected wp", NULL, 0, 0, 0},
{ "movehere", 'w', &ChatHandler::HandleWPMoveHereCommand, "Move to this wp", NULL, 0, 0, 0},
{ "flags", 'w', &ChatHandler::HandleWPFlagsCommand, "Wp flags", NULL, 0, 0, 0},
{ "waittime", 'w', &ChatHandler::HandleWPWaitCommand, "Wait time at this wp", NULL, 0, 0, 0},
{ "emote", 'w', &ChatHandler::HandleWPEmoteCommand, "Emote at this wp", NULL, 0, 0, 0},
{ "skin", 'w', &ChatHandler::HandleWPSkinCommand, "Skin at this wp", NULL, 0, 0, 0},
{ "change", 'w', &ChatHandler::HandleWPChangeNoCommand, "Change at this wp", NULL, 0, 0, 0},
{ "info", 'w', &ChatHandler::HandleWPInfoCommand, "Show info for wp", NULL, 0, 0, 0},
{ "movetype", 'w', &ChatHandler::HandleWPMoveTypeCommand, "Movement type at wp", NULL, 0, 0, 0},
{ "generate", 'w', &ChatHandler::HandleGenerateWaypoints, "Randomly generate wps", NULL, 0, 0, 0},
{ "save", 'w', &ChatHandler::HandleSaveWaypoints, "Save all waypoints", NULL, 0, 0, 0},
{ "deleteall", 'w', &ChatHandler::HandleDeleteWaypoints, "Delete all waypoints", NULL, 0, 0, 0},
{ NULL, 0, NULL, "", NULL, 0, 0 }
};
dupe_command_table(waypointCommandTable, _waypointCommandTable);
static ChatCommand GMTicketCommandTable[] =
{
{ "get", 'g', &ChatHandler::HandleGMTicketGetAllCommand, "Gets GM Ticket", NULL, 0, 0, 0},
{ "getId", 'g', &ChatHandler::HandleGMTicketGetByIdCommand, "Gets GM Ticket by ID", NULL, 0, 0, 0},
{ "delId", 'g', &ChatHandler::HandleGMTicketDelByIdCommand, "Deletes GM Ticket by ID", NULL, 0, 0, 0},
{ NULL, 2, NULL, "", NULL, 0, 0 }
};
dupe_command_table(GMTicketCommandTable, _GMTicketCommandTable);
static ChatCommand GameObjectCommandTable[] =
{
{ "select", 'o', &ChatHandler::HandleGOSelect, "Selects the nearest GameObject to you", NULL, 0, 0, 0},
{ "delete", 'o', &ChatHandler::HandleGODelete, "Deletes selected GameObject", NULL, 0, 0, 0},
{ "spawn", 'o', &ChatHandler::HandleGOSpawn, "Spawns a GameObject by ID", NULL, 0, 0, 0},
{ "info", 'o', &ChatHandler::HandleGOInfo, "Gives you informations about selected GO", NULL, 0, 0, 0},
{ "activate", 'o', &ChatHandler::HandleGOActivate, "Activates/Opens the selected GO.", NULL, 0, 0, 0},
{ "enable", 'o', &ChatHandler::HandleGOEnable, "Enables the selected GO for use.", NULL, 0, 0, 0},
{ "scale", 'o', &ChatHandler::HandleGOScale, "Sets scale of selected GO", NULL, 0, 0, 0},
{ "animprogress",'o', &ChatHandler::HandleGOAnimProgress, "Sets anim progress", NULL, 0, 0, 0 },
{ "export", 'o', &ChatHandler::HandleGOExport, "Exports the current GO selected", NULL, 0, 0, 0 },
{ "statelink", 'o', &ChatHandler::HandleGoStateLinkCommand, ".statelink sqlentry, Links a GO state to a Npc", NULL, 0, 0, 0},
{ "move", 'g', &ChatHandler::HandleGOMove, "Moves gameobject to player xyz", NULL, 0, 0, 0 },
{ "rotate", 'g', &ChatHandler::HandleGORotate, "Rotates gameobject x degrees", NULL, 0, 0, 0 },
{ NULL, 2, NULL, "", NULL, 0, 0 }
};
dupe_command_table(GameObjectCommandTable, _GameObjectCommandTable);
static ChatCommand BattlegroundCommandTable[] =
{
{ "setbgscore", 'e', &ChatHandler::HandleSetBGScoreCommand, " - Sets battleground score. 2 Arguments. ", NULL, 0, 0, 0},
{ "startbg", 'e', &ChatHandler::HandleStartBGCommand, "Starts current battleground match.", NULL, 0, 0, 0},
{ "pausebg", 'e', &ChatHandler::HandlePauseBGCommand, "Pauses current battleground match.", NULL, 0, 0, 0},
{ "bginfo", 'e', &ChatHandler::HandleBGInfoCommnad, "Displays information about current battleground.", NULL, 0, 0, 0},
{ "battleground",'e', &ChatHandler::HandleBattlegroundCommand, "Shows BG Menu", NULL, 0, 0, 0 },
{ "setworldstate",'e',&ChatHandler::HandleSetWorldStateCommand, " - Var can be in hex. WS Value.", NULL, 0, 0, 0 },
{ "playsound", 'e', &ChatHandler::HandlePlaySoundCommand, ". Val can be in hex.", NULL, 0, 0, 0 },
{ "setbfstatus", 'e', &ChatHandler::HandleSetBattlefieldStatusCommand,".setbfstatus - NYI.", NULL, 0, 0, 0 },
{ "leave", 'e', &ChatHandler::HandleBattlegroundExitCommand, "Leaves the current battleground.", NULL, 0, 0, 0 },
{ NULL, 2, NULL, "", NULL, 0, 0 }
};
dupe_command_table(BattlegroundCommandTable, _BattlegroundCommandTable);
static ChatCommand NPCCommandTable[] =
{
{ "vendoradditem", 'n', &ChatHandler::HandleItemCommand, "Adds to vendor", NULL, 0, 0, 0},
{ "vendorremoveitem",'n', &ChatHandler::HandleItemRemoveCommand,"Removes from vendor.", NULL, 0, 0, 0},
{ "flags", 'n', &ChatHandler::HandleNPCFlagCommand, "Changes NPC flags", NULL, 0, 0, 0},
{ "emote", 'n', &ChatHandler::HandleEmoteCommand, ".emote - Sets emote state", NULL, 0, 0, 0 },
{ "run", 'n', &ChatHandler::HandleRunCommand, "", NULL, 0, 0, 0},
{ "addweapon", 'n', &ChatHandler::HandleAddWeaponCommand, "", NULL, 0, 0, 0},
{ "allowmove", 'n', &ChatHandler::HandleAllowMovementCommand, "", NULL, 0, 0, 0},
{ "addspirit", 'n', &ChatHandler::HandleAddSpiritCommand, "", NULL, 0, 0, 0},
{ "faction", 'n', &ChatHandler::HandleNPCFactionCommand, "", NULL, 0, 0, 0},
{ "delete", 'n', &ChatHandler::HandleDeleteCommand, "Deletes mob from db and world.", NULL, 0, 0, 0},
{ "info", 'n', &ChatHandler::HandleNpcInfoCommand, "Displays NPC information", NULL, 0, 0, 0},
{ "guid", 'n', &ChatHandler::HandleGUIDCommand, "Shows selected object guid", NULL, 0, 0, 0},
{ "addAgent", 'n', &ChatHandler::HandleAddAIAgentCommand, ".npc addAgent ",NULL, 0, 0, 0},
{ "delAgent", 'n', &ChatHandler::HandleDelAIAgentCommand, ".npc delAgent ",NULL, 0, 0, 0},
{ "listAgent", 'n', &ChatHandler::HandleListAIAgentCommand, ".npc listAgent",NULL, 0, 0, 0},
{ "reset", 'n', &ChatHandler::HandleResetHPCommand, "resets npc health/dmg from temp table.", NULL, 0, 0, 0},
{ "export", 'n', &ChatHandler::HandleNpcExport, "Exports the npc to a sql file", NULL, 0, 0, 0},
{ "say", 'n', &ChatHandler::HandleMonsterSayCommand, ".npc say - Makes selected mob say text .", NULL, 0, 0, 0 },
{ "yell", 'n', &ChatHandler::HandleMonsterYellCommand, ".npc yell - Makes selected mob yell text .", NULL, 0, 0, 0},
{ "come", 'n', &ChatHandler::HandleNpcComeCommand, ".npc come - Makes npc move to your position", NULL, 0, 0, 0 },
{ "return", 'n', &ChatHandler::HandleNpcReturnCommand, ".npc return - Returns ncp to spawnpoint.", NULL, 0, 0, 0 },
{ "spawn", 'n', &ChatHandler::HandleCreatureSpawnCommand, ".npc spawn - Spawns npc of entry ", NULL, 0, 0, 0 },
{ "spawnlink", 'n', &ChatHandler::HandleNpcSpawnLinkCommand, ".spawnlink sqlentry", NULL, 0, 0, 0 },
{ "possess", 'n', &ChatHandler::HandleNpcPossessCommand, ".npc possess - Possess an npc (mind control)", NULL, 0, 0, 0 },
{ "unpossess", 'n', &ChatHandler::HandleNpcUnPossessCommand, ".npc unpossess - Unposses any currently possessed npc.", NULL, 0, 0, 0 },
{ NULL, 2, NULL, "", NULL, 0, 0 }
};
dupe_command_table(NPCCommandTable, _NPCCommandTable);
static ChatCommand CheatCommandTable[] =
{
{ "status", 'm', &ChatHandler::HandleShowCheatsCommand, "Shows active cheats.", NULL, 0, 0, 0 },
{ "taxi", 'm', &ChatHandler::HandleTaxiCheatCommand, "Enables all taxi nodes.", NULL, 0, 0, 0},
{ "cooldown", 'm', &ChatHandler::HandleCooldownCheatCommand, "Enables no cooldown cheat.", NULL, 0, 0, 0 },
{ "casttime", 'm', &ChatHandler::HandleCastTimeCheatCommand, "Enables no cast time cheat.", NULL, 0, 0, 0 },
{ "power", 'm', &ChatHandler::HandlePowerCheatCommand, "Disables mana consumption etc.", NULL, 0, 0, 0 },
{ "god", 'm', &ChatHandler::HandleGodModeCommand, "Sets god mode, prevents you from taking damage.", NULL, 0, 0, 0 },
{ "fly", 'm', &ChatHandler::HandleFlyCommand, "Sets fly mode", NULL, 0, 0, 0 },
{ "land", 'm', &ChatHandler::HandleLandCommand, "Unsets fly mode", NULL, 0, 0, 0 },
{ "explore", 'm', &ChatHandler::HandleExploreCheatCommand, "Reveals the unexplored parts of the map.", NULL, 0, 0, 0 },
{ "flyspeed", 'm', &ChatHandler::HandleFlySpeedCheatCommand, "Modifies fly speed.", NULL, 0, 0, 0 },
{ "stack", 'm', &ChatHandler::HandleStackCheatCommand, "Enables aura stacking cheat.", NULL, 0, 0, 0 },
{ NULL, 0, NULL, "", NULL, 0, 0, 0 },
};
dupe_command_table(CheatCommandTable, _CheatCommandTable);
static ChatCommand honorCommandTable[] =
{
{ "getpvprank", 'm', &ChatHandler::HandleGetRankCommand, "Gets PVP Rank", NULL, 0, 0, 0},
{ "setpvprank", 'm', &ChatHandler::HandleSetRankCommand, "Sets PVP Rank", NULL, 0, 0, 0},
{ "addpoints", 'm', &ChatHandler::HandleAddHonorCommand, "Adds x amount of honor points/currency",NULL,0,0,0},
{ "addkills", 'm', &ChatHandler::HandleAddKillCommand, "Adds x amount of honor kills", NULL, 0, 0, 0 },
{ "globaldailyupdate", 'm', &ChatHandler::HandleGlobalHonorDailyMaintenanceCommand, "Daily honor field moves", NULL, 0, 0, 0},
{ "singledailyupdate", 'm', &ChatHandler::HandleNextDayCommand, "Daily honor field moves for selected player only", NULL,0,0,0},
{ "pvpcredit", 'm', &ChatHandler::HandlePVPCreditCommand, "Sends PVP credit packet, with specified rank and points", NULL,0,0,0},
{ NULL,0,NULL,"",NULL,0,0,0},
};
dupe_command_table(honorCommandTable, _honorCommandTable);
static ChatCommand petCommandTable[] =
{
{ "createpet",'m',&ChatHandler::HandleCreatePetCommand, "Creates a pet with .", NULL, 0, 0, 0 },
{ "renamepet",'m',&ChatHandler::HandleRenamePetCommand, "Renames a pet to .", NULL, 0, 0, 0 },
{ "enablerename",'m',&ChatHandler::HandleEnableRenameCommand, "Enables pet rename.", NULL, 0, 0, 0 },
{ "addspell",'m',&ChatHandler::HandleAddPetSpellCommand, "Teaches pet .", NULL, 0, 0, 0 },
{ "removespell",'m',&ChatHandler::HandleRemovePetSpellCommand, "Removes pet spell .", NULL, 0, 0, 0 },
{ NULL,0,NULL,"",NULL,0,0,0},
};
dupe_command_table(petCommandTable, _petCommandTable);
static ChatCommand recallCommandTable[] =
{
{ "list", 'q', &ChatHandler::HandleRecallListCommand, "List recall locations", NULL, 0, 0, 0},
{ "port", 'q', &ChatHandler::HandleRecallGoCommand, "Port to recalled location", NULL, 0, 0, 0},
{ "add", 'q', &ChatHandler::HandleRecallAddCommand, "Add recall location", NULL, 0, 0, 0},
{ "del", 'q', &ChatHandler::HandleRecallDelCommand, "Remove a recall location", NULL, 0, 0, 0},
{ "portplayer", 'm', &ChatHandler::HandleRecallPortPlayerCommand, "recall ports player", NULL, 0, 0, 0 },
{ NULL, 0, NULL, "", NULL, 0, 0, 0},
};
dupe_command_table(recallCommandTable, _recallCommandTable);
static ChatCommand commandTable[] = {
{ "renameguild", 'a', &ChatHandler::HandleRenameGuildCommand, "Renames a guild.", NULL, 0, 0, 0 },
{ "addguard", 'a', &ChatHandler::HandleAddGuardCommand, "Adds a guardentry to the zonetables DB and reloads.", NULL, 0, 0, 0},
{ "masssummon", 'z', &ChatHandler::HandleMassSummonCommand, ".masssummon - Summons all players.", NULL, 0, 0, 0},
{ "commands", 1, &ChatHandler::HandleCommandsCommand, "Shows Commands", NULL, 0, 0, 0},
{ "help", 1, &ChatHandler::HandleHelpCommand, "Shows help for command", NULL, 0, 0, 0},
{ "announce", 'u', &ChatHandler::HandleAnnounceCommand, "Sends Msg To All", NULL, 0, 0, 0},
{ "wannounce", 'u', &ChatHandler::HandleWAnnounceCommand, "Sends Widescreen Msg To All", NULL, 0, 0, 0},
{ "appear", 'v', &ChatHandler::HandleAppearCommand, "Teleports to x's position.", NULL, 0, 0, 0},
{ "summon", 'v', &ChatHandler::HandleSummonCommand, "Summons x to your position", NULL, 0, 0, 0},
{ "banchar", 'b', &ChatHandler::HandleBanCharacterCommand, "Bans character x with or without reason", NULL, 0, 0, 0},
{ "unbanchar", 'b', &ChatHandler::HandleUnBanCharacterCommand,"Unbans character x", NULL, 0, 0, 0},
{ "kick", 'b', &ChatHandler::HandleKickCommand, "Kicks player from server", NULL, 0, 0, 0},
{ "kill", 'r', &ChatHandler::HandleKillCommand, ".kill - Kills selected unit.", NULL, 0, 0, 0},
{ "revive", 'r', &ChatHandler::HandleReviveCommand, "Revives you.", NULL, 0, 0, 0},
{ "reviveplr", 'r', &ChatHandler::HandleReviveStringcommand, "Revives player specified.", NULL, 0, 0, 0},
{ "morph", 'm', &ChatHandler::HandleMorphCommand, "Morphs into model id x.", NULL, 0, 0, 0},
{ "demorph", 'm', &ChatHandler::HandleDeMorphCommand, "Demorphs from morphed model.", NULL, 0, 0, 0},
{ "mount", 'm', &ChatHandler::HandleMountCommand, "Mounts into modelid x.", NULL, 0, 0, 0},
{ "dismount", 1, &ChatHandler::HandleDismountCommand, "Dismounts.", NULL, 0, 0, 0},
{ "gm", 'p', &ChatHandler::HandleGMListCommand, "Shows active GM's", NULL, 0, 0, 0},
{ "gmoff", 't', &ChatHandler::HandleGMOffCommand, "Sets GM tag off", NULL, 0, 0, 0},
{ "gmon", 't', &ChatHandler::HandleGMOnCommand, "Sets GM tag on", NULL, 0, 0, 0},
{ "gps", 'p', &ChatHandler::HandleGPSCommand, "Shows Position", NULL, 0, 0, 0},
{ "info", 'p', &ChatHandler::HandleInfoCommand, "Server info", NULL, 0, 0, 0},
{ "worldport", 'v', &ChatHandler::HandleWorldPortCommand, "", NULL, 0, 0, 0},
{ "save", 's', &ChatHandler::HandleSaveCommand, "Save's your character", NULL, 0, 0, 0},
{ "saveall", 's', &ChatHandler::HandleSaveAllCommand, "Save's all playing characters", NULL, 0, 0, 0},
{ "security", 'z', &ChatHandler::HandleSecurityCommand, "", NULL, 0, 0, 0},
{ "start", 'm', &ChatHandler::HandleStartCommand, "Teleport's you to a starting location", NULL, 0, 0, 0},
{ "levelup", 'm', &ChatHandler::HandleLevelUpCommand, "", NULL, 0, 0, 0},
{ "additem", 'm', &ChatHandler::HandleAddInvItemCommand, "", NULL, 0, 0, 0},
{ "removeitem", 'm', &ChatHandler::HandleRemoveItemCommand, "Removes item %u count %u.", NULL, 0, 0, 0 },
{ "createguild", 'l', &ChatHandler::CreateGuildCommand, "", NULL, 0, 0, 0},
{ "invincible", 'j', &ChatHandler::HandleInvincibleCommand, ".invincible - Toggles INVINCIBILITY (mobs won't attack you)", NULL, 0, 0, 0},
{ "invisible", 'i', &ChatHandler::HandleInvisibleCommand, ".invisible - Toggles INVINCIBILITY and INVISIBILITY (mobs won't attack you and nobody can see you, but they can see your chat messages)", NULL, 0, 0, 0},
{ "resetreputation", 'n',&ChatHandler::HandleResetReputationCommand, ".resetreputation - Resets reputation to start levels. (use on characters that were made before reputation fixes.)", NULL, 0, 0, 0},
{ "resetlevel", 'n', &ChatHandler::HandleResetLevelCommand, ".resetlevel - Resets all stats to level 1 of targeted player. DANGEROUS.", NULL, 0, 0, 0 },
{ "resetspells", 'n', &ChatHandler::HandleResetSpellsCommand, ".resetspells - Resets all spells to starting spells of targeted player. DANGEROUS.", NULL, 0, 0, 0 },
{ "resettalents",'n', &ChatHandler::HandleResetTalentsCommand, ".resettalents - Resets all talents of targeted player to that of their current level. DANGEROUS.", NULL, 0, 0, 0 },
{ "resetskills", 'n', &ChatHandler::HandleResetSkillsCommand , ".resetskills - Resets all skills.", NULL, 0, 0, 0 },
{ "learn", 'm', &ChatHandler::HandleLearnCommand, "Learns spell", NULL, 0, 0, 0},
{ "unlearn", 'm', &ChatHandler::HandleUnlearnCommand, "Unlearns spell", NULL, 0, 0, 0},
{ "learnskill", 'm', &ChatHandler::HandleLearnSkillCommand, ".learnskill (optional) - Learns skill id skillid.", NULL, 0, 0, 0},
{ "advanceskill",'m', &ChatHandler::HandleModifySkillCommand, "advanceskill - Advances skill line x times..", NULL, 0, 0, 0},
{ "removeskill", 'm', &ChatHandler::HandleRemoveSkillCommand, ".removeskill - Removes skill", NULL, 0, 0, 0 },
{ "increaseweaponskill", 'm', &ChatHandler::HandleIncreaseWeaponSkill, ".increaseweaponskill - Increase eqipped weapon skill x times (defaults to 1).", NULL, 0, 0, 0},
{ "createaccount",'z',&ChatHandler::HandleCreateAccountCommand, ".createaccount - Creates account. Format should be .createaccount username password email", NULL, 0, 0, 0 },
{ "playerinfo", 'm', &ChatHandler::HandlePlayerInfo, ".playerinfo - Displays informations about the selected character (account...)", NULL, 0, 0, 0 },
{ "uptime", 1, &ChatHandler::HandleUptimeCommand, "Shows server uptime", NULL, 0, 0, 0},
{ "modify", 'm', NULL, "", modifyCommandTable, 0, 0, 0},
{ "waypoint", 'w', NULL, "", waypointCommandTable, 0, 0, 0},
{ "debug", 'd', NULL, "", debugCommandTable, 0, 0, 0},
{ "gmTicket", 'g', NULL, "", GMTicketCommandTable, 0, 0, 0},
{ "gobject", 'o', NULL, "", GameObjectCommandTable, 0, 0, 0},
{ "battleground", 'e', NULL, "", BattlegroundCommandTable, 0, 0, 0},
{ "npc" , 'n', NULL, "", NPCCommandTable, 0, 0, 0},
{ "cheat" , 'm', NULL, "", CheatCommandTable, 0, 0, 0},
{ "honor" , 'm', NULL, "", honorCommandTable, 0, 0, 0},
{ "pet", 'm', NULL, "", petCommandTable, 0, 0, 0},
{ "recall", 'q', NULL, "", recallCommandTable, 0, 0, 0},
{ "getpos" , 'd', &ChatHandler::HandleGetPosCommand, "", NULL, 0, 0, 0},
{ "removeauras", 'm', &ChatHandler::HandleRemoveAurasCommand, "Removes all auras from target", NULL, 0, 0, 0},
{ "paralyze", 'b', &ChatHandler::HandleParalyzeCommand, "Roots/Paralyzes the target.", NULL, 0, 0, 0 },
{ "unparalyze", 'b', &ChatHandler::HandleUnParalyzeCommand, "Unroots/Unparalyzes the target.",NULL, 0, 0, 0 },
{ "setmotd", 'm', &ChatHandler::HandleSetMotdCommand, "Sets MOTD", NULL, 0, 0, 0 },
{ "additemset", 'm', &ChatHandler::HandleAddItemSetCommand, "Adds item set to inv.", NULL, 0, 0, 0 },
{ "gotrig", 'v', &ChatHandler::HandleTriggerCommand, "Warps to areatrigger ", NULL, 0, 0, 0 },
{ "createinstance",'m', &ChatHandler::HandleCreateInstanceCommand,"Creates instance on map