Skip to content

Commit

Permalink
[z2761] New mount chat commands
Browse files Browse the repository at this point in the history
Changes:
* New command ".gm mountup [fast|slow]" - mount self on a random rare/unobtainable in-game mount, i.e. a distinct 'gm mount', serverside mimic of popular UI addons "MountUp" and "GoGoMount" but doesn't require any mounts in inventory to function
* Updated command ".modify mount [fast|slow]" - a counterpart of ".gm mountup" command for currently selected player
  • Loading branch information
Warlockbugs committed May 31, 2020
1 parent b37b59a commit 49857da
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 279 deletions.
5 changes: 3 additions & 2 deletions sql/base/mangos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) DEFAULT NULL,
`creature_ai_version` varchar(120) DEFAULT NULL,
`required_z2760_01_mangos_command` bit(1) DEFAULT NULL
`required_z2761_01_mangos_mount_commands` bit(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Used DB version notes';

--
Expand Down Expand Up @@ -459,6 +459,7 @@ INSERT INTO `command` VALUES
('gm fly',3,'Syntax: .gm fly [on/off]\r\nEnable/disable gm fly mode.'),
('gm ingame',0,'Syntax: .gm ingame\r\n\r\nDisplay a list of available in game Game Masters.'),
('gm list',3,'Syntax: .gm list\r\n\r\nDisplay a list of all Game Masters accounts and security levels.'),
('gm mountup',1,'Syntax: .gm mountup [fast|slow]\r\n\r\nAcquire a random unusual land mount.'),
('gm setview',1,'Syntax: .gm setview\r\n\r\nSet farsight view on selected unit. Select yourself to set view back.'),
('gm visible',1,'Syntax: .gm visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'),
('go',1,'Syntax: .go [$playername|pointlink|#x #y #z [#mapid]]\r\nTeleport your character to point with coordinates of player $playername, or coordinates of one from shift-link types: player, tele, taxinode, creature/creature_entry, gameobject/gameobject_entry, or explicit #x #y #z #mapid coordinates.'),
Expand Down Expand Up @@ -547,7 +548,7 @@ INSERT INTO `command` VALUES
('modify mana',1,'Syntax: .modify mana #newmana\r\n\r\nModify the mana of the selected player. If no player is selected, modify your mana.'),
('modify money',1,'Syntax: .modify money #money\r\n.money #money\r\n\r\nAdd or remove money to the selected player. If no player is selected, modify your money.\r\n\r\n #gold can be negative to remove money.'),
('modify morph',2,'Syntax: .modify morph #displayid\r\n\r\nChange your current model id to #displayid.'),
('modify mount',1,'Syntax: .modify mount #id #speed\r\nDisplay selected player as mounted at #id creature and set speed to #speed value.'),
('modify mount',1,'Syntax: .modify mount [fast|slow]\r\n\r\nProvide selected player a random unusual land mount.'),
('modify rage',1,'Syntax: .modify rage #newrage\r\n\r\nModify the rage of the selected player. If no player is selected, modify your rage.'),
('modify rep',2,'Syntax: .modify rep #repId (#repvalue | $rankname [#delta])\r\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\r\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\r\nYou can use \'.pinfo rep\' to list all known reputation ids, or use \'.lookup faction $name\' to locate a specific faction id.'),
('modify scale',1,'Syntax: .modify scale #scale\r\n\r\nChange model scale for targeted player (util relogin) or creature (until respawn).'),
Expand Down
7 changes: 7 additions & 0 deletions sql/updates/mangos/z2761_01_mangos_mount_commands.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ALTER TABLE db_version CHANGE COLUMN required_z2760_01_mangos_command required_z2761_01_mangos_mount_commands bit;

DELETE FROM command WHERE name IN ('gm mountup','modify mount');

INSERT INTO command VALUES
('gm mountup',1,'Syntax: .gm mountup [fast|slow]\r\n\r\nAcquire a random unusual land mount.'),
('modify mount',1,'Syntax: .modify mount [fast|slow]\r\n\r\nProvide selected player a random unusual land mount.');
1 change: 1 addition & 0 deletions src/game/Chat/Chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ ChatCommand* ChatHandler::getCommandTable()
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGMFlyCommand, "", nullptr },
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", nullptr },
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", nullptr },
{ "mountup", SEC_MODERATOR, false, &ChatHandler::HandleGMMountUpCommand, "", nullptr },
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleGMVisibleCommand, "", nullptr },
{ "setview", SEC_MODERATOR, false, &ChatHandler::HandleSetViewCommand, "", nullptr },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMCommand, "", nullptr },
Expand Down
2 changes: 2 additions & 0 deletions src/game/Chat/Chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ class ChatHandler
bool HandleGMFlyCommand(char* args);
bool HandleGMListFullCommand(char* args);
bool HandleGMListIngameCommand(char* args);
bool HandleGMMountUpCommand(char* args);
bool HandleGMVisibleCommand(char* args);

bool HandleGoCommand(char* args);
Expand Down Expand Up @@ -429,6 +430,7 @@ class ChatHandler
bool HandleModifyBlockCommand(char* args);
bool HandleModifyDodgeCommand(char* args);
bool HandleModifyParryCommand(char* args);
bool ModifyMountCommandHelper(Player* target, char* args);
bool ModifyStatCommandHelper(char* args, char const* statName, uint32 spellId);

//-----------------------Npc Commands-----------------------
Expand Down
Loading

0 comments on commit 49857da

Please sign in to comment.