mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7615] Continue sorting chat command function declarations. Move send commands in new .send * subcommand list.
This commit is contained in:
parent
a7df922a7e
commit
678be86d67
6 changed files with 117 additions and 90 deletions
|
|
@ -22,7 +22,7 @@
|
|||
DROP TABLE IF EXISTS `db_version`;
|
||||
CREATE TABLE `db_version` (
|
||||
`version` varchar(120) default NULL,
|
||||
`required_7568_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
`required_7615_01_mangos_command` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -443,8 +443,8 @@ INSERT INTO `command` VALUES
|
|||
('saveall',1,'Syntax: .saveall\r\n\r\nSave all characters in game.'),
|
||||
('send items',3,'Syntax: .send items #playername "#subject" "#text" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]\r\n\r\nSend a mail to a player. Subject and mail text must be in "". If for itemid not provided related count values then expected 1, if count > max items in stack then items will be send in required amount stacks. All stacks amount in mail limited to 12.'),
|
||||
('send mail',1,'Syntax: .send mail #playername "#subject" "#text"\r\n\r\nSend a mail to a player. Subject and mail text must be in "".'),
|
||||
('sendmoney','3','Syntax: .sendmoney #playername "#subject" "#text" #money\r\n\r\nSend mail with money to a player. Subject and mail text must be in "".'),
|
||||
('send message',3,'Syntax: .send message $playername $message\r\n\r\nSend screen message to player from ADMINISTRATOR.'),
|
||||
('send money','3','Syntax: .send money #playername "#subject" "#text" #money\r\n\r\nSend mail with money to a player. Subject and mail text must be in "".'),
|
||||
('server corpses',2,'Syntax: .server corpses\r\n\r\nTriggering corpses expire check in world.'),
|
||||
('server exit',4,'Syntax: .server exit\r\n\r\nTerminate mangosd NOW. Exit code 0.'),
|
||||
('server info',0,'Syntax: .server info\r\n\r\nDisplay server version and the number of connected players.'),
|
||||
|
|
|
|||
9
sql/updates/7615_01_mangos_command.sql
Normal file
9
sql/updates/7615_01_mangos_command.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_7568_01_mangos_spell_proc_event required_7615_01_mangos_command bit;
|
||||
|
||||
DELETE FROM `command` WHERE `name` IN ('senditems','sendmail','sendmoney','sendmessage','send items','send mail','send money','send message');
|
||||
|
||||
INSERT INTO `command` VALUES
|
||||
('send items',3,'Syntax: .send items #playername "#subject" "#text" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]\r\n\r\nSend a mail to a player. Subject and mail text must be in "". If for itemid not provided related count values then expected 1, if count > max items in stack then items will be send in required amount stacks. All stacks amount in mail limited to 12.'),
|
||||
('send mail',1,'Syntax: .send mail #playername "#subject" "#text"\r\n\r\nSend a mail to a player. Subject and mail text must be in "".'),
|
||||
('send message',3,'Syntax: .send message $playername $message\r\n\r\nSend screen message to player from ADMINISTRATOR.'),
|
||||
('send money','3','Syntax: .send money #playername "#subject" "#text" #money\r\n\r\nSend mail with money to a player. Subject and mail text must be in "".');
|
||||
|
|
@ -211,6 +211,7 @@ pkgdata_DATA = \
|
|||
7560_01_mangos_gameobject_template.sql \
|
||||
7565_01_mangos_mangos_string.sql \
|
||||
7568_01_mangos_spell_proc_event.sql \
|
||||
7615_01_mangos_command.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -402,4 +403,5 @@ EXTRA_DIST = \
|
|||
7560_01_mangos_gameobject_template.sql \
|
||||
7565_01_mangos_mangos_string.sql \
|
||||
7568_01_mangos_spell_proc_event.sql \
|
||||
7615_01_mangos_command.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -437,6 +437,15 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand sendCommandTable[] =
|
||||
{
|
||||
{ "items", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendItemsCommand, "", NULL },
|
||||
{ "mail", SEC_MODERATOR, true, &ChatHandler::HandleSendMailCommand, "", NULL },
|
||||
{ "message", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
|
||||
{ "money", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMoneyCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverIdleRestartCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
|
|
@ -589,9 +598,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "password", SEC_PLAYER, false, &ChatHandler::HandlePasswordCommand, "", NULL },
|
||||
{ "lockaccount", SEC_PLAYER, false, &ChatHandler::HandleLockAccountCommand, "", NULL },
|
||||
{ "respawn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleRespawnCommand, "", NULL },
|
||||
{ "senditems", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendItemsCommand, "", NULL },
|
||||
{ "sendmail", SEC_MODERATOR, true, &ChatHandler::HandleSendMailCommand, "", NULL },
|
||||
{ "sendmoney", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMoneyCommand, "", NULL },
|
||||
{ "send", SEC_MODERATOR, true, NULL, "", sendCommandTable },
|
||||
{ "rename", SEC_GAMEMASTER, true, &ChatHandler::HandleRenameCommand, "", NULL },
|
||||
{ "customize", SEC_GAMEMASTER, true, &ChatHandler::HandleCustomizeCommand, "", NULL },
|
||||
{ "loadscripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadScriptsCommand, "", NULL },
|
||||
|
|
@ -603,7 +610,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
|
||||
{ "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
|
||||
{ "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL },
|
||||
{ "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
|
||||
{ "repairitems", SEC_GAMEMASTER, false, &ChatHandler::HandleRepairitemsCommand, "", NULL },
|
||||
{ "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL },
|
||||
|
||||
|
|
|
|||
170
src/game/Chat.h
170
src/game/Chat.h
|
|
@ -95,27 +95,21 @@ class ChatHandler
|
|||
bool HandleAccountSetGmLevelCommand(const char* args);
|
||||
bool HandleAccountSetPasswordCommand(const char* args);
|
||||
|
||||
bool HandleHelpCommand(const char* args);
|
||||
bool HandleCommandsCommand(const char* args);
|
||||
bool HandleStartCommand(const char* args);
|
||||
bool HandleDismountCommand(const char* args);
|
||||
bool HandleSaveCommand(const char* args);
|
||||
bool HandleBanAccountCommand(const char* args);
|
||||
bool HandleBanCharacterCommand(const char* args);
|
||||
bool HandleBanIPCommand(const char* args);
|
||||
bool HandleBanInfoAccountCommand(const char* args);
|
||||
bool HandleBanInfoCharacterCommand(const char* args);
|
||||
bool HandleBanInfoIPCommand(const char* args);
|
||||
bool HandleBanListAccountCommand(const char* args);
|
||||
bool HandleBanListCharacterCommand(const char* args);
|
||||
bool HandleBanListIPCommand(const char* args);
|
||||
|
||||
bool HandleNamegoCommand(const char* args);
|
||||
bool HandleGonameCommand(const char* args);
|
||||
bool HandleGroupgoCommand(const char* args);
|
||||
bool HandleRecallCommand(const char* args);
|
||||
bool HandleAnnounceCommand(const char* args);
|
||||
bool HandleNotifyCommand(const char* args);
|
||||
bool HandleGPSCommand(const char* args);
|
||||
bool HandleTaxiCheatCommand(const char* args);
|
||||
bool HandleWhispersCommand(const char* args);
|
||||
bool HandleTeleNameCommand(const char* args);
|
||||
bool HandleTeleGroupCommand(const char* args);
|
||||
bool HandleModifyDrunkCommand(const char* args);
|
||||
bool HandleSendItemsCommand(const char* args);
|
||||
bool HandleSendMailCommand(const char* args);
|
||||
bool HandleSendMoneyCommand(const char* args);
|
||||
bool HandleCastCommand(const char *args);
|
||||
bool HandleCastBackCommand(const char *args);
|
||||
bool HandleCastDistCommand(const char *args);
|
||||
bool HandleCastSelfCommand(const char *args);
|
||||
bool HandleCastTargetCommand(const char *args);
|
||||
|
||||
bool HandleDebugAnimCommand(const char* args);
|
||||
bool HandleDebugArenaCommand(const char * args);
|
||||
|
|
@ -149,6 +143,14 @@ class ChatHandler
|
|||
bool HandleEventStopCommand(const char* args);
|
||||
bool HandleEventInfoCommand(const char* args);
|
||||
|
||||
bool HandleGameObjectAddCommand(const char* args);
|
||||
bool HandleGameObjectDeleteCommand(const char* args);
|
||||
bool HandleGameObjectMoveCommand(const char* args);
|
||||
bool HandleGameObjectNearCommand(const char* args);
|
||||
bool HandleGameObjectPhaseCommand(const char* args);
|
||||
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);
|
||||
|
|
@ -156,6 +158,21 @@ class ChatHandler
|
|||
bool HandleGMListIngameCommand(const char* args);
|
||||
bool HandleGMVisibleCommand(const char* args);
|
||||
|
||||
bool HandleGuildCreateCommand(const char* args);
|
||||
bool HandleGuildInviteCommand(const char* args);
|
||||
bool HandleGuildUninviteCommand(const char* args);
|
||||
bool HandleGuildRankCommand(const char* args);
|
||||
bool HandleGuildDeleteCommand(const char* args);
|
||||
|
||||
bool HandleHonorAddCommand(const char* args);
|
||||
bool HandleHonorAddKillCommand(const char* args);
|
||||
bool HandleHonorUpdateCommand(const char* args);
|
||||
|
||||
bool HandleInstanceListBindsCommand(const char* args);
|
||||
bool HandleInstanceUnbindCommand(const char* args);
|
||||
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);
|
||||
|
|
@ -168,6 +185,11 @@ class ChatHandler
|
|||
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);
|
||||
bool HandleListObjectCommand(const char* args);
|
||||
|
||||
bool HandleLookupAreaCommand(const char* args);
|
||||
bool HandleLookupCreatureCommand(const char* args);
|
||||
bool HandleLookupEventCommand(const char* args);
|
||||
|
|
@ -240,6 +262,10 @@ class ChatHandler
|
|||
bool HandleNpcSubNameCommand(const char* args);
|
||||
//----------------------------------------------------------
|
||||
|
||||
bool HandleQuestAdd(const char * args);
|
||||
bool HandleQuestRemove(const char * args);
|
||||
bool HandleQuestComplete(const char * args);
|
||||
|
||||
bool HandleReloadAllCommand(const char* args);
|
||||
bool HandleReloadAllAreaCommand(const char* args);
|
||||
bool HandleReloadAllItemCommand(const char* args);
|
||||
|
|
@ -312,10 +338,18 @@ class ChatHandler
|
|||
bool HandleReloadSpellThreatsCommand(const char* args);
|
||||
bool HandleReloadSpellPetAurasCommand(const char* args);
|
||||
|
||||
bool HandleInstanceListBindsCommand(const char* args);
|
||||
bool HandleInstanceUnbindCommand(const char* args);
|
||||
bool HandleInstanceStatsCommand(const char* args);
|
||||
bool HandleInstanceSaveDataCommand(const char * args);
|
||||
bool HandleResetAchievementsCommand(const char * args);
|
||||
bool HandleResetAllCommand(const char * args);
|
||||
bool HandleResetHonorCommand(const char * args);
|
||||
bool HandleResetLevelCommand(const char * args);
|
||||
bool HandleResetSpellsCommand(const char * args);
|
||||
bool HandleResetStatsCommand(const char * args);
|
||||
bool HandleResetTalentsCommand(const char * args);
|
||||
|
||||
bool HandleSendItemsCommand(const char* args);
|
||||
bool HandleSendMailCommand(const char* args);
|
||||
bool HandleSendMessageCommand(const char * args);
|
||||
bool HandleSendMoneyCommand(const char* args);
|
||||
|
||||
bool HandleServerCorpsesCommand(const char* args);
|
||||
bool HandleServerExitCommand(const char* args);
|
||||
|
|
@ -329,9 +363,38 @@ class ChatHandler
|
|||
bool HandleServerShutDownCommand(const char* args);
|
||||
bool HandleServerShutDownCancelCommand(const char* args);
|
||||
|
||||
bool HandleHonorAddCommand(const char* args);
|
||||
bool HandleHonorAddKillCommand(const char* args);
|
||||
bool HandleHonorUpdateCommand(const char* args);
|
||||
bool HandleTeleCommand(const char * args);
|
||||
bool HandleTeleAddCommand(const char * args);
|
||||
bool HandleTeleDelCommand(const char * args);
|
||||
bool HandleTeleGroupCommand(const char* args);
|
||||
bool HandleTeleNameCommand(const char* args);
|
||||
|
||||
bool HandleUnBanAccountCommand(const char* args);
|
||||
bool HandleUnBanCharacterCommand(const char* args);
|
||||
bool HandleUnBanIPCommand(const char* args);
|
||||
|
||||
bool HandleWpAddCommand(const char* args);
|
||||
bool HandleWpModifyCommand(const char* args);
|
||||
bool HandleWpShowCommand(const char* args);
|
||||
bool HandleWpExportCommand(const char* args);
|
||||
bool HandleWpImportCommand(const char* args);
|
||||
|
||||
bool HandleHelpCommand(const char* args);
|
||||
bool HandleCommandsCommand(const char* args);
|
||||
bool HandleStartCommand(const char* args);
|
||||
bool HandleDismountCommand(const char* args);
|
||||
bool HandleSaveCommand(const char* args);
|
||||
|
||||
bool HandleNamegoCommand(const char* args);
|
||||
bool HandleGonameCommand(const char* args);
|
||||
bool HandleGroupgoCommand(const char* args);
|
||||
bool HandleRecallCommand(const char* args);
|
||||
bool HandleAnnounceCommand(const char* args);
|
||||
bool HandleNotifyCommand(const char* args);
|
||||
bool HandleGPSCommand(const char* args);
|
||||
bool HandleTaxiCheatCommand(const char* args);
|
||||
bool HandleWhispersCommand(const char* args);
|
||||
bool HandleModifyDrunkCommand(const char* args);
|
||||
|
||||
bool HandleLoadScriptsCommand(const char* args);
|
||||
|
||||
|
|
@ -342,11 +405,6 @@ class ChatHandler
|
|||
bool HandleGoObjectCommand(const char* args);
|
||||
bool HandleGoTriggerCommand(const char* args);
|
||||
bool HandleGoGraveyardCommand(const char* args);
|
||||
bool HandleGameObjectTargetCommand(const char* args);
|
||||
bool HandleGameObjectDeleteCommand(const char* args);
|
||||
bool HandleGameObjectMoveCommand(const char* args);
|
||||
bool HandleGameObjectPhaseCommand(const char* args);
|
||||
bool HandleGameObjectTurnCommand(const char* args);
|
||||
bool HandlePInfoCommand(const char* args);
|
||||
bool HandlePLimitCommand(const char* args);
|
||||
bool HandleMuteCommand(const char* args);
|
||||
|
|
@ -354,18 +412,6 @@ class ChatHandler
|
|||
bool HandleMovegensCommand(const char* args);
|
||||
|
||||
bool HandleCharacterDeleteCommand(const char* args);
|
||||
bool HandleBanAccountCommand(const char* args);
|
||||
bool HandleBanCharacterCommand(const char* args);
|
||||
bool HandleBanIPCommand(const char* args);
|
||||
bool HandleUnBanAccountCommand(const char* args);
|
||||
bool HandleUnBanCharacterCommand(const char* args);
|
||||
bool HandleUnBanIPCommand(const char* args);
|
||||
bool HandleBanInfoAccountCommand(const char* args);
|
||||
bool HandleBanInfoCharacterCommand(const char* args);
|
||||
bool HandleBanInfoIPCommand(const char* args);
|
||||
bool HandleBanListAccountCommand(const char* args);
|
||||
bool HandleBanListCharacterCommand(const char* args);
|
||||
bool HandleBanListIPCommand(const char* args);
|
||||
bool HandleGoXYCommand(const char* args);
|
||||
bool HandleGoXYZCommand(const char* args);
|
||||
bool HandleGoZoneXYCommand(const char* args);
|
||||
|
|
@ -376,7 +422,6 @@ class ChatHandler
|
|||
bool HandleCooldownCommand(const char* args);
|
||||
bool HandleUnLearnCommand(const char* args);
|
||||
bool HandleGetDistanceCommand(const char* args);
|
||||
bool HandleGameObjectAddCommand(const char* args);
|
||||
bool HandleModifyStandStateCommand(const char* args);
|
||||
bool HandleDieCommand(const char* args);
|
||||
bool HandleDamageCommand(const char *args);
|
||||
|
|
@ -394,64 +439,29 @@ class ChatHandler
|
|||
bool HandleAddItemCommand(const char* args);
|
||||
bool HandleAddItemSetCommand(const char* args);
|
||||
|
||||
bool HandleGuildCreateCommand(const char* args);
|
||||
bool HandleGuildInviteCommand(const char* args);
|
||||
bool HandleGuildUninviteCommand(const char* args);
|
||||
bool HandleGuildRankCommand(const char* args);
|
||||
bool HandleGuildDeleteCommand(const char* args);
|
||||
bool HandleBankCommand(const char* args);
|
||||
bool HandleChangeWeather(const char* args);
|
||||
bool HandleKickPlayerCommand(const char * args);
|
||||
bool HandleTeleCommand(const char * args);
|
||||
bool HandleTeleAddCommand(const char * args);
|
||||
bool HandleTeleDelCommand(const char * args);
|
||||
bool HandleListAurasCommand(const char * args);
|
||||
|
||||
bool HandleResetAchievementsCommand(const char * args);
|
||||
bool HandleResetHonorCommand(const char * args);
|
||||
bool HandleResetLevelCommand(const char * args);
|
||||
bool HandleResetSpellsCommand(const char * args);
|
||||
bool HandleResetStatsCommand(const char * args);
|
||||
bool HandleResetTalentsCommand(const char * args);
|
||||
bool HandleResetAllCommand(const char * args);
|
||||
|
||||
bool HandleTicketCommand(const char* args);
|
||||
bool HandleDelTicketCommand(const char* args);
|
||||
bool HandleMaxSkillCommand(const char* args);
|
||||
bool HandleSetSkillCommand(const char* args);
|
||||
bool HandleListCreatureCommand(const char* args);
|
||||
bool HandleListItemCommand(const char* args);
|
||||
bool HandleListObjectCommand(const char* args);
|
||||
bool HandleGameObjectNearCommand(const char* args);
|
||||
bool HandlePasswordCommand(const char* args);
|
||||
bool HandleLockAccountCommand(const char* args);
|
||||
bool HandleRespawnCommand(const char* args);
|
||||
bool HandleWpAddCommand(const char* args);
|
||||
bool HandleWpModifyCommand(const char* args);
|
||||
bool HandleWpShowCommand(const char* args);
|
||||
bool HandleWpExportCommand(const char* args);
|
||||
bool HandleWpImportCommand(const char* args);
|
||||
bool HandleRenameCommand(const char * args);
|
||||
bool HandleCustomizeCommand(const char * args);
|
||||
bool HandlePDumpLoadCommand(const char *args);
|
||||
bool HandlePDumpWriteCommand(const char *args);
|
||||
bool HandleCastCommand(const char *args);
|
||||
bool HandleCastBackCommand(const char *args);
|
||||
bool HandleCastDistCommand(const char *args);
|
||||
bool HandleCastSelfCommand(const char *args);
|
||||
bool HandleCastTargetCommand(const char *args);
|
||||
bool HandleComeToMeCommand(const char *args);
|
||||
bool HandleCombatStopCommand(const char *args);
|
||||
bool HandleSendMessageCommand(const char * args);
|
||||
bool HandleFlushArenaPointsCommand(const char *args);
|
||||
bool HandleRepairitemsCommand(const char* args);
|
||||
bool HandleWaterwalkCommand(const char* args);
|
||||
|
||||
//! Development Commands
|
||||
bool HandleSet32Bit(const char* args);
|
||||
bool HandleQuestAdd(const char * args);
|
||||
bool HandleQuestRemove(const char * args);
|
||||
bool HandleQuestComplete(const char * args);
|
||||
bool HandleSaveAllCommand(const char* args);
|
||||
|
||||
Player* getSelectedPlayer();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7614"
|
||||
#define REVISION_NR "7615"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue