mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11115] Implement .gm setview command
This commit is contained in:
parent
b2d81eae1b
commit
50e681146e
7 changed files with 27 additions and 1 deletions
|
|
@ -569,6 +569,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 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.'),
|
||||
('go creature',1,'Syntax: .go creature (#creature_guid|$creature_name|id #creature_id)\r\nTeleport your character to creature with guid #creature_guid, or teleport your character to creature with name including as part $creature_name substring, or teleport your character to a creature that was spawned from the template with this entry #creature_id.'),
|
||||
|
|
|
|||
7
sql/updates/11115_01_mangos_command.sql
Normal file
7
sql/updates/11115_01_mangos_command.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_11058_01_mangos_spell_proc_event required_11115_01_mangos_command bit;
|
||||
|
||||
DELETE FROM command WHERE name = 'gm setview';
|
||||
|
||||
INSERT INTO command (name, security, help) VALUES
|
||||
('gm setview',1,'Syntax: .gm setview\r\n\r\nSet farsight view on selected unit. Select yourself to set view back.');
|
||||
|
||||
|
|
@ -158,6 +158,7 @@ pkgdata_DATA = \
|
|||
11040_01_mangos_spell_chain.sql \
|
||||
11040_02_mangos_spell_bonus_data.sql \
|
||||
11058_01_mangos_spell_proc_event.sql \
|
||||
11115_01_mangos_command.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -296,4 +297,5 @@ EXTRA_DIST = \
|
|||
11040_01_mangos_spell_chain.sql \
|
||||
11040_02_mangos_spell_bonus_data.sql \
|
||||
11058_01_mangos_spell_proc_event.sql \
|
||||
11115_01_mangos_command.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
|
||||
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleGMVisibleCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMCommand, "", NULL },
|
||||
{ "setview", SEC_MODERATOR, false, &ChatHandler::HandleSetViewCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -522,6 +522,7 @@ class ChatHandler
|
|||
bool HandleTaxiCheatCommand(char* args);
|
||||
bool HandleWhispersCommand(char* args);
|
||||
bool HandleModifyDrunkCommand(char* args);
|
||||
bool HandleSetViewCommand(char* args);
|
||||
|
||||
bool HandleLoadScriptsCommand(char* args);
|
||||
|
||||
|
|
|
|||
|
|
@ -2241,3 +2241,17 @@ bool ChatHandler::HandleModifyDrunkCommand(char* args)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSetViewCommand(char* /*args*/)
|
||||
{
|
||||
if (Unit* unit = getSelectedUnit())
|
||||
m_session->GetPlayer()->GetCamera().SetView(unit);
|
||||
else
|
||||
{
|
||||
PSendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11114"
|
||||
#define REVISION_NR "11115"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue