Core: Partial revert of rcb3188281e, rc85b35f076, r97f9a0fa3e due to missing loader implementation.
(files disabled but kept in repo, and will be fully reinstated once everything is sorted out) Note: SQL-update-data is NOT supplied for 're-converting' to old help-system - this is after all considered a workrepo untill we tag a commit as stable! --HG-- branch : trunk
This commit is contained in:
+28
-28
@@ -446,15 +446,15 @@ INSERT INTO `command` VALUES
|
||||
('kick',2,'Syntax: .kick [$charactername] [$reason]\r\n\r\nKick the given character name from the world with or without reason. If no character name is provided then the selected player (except for yourself) will be kicked. If no reason is provided, default is \"No Reason\".'),
|
||||
('learn',3,'Syntax: .learn #spell [all]\r\n\r\nSelected character learn a spell of id #spell. If ''all'' provided then all ranks learned.'),
|
||||
('learn all',3,'Syntax: .learn all\r\n\r\nLearn all big set different spell maybe useful for Administaror.'),
|
||||
('learn all crafts',2,'Syntax: .learn crafts\r\n\r\nLearn all professions and recipes.'),
|
||||
('learn all default',1,'Syntax: .learn all default [$playername]\r\n\r\nLearn for selected/$playername player all default spells for his race/class and spells rewarded by completed quests.'),
|
||||
('learn all gm',2,'Syntax: .learn all gm\r\n\r\nLearn all default spells for Game Masters.'),
|
||||
('learn all lang',1,'Syntax: .learn all lang\r\n\r\nLearn all languages'),
|
||||
('learn all my class',3,'Syntax: .learn all my class\r\n\r\nLearn all spells and talents available for his class.'),
|
||||
('learn all my pettalents',3,'Syntax: .learn all my pettalents\r\n\r\nLearn all talents for your pet available for his creature type (only for hunter pets).'),
|
||||
('learn all my spells',3,'Syntax: .learn all my spells\r\n\r\nLearn all spells (except talents and spells with first rank learned as talent) available for his class.'),
|
||||
('learn all my talents',3,'Syntax: .learn all my talents\r\n\r\nLearn all talents (and spells with first rank learned as talent) available for his class.'),
|
||||
('learn all recipes',2,'Syntax: .learn all recipes [$profession]\r\rLearns all recipes of specified profession and sets skill level to max.\rExample: .learn all recipes enchanting'),
|
||||
('learn all_crafts',2,'Syntax: .learn crafts\r\n\r\nLearn all professions and recipes.'),
|
||||
('learn all_default',1,'Syntax: .learn all_default [$playername]\r\n\r\nLearn for selected/$playername player all default spells for his race/class and spells rewarded by completed quests.'),
|
||||
('learn all_gm',2,'Syntax: .learn all_gm\r\n\r\nLearn all default spells for Game Masters.'),
|
||||
('learn all_lang',1,'Syntax: .learn all_lang\r\n\r\nLearn all languages'),
|
||||
('learn all_myclass',3,'Syntax: .learn all_myclass\r\n\r\nLearn all spells and talents available for his class.'),
|
||||
('learn all_mypettalents',3,'Syntax: .learn all_mypettalents\r\n\r\nLearn all talents for your pet available for his creature type (only for hunter pets).'),
|
||||
('learn all_myspells',3,'Syntax: .learn all_myspells\r\n\r\nLearn all spells (except talents and spells with first rank learned as talent) available for his class.'),
|
||||
('learn all_mytalents',3,'Syntax: .learn all_mytalents\r\n\r\nLearn all talents (and spells with first rank learned as talent) available for his class.'),
|
||||
('learn all_recipes',2,'Syntax: .learn all_recipes [$profession]\r\rLearns all recipes of specified profession and sets skill level to max.\rExample: .learn all_recipes enchanting'),
|
||||
('levelup',3,'Syntax: .levelup [$playername] [#numberoflevels]\r\n\r\nIncrease/decrease the level of character with $playername (or the selected if not name provided) by #numberoflevels Or +1 if no #numberoflevels provided). If #numberoflevels is omitted, the level will be increase by 1. If #numberoflevels is 0, the same level will be restarted. If no character is selected and name not provided, increase your level. Command can be used for offline character. All stats and dependent values recalculated. At level decrease talents can be reset if need. Also at level decrease equipped items with greater level requirement can be lost.'),
|
||||
('linkgrave',3,'Syntax: .linkgrave #graveyard_id [alliance|horde]\r\n\r\nLink current zone to graveyard for any (or alliance/horde faction ghosts). This let character ghost from zone teleport to graveyard after die if graveyard is nearest from linked to zone and accept ghost of this faction. Add only single graveyard at another map and only if no graveyards linked (or planned linked at same map).'),
|
||||
('list',3,'Syntax: .list $subcommand\nType .list to see the list of possible subcommands or .help list $subcommand to see info on subcommands'),
|
||||
@@ -515,31 +515,31 @@ INSERT INTO `command` VALUES
|
||||
('notify',1,'Syntax: .notify $MessageToBroadcast\r\n\r\nSend a global message to all players online in screen.'),
|
||||
('npc',1,'Syntax: .npc $subcommand\nType .npc to see the list of possible subcommands or .help npc $subcommand to see info on subcommands'),
|
||||
('npc add',2,'Syntax: .npc add #creatureid\r\n\r\nSpawn a creature by the given template id of #creatureid.'),
|
||||
('npc add formation',1,'Syntax: .npc add formation $leader\nAdd selected creature to a leader''s formation.'),
|
||||
('npc add item',2,'Syntax: .npc add item #itemId <#maxcount><#incrtime><#extendedcost>r\r\n\r\nAdd item #itemid to item list of selected vendor. Also optionally set max count item in vendor item list and time to item count restoring and items ExtendedCost.'),
|
||||
('npc add move',2,'Syntax: .npc add move #creature_guid [#waittime]\r\n\r\nAdd your current location as a waypoint for creature with guid #creature_guid. And optional add wait time.'),
|
||||
('npc set allowmove',3,'Syntax: .npc set allowmove\r\n\r\nEnable or disable movement creatures in world. Not implemented.'),
|
||||
('npc set entry',3,'Syntax: .npc set entry $entry\nSwitch selected creature with another entry from creature_template. - New creature.id value not saved to DB.'),
|
||||
('npc set level',2,'Syntax: .npc set level #level\r\n\r\nChange the level of the selected creature to #level.\r\n\r\n#level may range from 1 to (CONFIG_MAX_PLAYER_LEVEL) + 3.'),
|
||||
('npc addformation',1,'Syntax: .npc addformation $leader\nAdd selected creature to a leader''s formation.'),
|
||||
('npc additem',2,'Syntax: .npc additem #itemId <#maxcount><#incrtime><#extendedcost>r\r\n\r\nAdd item #itemid to item list of selected vendor. Also optionally set max count item in vendor item list and time to item count restoring and items ExtendedCost.'),
|
||||
('npc addmove',2,'Syntax: .npc addmove #creature_guid [#waittime]\r\n\r\nAdd your current location as a waypoint for creature with guid #creature_guid. And optional add wait time.'),
|
||||
('npc allowmove',3,'Syntax: .npc allowmove\r\n\r\nEnable or disable movement creatures in world. Not implemented.'),
|
||||
('npc changeentry',3,'Syntax: .npc changeentry $entry\nSwitch selected creature with another entry from creature_template. - New creature.id value not saved to DB.'),
|
||||
('npc changelevel',2,'Syntax: .npc changelevel #level\r\n\r\nChange the level of the selected creature to #level.\r\n\r\n#level may range from 1 to 63.'),
|
||||
('npc delete',2,'Syntax: .npc delete [#guid]\r\n\r\nDelete creature with guid #guid (or the selected if no guid is provided)'),
|
||||
('npc delete item',2,'Syntax: .npc delete item #itemId\r\n\r\nRemove item #itemid from item list of selected vendor.'),
|
||||
('npc set factionid',2,'Syntax: .npc set factionid #factionid\r\n\r\nSet the faction of the selected creature to #factionid.'),
|
||||
('npc set flag',2,'Syntax: .npc set flag #npcflag\r\n\r\nSet the NPC flags of creature template of the selected creature and selected creature to #npcflag. NPC flags will applied to all creatures of selected creature template after server restart or grid unload/load.'),
|
||||
('npc follow',2,'Syntax: .npc follow start\r\n\r\nSelected creature start follow you until death/fight/etc.'),
|
||||
('npc follow stop',2,'Syntax: .npc follow stop\r\n\r\nSelected creature (non pet) stop follow you.'),
|
||||
('npc delitem',2,'Syntax: .npc delitem #itemId\r\n\r\nRemove item #itemid from item list of selected vendor.'),
|
||||
('npc factionid',2,'Syntax: .npc factionid #factionid\r\n\r\nSet the faction of the selected creature to #factionid.'),
|
||||
('npc flag',2,'Syntax: .npc flag #npcflag\r\n\r\nSet the NPC flags of creature template of the selected creature and selected creature to #npcflag. NPC flags will applied to all creatures of selected creature template after server restart or grid unload/load.'),
|
||||
('npc follow',2,'Syntax: .npc follow\r\n\r\nSelected creature start follow you until death/fight/etc.'),
|
||||
('npc info',3,'Syntax: .npc info\r\n\r\nDisplay a list of details for the selected creature.\r\n\r\nThe list includes:\r\n- GUID, Faction, NPC flags, Entry ID, Model ID,\r\n- Level,\r\n- Health (current/maximum),\r\n\r\n- Field flags, dynamic flags, faction template, \r\n- Position information,\r\n- and the creature type, e.g. if the creature is a vendor.'),
|
||||
('npc move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'),
|
||||
('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'),
|
||||
('npc say',1,'Syntax: .npc say $message\nMake selected creature say specified message.'),
|
||||
('npc set deathstate',2,'Syntax: .npc set deathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'),
|
||||
('npc set link',2,'Syntax: .npc set link $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.'),
|
||||
('npc set model',2,'Syntax: .npc set model #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'),
|
||||
('npc set movetype',2,'Syntax: .npc set movetype [#creature_guid] stay/random/way [NODEL]\r\n\r\nSet for creature pointed by #creature_guid (or selected if #creature_guid not provided) movement type and move it to respawn position (if creature alive). Any existing waypoints for creature will be removed from the database if you do not use NODEL. If the creature is dead then movement type will applied at creature respawn.\r\nMake sure you use NODEL, if you want to keep the waypoints.'),
|
||||
('npc set phase',2,'Syntax: .npc set phase #phasemask\r\n\r\nSelected unit or pet phasemask changed to #phasemask with related world vision update for players. In creature case state saved to DB and persistent. In pet case change active until in game phase changed for owner, owner re-login, or GM-mode enable/disable..'),
|
||||
('npc set spawndist',2,'Syntax: .npc set spawndist #dist\r\n\r\nAdjust spawndistance of selected creature to dist.'),
|
||||
('npc set spawntime',2,'Syntax: .npc set spawntime #time \r\n\r\nAdjust spawntime of selected creature to time.'),
|
||||
('npc add temp',2,'Syntax: .npc add temp\r\n\r\nAdds temporary NPC, not saved to database.'),
|
||||
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'),
|
||||
('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.'),
|
||||
('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'),
|
||||
('npc setmovetype',2,'Syntax: .npc setmovetype [#creature_guid] stay/random/way [NODEL]\r\n\r\nSet for creature pointed by #creature_guid (or selected if #creature_guid not provided) movement type and move it to respawn position (if creature alive). Any existing waypoints for creature will be removed from the database if you do not use NODEL. If the creature is dead then movement type will applied at creature respawn.\r\nMake sure you use NODEL, if you want to keep the waypoints.'),
|
||||
('npc setphase',2,'Syntax: .npc setphase #phasemask\r\n\r\nSelected unit or pet phasemask changed to #phasemask with related world vision update for players. In creature case state saved to DB and persistent. In pet case change active until in game phase changed for owner, owner re-login, or GM-mode enable/disable..'),
|
||||
('npc spawndist',2,'Syntax: .npc spawndist #dist\r\n\r\nAdjust spawndistance of selected creature to dist.'),
|
||||
('npc spawntime',2,'Syntax: .npc spawntime #time \r\n\r\nAdjust spawntime of selected creature to time.'),
|
||||
('npc tempadd',2,'Adds temporary NPC, not saved to database.'),
|
||||
('npc textemote',1,'Syntax: .npc textemote #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'),
|
||||
('npc unfollow',2,'Syntax: .npc unfollow\r\n\r\nSelected creature (non pet) stop follow you.'),
|
||||
('npc whisper',1,'Syntax: .npc whisper #playerguid #text\r\nMake the selected npc whisper #text to #playerguid.'),
|
||||
('npc yell',1,'Syntax: .npc yell $message\nMake selected creature yell specified message.'),
|
||||
('pdump',3,'Syntax: .pdump $subcommand\nType .pdump to see the list of possible subcommands or .help pdump $subcommand to see info on subcommands'),
|
||||
|
||||
@@ -90,6 +90,27 @@ static size_t appendCommandTable(ChatCommand* target, const ChatCommand* source)
|
||||
|
||||
ChatCommand * ChatHandler::getCommandTable()
|
||||
{
|
||||
static ChatCommand accountSetCommandTable[] =
|
||||
{
|
||||
{ "addon", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleAccountSetAddonCommand>, "", NULL },
|
||||
{ "gmlevel", SEC_CONSOLE, true, OldHandler<&ChatHandler::HandleAccountSetGmLevelCommand>, "", NULL },
|
||||
{ "password", SEC_CONSOLE, true, OldHandler<&ChatHandler::HandleAccountSetPasswordCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand accountCommandTable[] =
|
||||
{
|
||||
{ "addon", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleAccountAddonCommand>, "", NULL },
|
||||
{ "create", SEC_CONSOLE, true, OldHandler<&ChatHandler::HandleAccountCreateCommand>, "", NULL },
|
||||
{ "delete", SEC_CONSOLE, true, OldHandler<&ChatHandler::HandleAccountDeleteCommand>, "", NULL },
|
||||
{ "onlinelist", SEC_CONSOLE, true, OldHandler<&ChatHandler::HandleAccountOnlineListCommand>, "", NULL },
|
||||
{ "lock", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleAccountLockCommand>, "", NULL },
|
||||
{ "set", SEC_ADMINISTRATOR, true, NULL, "", accountSetCommandTable },
|
||||
{ "password", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleAccountPasswordCommand>, "", NULL },
|
||||
{ "", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleAccountCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand banCommandTable[] =
|
||||
{
|
||||
{ "account", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleBanAccountCommand>, "", NULL },
|
||||
@@ -160,6 +181,59 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugPlayCommandTable[] =
|
||||
{
|
||||
{ "cinematic", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleDebugPlayCinematicCommand>, "", NULL },
|
||||
{ "movie", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleDebugPlayMovieCommand>, "", NULL },
|
||||
{ "sound", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleDebugPlaySoundCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugSendCommandTable[] =
|
||||
{
|
||||
{ "buyerror", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendBuyErrorCommand>, "", NULL },
|
||||
{ "channelnotify", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendChannelNotifyCommand>, "", NULL },
|
||||
{ "chatmmessage", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendChatMsgCommand>, "", NULL },
|
||||
{ "equiperror", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendEquipErrorCommand>, "", NULL },
|
||||
{ "largepacket", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendLargePacketCommand>, "", NULL },
|
||||
{ "opcode", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendOpcodeCommand>, "", NULL },
|
||||
{ "poi", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendPoiCommand>, "", NULL },
|
||||
{ "qpartymsg", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendQuestPartyMsgCommand>, "", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendQuestInvalidMsgCommand>, "", NULL },
|
||||
{ "sellerror", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendSellErrorCommand>, "", NULL },
|
||||
{ "setphaseshift", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendSetPhaseShiftCommand>, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSendSpellFailCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugCommandTable[] =
|
||||
{
|
||||
{ "setbit", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSet32Bit>, "", NULL },
|
||||
{ "threat", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugThreatList>, "", NULL },
|
||||
{ "hostil", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugHostileRefList>, "", NULL },
|
||||
{ "anim", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleDebugAnimCommand>, "", NULL },
|
||||
{ "arena", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugArenaCommand>, "", NULL },
|
||||
{ "bg", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugBattlegroundCommand>, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugGetItemStateCommand>, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleDebugGetLootRecipientCommand>, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugGetValueCommand>, "", NULL },
|
||||
{ "getitemvalue", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugGetItemValueCommand>, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugMod32ValueCommand>, "", NULL },
|
||||
{ "play", SEC_MODERATOR, false, NULL, "", debugPlayCommandTable },
|
||||
{ "send", SEC_ADMINISTRATOR, false, NULL, "", debugSendCommandTable },
|
||||
{ "setaurastate", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSetAuraStateCommand>, "", NULL },
|
||||
{ "setitemvalue", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSetItemValueCommand>, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSetValueCommand>, "", NULL },
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSpawnVehicle>, "", NULL },
|
||||
{ "setvid", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugSetVehicleId>, "", NULL },
|
||||
{ "entervehicle", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugEnterVehicle>, "", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugUpdateWorldStateCommand>, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugUpdateCommand>, "", NULL },
|
||||
{ "itemexpire", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugItemExpireCommand>, "", NULL },
|
||||
{ "areatriggers", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDebugAreaTriggers>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand eventCommandTable[] =
|
||||
{
|
||||
{ "activelist", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleEventActiveListCommand>, "", NULL },
|
||||
@@ -169,12 +243,39 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gmCommandTable[] =
|
||||
{
|
||||
{ "chat", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGMChatCommand>, "", NULL },
|
||||
{ "fly", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGMFlyCommand>, "", NULL },
|
||||
{ "ingame", SEC_PLAYER, true, OldHandler<&ChatHandler::HandleGMListIngameCommand>, "", NULL },
|
||||
{ "list", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleGMListFullCommand>, "", NULL },
|
||||
{ "visible", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGMVisibleCommand>, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGMCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand goCommandTable[] =
|
||||
{
|
||||
{ "creature", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoCreatureCommand>, "", NULL },
|
||||
{ "graveyard", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoGraveyardCommand>, "", NULL },
|
||||
{ "grid", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoGridCommand>, "", NULL },
|
||||
{ "object", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoObjectCommand>, "", NULL },
|
||||
{ "taxinode", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoTaxinodeCommand>, "", NULL },
|
||||
{ "trigger", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoTriggerCommand>, "", NULL },
|
||||
{ "zonexy", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoZoneXYCommand>, "", NULL },
|
||||
{ "xy", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoXYCommand>, "", NULL },
|
||||
{ "xyz", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoXYZCommand>, "", NULL },
|
||||
{ "ticket", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoTicketCommand>, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGoXYZCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gobjectCommandTable[] =
|
||||
{
|
||||
{ "activate", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleActivateObjectCommand>, "", NULL },
|
||||
{ "add", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectAddCommand>, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectDeleteCommand>, "", NULL },
|
||||
{ "info", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectInfoCommand>, "", NULL },
|
||||
{ "info", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGOInfoCommand>, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectMoveCommand>, "", NULL },
|
||||
{ "near", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectNearCommand>, "", NULL },
|
||||
{ "state", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGameObjectStateCommand>, "", NULL },
|
||||
@@ -220,6 +321,22 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand learnCommandTable[] =
|
||||
{
|
||||
{ "all", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnAllCommand>, "", NULL },
|
||||
{ "all_gm", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleLearnAllGMCommand>, "", NULL },
|
||||
{ "all_crafts", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleLearnAllCraftsCommand>, "", NULL },
|
||||
{ "all_default", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleLearnAllDefaultCommand>, "", NULL },
|
||||
{ "all_lang", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleLearnAllLangCommand>, "", NULL },
|
||||
{ "all_myclass", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnAllMyClassCommand>, "", NULL },
|
||||
{ "all_mypettalents",SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnAllMyPetTalentsCommand>,"", NULL },
|
||||
{ "all_myspells", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnAllMySpellsCommand>, "", NULL },
|
||||
{ "all_mytalents", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnAllMyTalentsCommand>, "", NULL },
|
||||
{ "all_recipes", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleLearnAllRecipesCommand>, "", NULL },
|
||||
{ "", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLearnCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand listCommandTable[] =
|
||||
{
|
||||
{ "creature", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleListCreatureCommand>, "", NULL },
|
||||
@@ -257,6 +374,77 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand modifyCommandTable[] =
|
||||
{
|
||||
{ "hp", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyHPCommand>, "", NULL },
|
||||
{ "mana", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyManaCommand>, "", NULL },
|
||||
{ "rage", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyRageCommand>, "", NULL },
|
||||
{ "runicpower", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyRunicPowerCommand>, "", NULL },
|
||||
{ "energy", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyEnergyCommand>, "", NULL },
|
||||
{ "money", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyMoneyCommand>, "", NULL },
|
||||
{ "speed", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifySpeedCommand>, "", NULL },
|
||||
{ "swim", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifySwimCommand>, "", NULL },
|
||||
{ "scale", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyScaleCommand>, "", NULL },
|
||||
{ "bit", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyBitCommand>, "", NULL },
|
||||
{ "bwalk", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyBWalkCommand>, "", NULL },
|
||||
{ "fly", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyFlyCommand>, "", NULL },
|
||||
{ "aspeed", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyASpeedCommand>, "", NULL },
|
||||
{ "faction", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyFactionCommand>, "", NULL },
|
||||
{ "spell", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifySpellCommand>, "", NULL },
|
||||
{ "tp", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyTalentCommand>, "", NULL },
|
||||
{ "mount", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyMountCommand>, "", NULL },
|
||||
{ "honor", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyHonorCommand>, "", NULL },
|
||||
{ "rep", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleModifyRepCommand>, "", NULL },
|
||||
{ "arena", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyArenaCommand>, "", NULL },
|
||||
{ "drunk", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleModifyDrunkCommand>, "", NULL },
|
||||
{ "standstate", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleModifyStandStateCommand>, "", NULL },
|
||||
{ "morph", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleModifyMorphCommand>, "", NULL },
|
||||
{ "phase", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleModifyPhaseCommand>, "", NULL },
|
||||
{ "gender", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleModifyGenderCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand npcCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcAddCommand>, "", NULL },
|
||||
{ "additem", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcAddVendorItemCommand>, "", NULL },
|
||||
{ "addmove", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcAddMoveCommand>, "", NULL },
|
||||
{ "allowmove", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNpcAllowMovementCommand>, "", NULL },
|
||||
{ "changeentry", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNpcChangeEntryCommand>, "", NULL },
|
||||
{ "changelevel", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcChangeLevelCommand>, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcDeleteCommand>, "", NULL },
|
||||
{ "delitem", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcDelVendorItemCommand>, "", NULL },
|
||||
{ "factionid", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcFactionIdCommand>, "", NULL },
|
||||
{ "flag", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcFlagCommand>, "", NULL },
|
||||
{ "follow", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcFollowCommand>, "", NULL },
|
||||
{ "info", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNpcInfoCommand>, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcMoveCommand>, "", NULL },
|
||||
{ "playemote", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNpcPlayEmoteCommand>, "", NULL },
|
||||
{ "setmodel", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSetModelCommand>, "", NULL },
|
||||
{ "setmovetype", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSetMoveTypeCommand>, "", NULL },
|
||||
{ "setphase", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSetPhaseCommand>, "", NULL },
|
||||
{ "spawndist", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSpawnDistCommand>, "", NULL },
|
||||
{ "spawntime", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSpawnTimeCommand>, "", NULL },
|
||||
{ "say", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleNpcSayCommand>, "", NULL },
|
||||
{ "textemote", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleNpcTextEmoteCommand>, "", NULL },
|
||||
{ "unfollow", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcUnFollowCommand>, "", NULL },
|
||||
{ "whisper", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleNpcWhisperCommand>, "", NULL },
|
||||
{ "yell", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleNpcYellCommand>, "", NULL },
|
||||
{ "tempadd", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleTempAddSpwCommand>, "", NULL },
|
||||
{ "tame", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcTameCommand>, "", NULL },
|
||||
{ "setdeathstate", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSetDeathStateCommand>, "", NULL },
|
||||
{ "addformation", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleNpcAddFormationCommand>, "", NULL },
|
||||
{ "setlink", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSetLinkCommand>, "", NULL },
|
||||
|
||||
//{ TODO: fix or remove this commands
|
||||
{ "addweapon", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNpcAddWeaponCommand>, "", NULL },
|
||||
{ "name", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcNameCommand>, "", NULL },
|
||||
{ "subname", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleNpcSubNameCommand>, "", NULL },
|
||||
//}
|
||||
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand petCommandTable[] =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleCreatePetCommand>, "", NULL },
|
||||
@@ -532,8 +720,22 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand achievementCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleAchievementAddCommand>, "", NULL},
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand commandTable[] =
|
||||
{
|
||||
{ "account", SEC_PLAYER, true, NULL, "", accountCommandTable },
|
||||
{ "achievement", SEC_ADMINISTRATOR, false, NULL, "", achievementCommandTable},
|
||||
{ "gm", SEC_MODERATOR, true, NULL, "", gmCommandTable },
|
||||
{ "npc", SEC_MODERATOR, false, NULL, "", npcCommandTable },
|
||||
{ "go", SEC_MODERATOR, false, NULL, "", goCommandTable },
|
||||
{ "learn", SEC_MODERATOR, false, NULL, "", learnCommandTable },
|
||||
{ "modify", SEC_MODERATOR, false, NULL, "", modifyCommandTable },
|
||||
{ "debug", SEC_MODERATOR, true, NULL, "", debugCommandTable },
|
||||
{ "tele", SEC_MODERATOR, true, NULL, "", teleCommandTable },
|
||||
{ "character", SEC_GAMEMASTER, true, NULL, "", characterCommandTable},
|
||||
{ "event", SEC_GAMEMASTER, false, NULL, "", eventCommandTable },
|
||||
|
||||
+151
-3
@@ -46,7 +46,6 @@ class ChatCommand
|
||||
class ChatHandler
|
||||
{
|
||||
public:
|
||||
WorldSession * GetSession() { return m_session; }
|
||||
explicit ChatHandler(WorldSession* session) : m_session(session) {}
|
||||
explicit ChatHandler(Player* player) : m_session(player->GetSession()) {}
|
||||
~ChatHandler() {}
|
||||
@@ -120,7 +119,6 @@ class ChatHandler
|
||||
|
||||
GameObject* GetNearbyGameObject();
|
||||
GameObject* GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid,uint32 entry);
|
||||
void SetSentErrorMessage(bool val){ sentErrorMessage = val;};
|
||||
|
||||
protected:
|
||||
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
|
||||
@@ -129,6 +127,17 @@ class ChatHandler
|
||||
bool ShowHelpForCommand(ChatCommand *table, const char* cmd);
|
||||
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd);
|
||||
|
||||
bool HandleAccountCommand(const char* args);
|
||||
bool HandleAccountAddonCommand(const char* args);
|
||||
bool HandleAccountCreateCommand(const char* args);
|
||||
bool HandleAccountDeleteCommand(const char* args);
|
||||
bool HandleAccountLockCommand(const char* args);
|
||||
bool HandleAccountOnlineListCommand(const char* args);
|
||||
bool HandleAccountPasswordCommand(const char* args);
|
||||
bool HandleAccountSetAddonCommand(const char* args);
|
||||
bool HandleAccountSetGmLevelCommand(const char* args);
|
||||
bool HandleAccountSetPasswordCommand(const char* args);
|
||||
|
||||
bool HandleNameAnnounceCommand(const char* args);
|
||||
bool HandleGMNameAnnounceCommand(const char* args);
|
||||
bool HandleGMAnnounceCommand(const char* args);
|
||||
@@ -166,11 +175,51 @@ class ChatHandler
|
||||
|
||||
bool HandleChannelSetPublic(const char *args);
|
||||
|
||||
bool HandleDebugAnimCommand(const char* args);
|
||||
bool HandleDebugArenaCommand(const char * args);
|
||||
bool HandleDebugBattlegroundCommand(const char * args);
|
||||
bool HandleDebugGetItemStateCommand(const char * args);
|
||||
bool HandleDebugGetLootRecipientCommand(const char * args);
|
||||
bool HandleDebugGetValueCommand(const char* args);
|
||||
bool HandleDebugGetItemValueCommand(const char* args);
|
||||
bool HandleDebugMod32ValueCommand(const char* args);
|
||||
bool HandleDebugSetAuraStateCommand(const char * args);
|
||||
bool HandleDebugSetItemValueCommand(const char * args);
|
||||
bool HandleDebugItemExpireCommand(const char * args);
|
||||
bool HandleDebugSetVehicleId(const char * args);
|
||||
bool HandleDebugEnterVehicle(const char * args);
|
||||
bool HandleDebugSetValueCommand(const char* args);
|
||||
bool HandleDebugSpawnVehicle(const char * args);
|
||||
bool HandleDebugSpellCheckCommand(const char* args);
|
||||
bool HandleDebugUpdateCommand(const char* args);
|
||||
bool HandleDebugUpdateWorldStateCommand(const char* args);
|
||||
bool HandleDebugAreaTriggers(const char* args);
|
||||
|
||||
bool HandleDebugSet32Bit(const char* args);
|
||||
bool HandleDebugThreatList(const char * args);
|
||||
bool HandleDebugHostileRefList(const char * args);
|
||||
bool HandlePossessCommand(const char* args);
|
||||
bool HandleUnPossessCommand(const char* args);
|
||||
bool HandleBindSightCommand(const char* args);
|
||||
bool HandleUnbindSightCommand(const char* args);
|
||||
|
||||
bool HandleDebugPlayCinematicCommand(const char* args);
|
||||
bool HandleDebugPlayMovieCommand(const char* args);
|
||||
bool HandleDebugPlaySoundCommand(const char* args);
|
||||
|
||||
bool HandleDebugSendBuyErrorCommand(const char* args);
|
||||
bool HandleDebugSendChannelNotifyCommand(const char* args);
|
||||
bool HandleDebugSendChatMsgCommand(const char* args);
|
||||
bool HandleDebugSendEquipErrorCommand(const char* args);
|
||||
bool HandleDebugSendLargePacketCommand(const char * args);
|
||||
bool HandleDebugSendOpcodeCommand(const char* args);
|
||||
bool HandleDebugSendPoiCommand(const char* args);
|
||||
bool HandleDebugSendQuestPartyMsgCommand(const char* args);
|
||||
bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
|
||||
bool HandleDebugSendSellErrorCommand(const char* args);
|
||||
bool HandleDebugSendSetPhaseShiftCommand(const char * args);
|
||||
bool HandleDebugSendSpellFailCommand(const char* args);
|
||||
|
||||
bool HandleEventActiveListCommand(const char* args);
|
||||
bool HandleEventStartCommand(const char* args);
|
||||
bool HandleEventStopCommand(const char* args);
|
||||
@@ -178,7 +227,7 @@ class ChatHandler
|
||||
|
||||
bool HandleGameObjectAddCommand(const char* args);
|
||||
bool HandleGameObjectDeleteCommand(const char* args);
|
||||
bool HandleGameObjectInfoCommand(const char* args);
|
||||
bool HandleGOInfoCommand(const char* args);
|
||||
bool HandleGameObjectMoveCommand(const char* args);
|
||||
bool HandleGameObjectNearCommand(const char* args);
|
||||
bool HandleGameObjectPhaseCommand(const char* args);
|
||||
@@ -186,6 +235,26 @@ class ChatHandler
|
||||
bool HandleGameObjectTargetCommand(const char* args);
|
||||
bool HandleGameObjectTurnCommand(const char* args);
|
||||
|
||||
bool HandleGMCommand(const char* args);
|
||||
bool HandleGMChatCommand(const char* args);
|
||||
bool HandleGMFlyCommand(const char* args);
|
||||
bool HandleGMListFullCommand(const char* args);
|
||||
bool HandleGMListIngameCommand(const char* args);
|
||||
bool HandleGMVisibleCommand(const char* args);
|
||||
|
||||
bool HandleGoCommand(const char* args);
|
||||
bool HandleGoCreatureCommand(const char* args);
|
||||
bool HandleGoGraveyardCommand(const char* args);
|
||||
bool HandleGoGridCommand(const char* args);
|
||||
bool HandleGoObjectCommand(const char* args);
|
||||
bool HandleGoTaxinodeCommand(const char* args);
|
||||
bool HandleGoTriggerCommand(const char* args);
|
||||
bool HandleGoXYCommand(const char* args);
|
||||
bool HandleGoXYZCommand(const char* args);
|
||||
bool HandleGoZoneXYCommand(const char* args);
|
||||
|
||||
bool HandleGoTicketCommand(const char* args);
|
||||
|
||||
bool HandleGuildCreateCommand(const char* args);
|
||||
bool HandleGuildInviteCommand(const char* args);
|
||||
bool HandleGuildUninviteCommand(const char* args);
|
||||
@@ -201,6 +270,18 @@ class ChatHandler
|
||||
bool HandleInstanceStatsCommand(const char* args);
|
||||
bool HandleInstanceSaveDataCommand(const char * args);
|
||||
|
||||
bool HandleLearnCommand(const char* args);
|
||||
bool HandleLearnAllCommand(const char* args);
|
||||
bool HandleLearnAllGMCommand(const char* args);
|
||||
bool HandleLearnAllCraftsCommand(const char* args);
|
||||
bool HandleLearnAllRecipesCommand(const char* args);
|
||||
bool HandleLearnAllDefaultCommand(const char* args);
|
||||
bool HandleLearnAllLangCommand(const char* args);
|
||||
bool HandleLearnAllMyClassCommand(const char* args);
|
||||
bool HandleLearnAllMyPetTalentsCommand(const char* args);
|
||||
bool HandleLearnAllMySpellsCommand(const char* args);
|
||||
bool HandleLearnAllMyTalentsCommand(const char* args);
|
||||
|
||||
bool HandleListAurasCommand(const char * args);
|
||||
bool HandleListCreatureCommand(const char* args);
|
||||
bool HandleListItemCommand(const char* args);
|
||||
@@ -224,6 +305,65 @@ class ChatHandler
|
||||
bool HandleLookupMapCommand(const char* args);
|
||||
bool HandleLookupTitleCommand(const char * args);
|
||||
|
||||
bool HandleModifyHPCommand(const char* args);
|
||||
bool HandleModifyManaCommand(const char* args);
|
||||
bool HandleModifyRageCommand(const char* args);
|
||||
bool HandleModifyRunicPowerCommand(const char* args);
|
||||
bool HandleModifyEnergyCommand(const char* args);
|
||||
bool HandleModifyMoneyCommand(const char* args);
|
||||
bool HandleModifyASpeedCommand(const char* args);
|
||||
bool HandleModifySpeedCommand(const char* args);
|
||||
bool HandleModifyBWalkCommand(const char* args);
|
||||
bool HandleModifyFlyCommand(const char* args);
|
||||
bool HandleModifySwimCommand(const char* args);
|
||||
bool HandleModifyScaleCommand(const char* args);
|
||||
bool HandleModifyMountCommand(const char* args);
|
||||
bool HandleModifyBitCommand(const char* args);
|
||||
bool HandleModifyFactionCommand(const char* args);
|
||||
bool HandleModifySpellCommand(const char* args);
|
||||
bool HandleModifyTalentCommand (const char* args);
|
||||
bool HandleModifyHonorCommand (const char* args);
|
||||
bool HandleModifyRepCommand(const char* args);
|
||||
bool HandleModifyArenaCommand(const char* args);
|
||||
bool HandleModifyPhaseCommand(const char* args);
|
||||
bool HandleModifyGenderCommand(const char* args);
|
||||
|
||||
//-----------------------Npc Commands-----------------------
|
||||
bool HandleNpcAddCommand(const char* args);
|
||||
bool HandleNpcAddMoveCommand(const char* args);
|
||||
bool HandleNpcAddVendorItemCommand(const char* args);
|
||||
bool HandleNpcAllowMovementCommand(const char* args);
|
||||
bool HandleNpcChangeEntryCommand(const char *args);
|
||||
bool HandleNpcChangeLevelCommand(const char* args);
|
||||
bool HandleNpcDeleteCommand(const char* args);
|
||||
bool HandleNpcDelVendorItemCommand(const char* args);
|
||||
bool HandleNpcFactionIdCommand(const char* args);
|
||||
bool HandleNpcFlagCommand(const char* args);
|
||||
bool HandleNpcFollowCommand(const char* args);
|
||||
bool HandleNpcInfoCommand(const char* args);
|
||||
bool HandleNpcMoveCommand(const char* args);
|
||||
bool HandleNpcPlayEmoteCommand(const char* args);
|
||||
bool HandleNpcSayCommand(const char* args);
|
||||
bool HandleNpcSetDeathStateCommand(const char* args);
|
||||
bool HandleNpcSetModelCommand(const char* args);
|
||||
bool HandleNpcSetMoveTypeCommand(const char* args);
|
||||
bool HandleNpcSetPhaseCommand(const char* args);
|
||||
bool HandleNpcSpawnDistCommand(const char* args);
|
||||
bool HandleNpcSpawnTimeCommand(const char* args);
|
||||
bool HandleNpcTameCommand(const char* args);
|
||||
bool HandleNpcTextEmoteCommand(const char* args);
|
||||
bool HandleNpcUnFollowCommand(const char* args);
|
||||
bool HandleNpcWhisperCommand(const char* args);
|
||||
bool HandleNpcYellCommand(const char* args);
|
||||
bool HandleNpcAddFormationCommand(const char* args);
|
||||
bool HandleNpcSetLinkCommand(const char* args);
|
||||
|
||||
//TODO: NpcCommands that needs to be fixed :
|
||||
bool HandleNpcAddWeaponCommand(const char* args);
|
||||
bool HandleNpcNameCommand(const char* args);
|
||||
bool HandleNpcSubNameCommand(const char* args);
|
||||
//----------------------------------------------------------
|
||||
|
||||
bool HandlePDumpLoadCommand(const char *args);
|
||||
bool HandlePDumpWriteCommand(const char *args);
|
||||
|
||||
@@ -405,6 +545,7 @@ class ChatHandler
|
||||
bool HandleGPSCommand(const char* args);
|
||||
bool HandleTaxiCheatCommand(const char* args);
|
||||
bool HandleWhispersCommand(const char* args);
|
||||
bool HandleModifyDrunkCommand(const char* args);
|
||||
|
||||
bool HandleGUIDCommand(const char* args);
|
||||
bool HandleItemMoveCommand(const char* args);
|
||||
@@ -420,9 +561,11 @@ class ChatHandler
|
||||
bool HandleCooldownCommand(const char* args);
|
||||
bool HandleUnLearnCommand(const char* args);
|
||||
bool HandleGetDistanceCommand(const char* args);
|
||||
bool HandleModifyStandStateCommand(const char* args);
|
||||
bool HandleDieCommand(const char* args);
|
||||
bool HandleDamageCommand(const char *args);
|
||||
bool HandleReviveCommand(const char* args);
|
||||
bool HandleModifyMorphCommand(const char* args);
|
||||
bool HandleAuraCommand(const char* args);
|
||||
bool HandleUnAuraCommand(const char* args);
|
||||
bool HandleLinkGraveCommand(const char* args);
|
||||
@@ -450,6 +593,9 @@ class ChatHandler
|
||||
bool HandleChangeWeather(const char* args);
|
||||
bool HandleKickPlayerCommand(const char * args);
|
||||
|
||||
// Achievement commands
|
||||
bool HandleAchievementAddCommand(const char* args);
|
||||
|
||||
// GM ticket command handlers
|
||||
bool HandleGMTicketListCommand(const char* args);
|
||||
bool HandleGMTicketListOnlineCommand(const char* args);
|
||||
@@ -483,6 +629,7 @@ class ChatHandler
|
||||
bool HandleRepairitemsCommand(const char* args);
|
||||
|
||||
bool HandleTempGameObjectCommand(const char* args);
|
||||
bool HandleTempAddSpwCommand(const char* args);
|
||||
|
||||
//! Development Commands
|
||||
|
||||
@@ -518,6 +665,7 @@ class ChatHandler
|
||||
void HandleCharacterDeletedListHelper(DeletedInfoList const& foundList);
|
||||
void HandleCharacterDeletedRestoreHelper(DeletedInfo const& delInfo);
|
||||
|
||||
void SetSentErrorMessage(bool val){ sentErrorMessage = val;};
|
||||
private:
|
||||
WorldSession * m_session; // != NULL for chat command call and NULL for CLI command
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,13 @@ bool ChatHandler::HandleCommandsCommand(const char* /*args*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAccountCommand(const char* /*args*/)
|
||||
{
|
||||
AccountTypes gmlevel = m_session->GetSecurity();
|
||||
PSendSysMessage(LANG_ACCOUNT_LEVEL, uint32(gmlevel));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleStartCommand(const char* /*args*/)
|
||||
{
|
||||
Player *chr = m_session->GetPlayer();
|
||||
@@ -144,6 +151,147 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
|
||||
{
|
||||
bool first = true;
|
||||
|
||||
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
|
||||
HashMapHolder<Player>::MapType &m = sObjectAccessor.GetPlayers();
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
|
||||
if ((itr->second->isGameMaster() || (itr_sec > SEC_PLAYER && itr_sec <= AccountTypes(sWorld.getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
|
||||
(!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer())))
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
SendSysMessage(LANG_GMS_ON_SRV);
|
||||
first = false;
|
||||
}
|
||||
|
||||
SendSysMessage(GetNameLink(itr->second).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (first)
|
||||
SendSysMessage(LANG_GMS_NOT_LOGGED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAccountPasswordCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
SendSysMessage(LANG_CMD_SYNTAX);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
char *old_pass = strtok((char*)args, " ");
|
||||
char *new_pass = strtok(NULL, " ");
|
||||
char *new_pass_c = strtok(NULL, " ");
|
||||
|
||||
if (!old_pass || !new_pass || !new_pass_c)
|
||||
{
|
||||
SendSysMessage(LANG_CMD_SYNTAX);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string password_old = old_pass;
|
||||
std::string password_new = new_pass;
|
||||
std::string password_new_c = new_pass_c;
|
||||
|
||||
if (!sAccountMgr.CheckPassword(m_session->GetAccountId(), password_old))
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(new_pass, new_pass_c) != 0)
|
||||
{
|
||||
SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
AccountOpResult result = sAccountMgr.ChangePassword(m_session->GetAccountId(), password_new);
|
||||
switch(result)
|
||||
{
|
||||
case AOR_OK:
|
||||
SendSysMessage(LANG_COMMAND_PASSWORD);
|
||||
break;
|
||||
case AOR_PASS_TOO_LONG:
|
||||
SendSysMessage(LANG_PASSWORD_TOO_LONG);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAccountAddonCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
SendSysMessage(LANG_CMD_SYNTAX);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
char *szExp = strtok((char*)args, " ");
|
||||
|
||||
uint32 account_id = m_session->GetAccountId();
|
||||
|
||||
int expansion = atoi(szExp); //get int anyway (0 if error)
|
||||
if (expansion < 0 || uint8(expansion) > sWorld.getIntConfig(CONFIG_EXPANSION))
|
||||
{
|
||||
SendSysMessage(LANG_IMPROPER_VALUE);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// No SQL injection
|
||||
LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id);
|
||||
PSendSysMessage(LANG_ACCOUNT_ADDON, expansion);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAccountLockCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string argstr = (char*)args;
|
||||
if (argstr == "on")
|
||||
{
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '1' WHERE id = '%d'",m_session->GetAccountId());
|
||||
PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argstr == "off")
|
||||
{
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '0' WHERE id = '%d'",m_session->GetAccountId());
|
||||
PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED);
|
||||
return true;
|
||||
}
|
||||
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Display the 'Message of the day' for the realm
|
||||
bool ChatHandler::HandleServerMotdCommand(const char* /*args*/)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -439,6 +439,48 @@ bool ChatHandler::HandleToggleGMTicketSystem(const char* /* args */)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGoTicketCommand(const char * args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char *cstrticket_id = strtok((char*)args, " ");
|
||||
|
||||
if (!cstrticket_id)
|
||||
return false;
|
||||
|
||||
uint64 ticket_id = atoi(cstrticket_id);
|
||||
if (!ticket_id)
|
||||
return false;
|
||||
|
||||
GM_Ticket *ticket = sTicketMgr.GetGMTicket(ticket_id);
|
||||
if (!ticket)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
|
||||
return true;
|
||||
}
|
||||
|
||||
float x, y, z;
|
||||
int mapid;
|
||||
|
||||
x = ticket->pos_x;
|
||||
y = ticket->pos_y;
|
||||
z = ticket->pos_z;
|
||||
mapid = ticket->map;
|
||||
|
||||
Player* _player = m_session->GetPlayer();
|
||||
if (_player->isInFlight())
|
||||
{
|
||||
_player->GetMotionMaster()->MovementExpired();
|
||||
_player->CleanupAfterTaxiFlight();
|
||||
}
|
||||
else
|
||||
_player->SaveRecallPosition();
|
||||
|
||||
_player->TeleportTo(mapid, x, y, z, 1, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGMTicketEscalateCommand(const char *args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
@@ -44,6 +44,7 @@ void AddSC_example_spell_scripts();
|
||||
|
||||
void AddSC_SmartSCripts();
|
||||
|
||||
/*
|
||||
//Commands
|
||||
void AddSC_account_commandscript();
|
||||
void AddSC_achievement_commandscript();
|
||||
@@ -53,6 +54,7 @@ void AddSC_go_commandscript();
|
||||
void AddSC_learn_commandscript();
|
||||
void AddSC_modify_commandscript();
|
||||
void AddSC_debug_commandscript();
|
||||
*/
|
||||
|
||||
#ifdef SCRIPTS
|
||||
//world
|
||||
@@ -579,7 +581,9 @@ void AddScripts()
|
||||
AddExampleScripts();
|
||||
AddSpellScripts();
|
||||
AddSC_SmartSCripts();
|
||||
/*
|
||||
AddCommandScripts();
|
||||
*/
|
||||
#ifdef SCRIPTS
|
||||
AddWorldScripts();
|
||||
AddEasternKingdomsScripts();
|
||||
@@ -619,6 +623,7 @@ void AddSpellScripts()
|
||||
AddSC_example_spell_scripts();
|
||||
}
|
||||
|
||||
/*
|
||||
void AddCommandScripts()
|
||||
{
|
||||
AddSC_account_commandscript();
|
||||
@@ -630,6 +635,7 @@ void AddCommandScripts()
|
||||
AddSC_modify_commandscript();
|
||||
AddSC_debug_commandscript();
|
||||
}
|
||||
*/
|
||||
|
||||
void AddWorldScripts()
|
||||
{
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
void AddScripts();
|
||||
void AddExampleScripts();
|
||||
void AddSpellScripts();
|
||||
/*
|
||||
void AddCommandScripts();
|
||||
*/
|
||||
void AddWorldScripts();
|
||||
void AddEasternKingdomsScripts();
|
||||
void AddKalimdorScripts();
|
||||
|
||||
@@ -25,7 +25,8 @@ endif()
|
||||
message(STATUS "SCRIPT PREPARATIONS")
|
||||
include(Spells/CMakeLists.txt)
|
||||
|
||||
include(Commands/CMakeLists.txt)
|
||||
# temporarily disabled
|
||||
# include(Commands/CMakeLists.txt)
|
||||
|
||||
include(Examples/CMakeLists.txt)
|
||||
|
||||
|
||||
@@ -117,6 +117,63 @@ void commandFinished(void*, bool /*success*/)
|
||||
printf("TC> ");
|
||||
fflush(stdout);
|
||||
}
|
||||
/// Delete a user account and all associated characters in this realm
|
||||
/// \todo This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm, delete account chars in realm then delete account
|
||||
bool ChatHandler::HandleAccountDeleteCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
///- Get the account name from the command line
|
||||
char *account_name_str=strtok ((char*)args," ");
|
||||
if (!account_name_str)
|
||||
return false;
|
||||
|
||||
std::string account_name = account_name_str;
|
||||
if (!AccountMgr::normalizeString(account_name))
|
||||
{
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 account_id = sAccountMgr.GetId(account_name);
|
||||
if (!account_id)
|
||||
{
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Commands not recommended call from chat, but support anyway
|
||||
/// can delete only for account with less security
|
||||
/// This is also reject self apply in fact
|
||||
if (HasLowerSecurityAccount (NULL,account_id,true))
|
||||
return false;
|
||||
|
||||
AccountOpResult result = sAccountMgr.DeleteAccount(account_id);
|
||||
switch(result)
|
||||
{
|
||||
case AOR_OK:
|
||||
PSendSysMessage(LANG_ACCOUNT_DELETED,account_name.c_str());
|
||||
break;
|
||||
case AOR_NAME_NOT_EXIST:
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_DB_INTERNAL_ERROR:
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_DELETED,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects all GUIDs (and related info) from deleted characters which are still in the database.
|
||||
*
|
||||
@@ -483,6 +540,95 @@ bool ChatHandler::HandleServerExitCommand(const char* /*args*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Display info on users currently in the realm
|
||||
bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
|
||||
{
|
||||
///- Get the list of accounts ID logged to the realm
|
||||
QueryResult resultDB = CharacterDatabase.Query("SELECT name,account,map,zone FROM characters WHERE online > 0");
|
||||
if (!resultDB)
|
||||
{
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_EMPTY);
|
||||
return true;
|
||||
}
|
||||
|
||||
///- Display the list of account/characters online
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR_HEADER);
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_HEADER);
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
|
||||
///- Circle through accounts
|
||||
do
|
||||
{
|
||||
Field *fieldsDB = resultDB->Fetch();
|
||||
std::string name = fieldsDB[0].GetString();
|
||||
uint32 account = fieldsDB[1].GetUInt32();
|
||||
|
||||
///- Get the username, last IP and GM level of each account
|
||||
// No SQL injection. account is uint32.
|
||||
QueryResult resultLogin =
|
||||
LoginDatabase.PQuery("SELECT a.username, a.last_ip, aa.gmlevel, a.expansion "
|
||||
"FROM account a "
|
||||
"LEFT JOIN account_access aa "
|
||||
"ON (a.id = aa.id) "
|
||||
"WHERE a.id = '%u'", account);
|
||||
if (resultLogin)
|
||||
{
|
||||
Field *fieldsLogin = resultLogin->Fetch();
|
||||
PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
||||
fieldsLogin[0].GetCString(),name.c_str(),fieldsLogin[1].GetCString(),fieldsDB[2].GetInt32(),fieldsDB[3].GetInt32(),fieldsLogin[3].GetUInt32(),fieldsLogin[2].GetUInt32());
|
||||
}
|
||||
else
|
||||
PSendSysMessage(LANG_ACCOUNT_LIST_ERROR,name.c_str());
|
||||
|
||||
}while (resultDB->NextRow());
|
||||
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Create an account
|
||||
bool ChatHandler::HandleAccountCreateCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
///- %Parse the command line arguments
|
||||
char *szAcc = strtok((char*)args, " ");
|
||||
char *szPassword = strtok(NULL, " ");
|
||||
if (!szAcc || !szPassword)
|
||||
return false;
|
||||
|
||||
// normalized in sAccountMgr.CreateAccount
|
||||
std::string account_name = szAcc;
|
||||
std::string password = szPassword;
|
||||
|
||||
AccountOpResult result = sAccountMgr.CreateAccount(account_name, password);
|
||||
switch(result)
|
||||
{
|
||||
case AOR_OK:
|
||||
PSendSysMessage(LANG_ACCOUNT_CREATED,account_name.c_str());
|
||||
break;
|
||||
case AOR_NAME_TOO_LONG:
|
||||
SendSysMessage(LANG_ACCOUNT_TOO_LONG);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_NAME_ALREDY_EXIST:
|
||||
SendSysMessage(LANG_ACCOUNT_ALREADY_EXIST);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_DB_INTERNAL_ERROR:
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_CREATED_SQL_ERROR,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_CREATED,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Set the level of logging
|
||||
bool ChatHandler::HandleServerSetLogFileLevelCommand(const char *args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user