Merge branch 'master' into 310

Conflicts:
	src/game/Chat.cpp
	src/game/Chat.h
	src/game/GameObject.cpp
	src/game/Level2.cpp
This commit is contained in:
tomrus88 2009-03-21 15:48:51 +03:00
commit e5bde711ea
31 changed files with 1295 additions and 1109 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`; DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` ( CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`required_7472_01_mangos_mangos_string` bit(1) default NULL `required_7503_01_mangos_command` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -241,7 +241,6 @@ INSERT INTO `command` VALUES
('account set password',4,'Syntax: .account set password $account $password $password\r\n\r\nSet password for account.'), ('account set password',4,'Syntax: .account set password $account $password $password\r\n\r\nSet password for account.'),
('additem',3,'Syntax: .additem #itemid/[#itemname]/#shift-click-item-link #itemcount\r\n\r\nAdds the specified number of items of id #itemid (or exact (!) name $itemname in brackets, or link created by shift-click at item in inventory or recipe) to your or selected character inventory. If #itemcount is omitted, only one item will be added.\r\n.'), ('additem',3,'Syntax: .additem #itemid/[#itemname]/#shift-click-item-link #itemcount\r\n\r\nAdds the specified number of items of id #itemid (or exact (!) name $itemname in brackets, or link created by shift-click at item in inventory or recipe) to your or selected character inventory. If #itemcount is omitted, only one item will be added.\r\n.'),
('additemset',3,'Syntax: .additemset #itemsetid\r\n\r\nAdd items from itemset of id #itemsetid to your or selected character inventory. Will add by one example each item from itemset.'), ('additemset',3,'Syntax: .additemset #itemsetid\r\n\r\nAdd items from itemset of id #itemsetid to your or selected character inventory. Will add by one example each item from itemset.'),
('addmove',2,'Syntax: .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.'),
('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'), ('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'),
('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'), ('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'),
('ban account',3,'Syntax: .ban account $Name $bantime $reason\r\nBan account kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'), ('ban account',3,'Syntax: .ban account $Name $bantime $reason\r\nBan account kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),
@ -270,8 +269,8 @@ INSERT INTO `command` VALUES
('debug getvalue',3,'Syntax: .debug getvalue #field #isInt\r\n\r\nGet the field #field of the selected creature. If no creature is selected, get the content of your field.\r\n\r\nUse a #isInt of value 1 if the expected field content is an integer.'), ('debug getvalue',3,'Syntax: .debug getvalue #field #isInt\r\n\r\nGet the field #field of the selected creature. If no creature is selected, get the content of your field.\r\n\r\nUse a #isInt of value 1 if the expected field content is an integer.'),
('debug playsound',1,'Syntax: .debug playsound #soundid\r\n\r\nPlay sound with #soundid.\r\nSound will be play only for you. Other players do not hear this.\r\nWarning: client may have more 5000 sounds...'), ('debug playsound',1,'Syntax: .debug playsound #soundid\r\n\r\nPlay sound with #soundid.\r\nSound will be play only for you. Other players do not hear this.\r\nWarning: client may have more 5000 sounds...'),
('debug setvalue',3,'Syntax: .debug setvalue #field #value #isInt\r\n\r\nSet the field #field of the selected creature with value #value. If no creature is selected, set the content of your field.\r\n\r\nUse a #isInt of value 1 if #value is an integer.'), ('debug setvalue',3,'Syntax: .debug setvalue #field #value #isInt\r\n\r\nSet the field #field of the selected creature with value #value. If no creature is selected, set the content of your field.\r\n\r\nUse a #isInt of value 1 if #value is an integer.'),
('debug standstate',2,'Syntax: .debug standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),
('debug update',3,'Syntax: .debug update #field #value\r\n\r\nUpdate the field #field of the selected character or creature with value #value.\r\n\r\nIf no #value is provided, display the content of field #field.'), ('debug update',3,'Syntax: .debug update #field #value\r\n\r\nUpdate the field #field of the selected character or creature with value #value.\r\n\r\nIf no #value is provided, display the content of field #field.'),
('debug Mod32Value',3,'Syntax: .debug Mod32Value #field #value\r\n\r\nAdd #value to field #field of your character.'),
('delticket',2,'Syntax: .delticket all\r\n .delticket #num\r\n .delticket $character_name\r\n\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.'), ('delticket',2,'Syntax: .delticket all\r\n .delticket #num\r\n .delticket $character_name\r\n\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.'),
('demorph',2,'Syntax: .demorph\r\n\r\nDemorph the selected player.'), ('demorph',2,'Syntax: .demorph\r\n\r\nDemorph the selected player.'),
('die',3,'Syntax: .die\r\n\r\nKill the selected player. If no player is selected, it will kill you.'), ('die',3,'Syntax: .die\r\n\r\nKill the selected player. If no player is selected, it will kill you.'),
@ -290,19 +289,19 @@ INSERT INTO `command` VALUES
('gm list',3,'Syntax: .gm list\r\n\r\nDisplay a list of all Game Masters accounts and security levels.'), ('gm list',3,'Syntax: .gm list\r\n\r\nDisplay a list of all Game Masters accounts and security levels.'),
('gm online',0,'Syntax: .gm online\r\n\r\nDisplay a list of available Game Masters.'), ('gm online',0,'Syntax: .gm online\r\n\r\nDisplay a list of available Game Masters.'),
('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.'), ('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 creature',2,'Syntax: .go creature #creature_guid\r\nTeleport your character to creature with guid #creature_guid.\r\n.gocreature #creature_name\r\nTeleport your character to creature with this name.\r\n.gocreature id #creature_id\r\nTeleport your character to a creature that was spawned from the template with this entry.\r\n*If* more than one creature is found, then you are teleported to the first that is found inside the database.'), ('go creature',1,'Syntax: .go creature #creature_guid\r\nTeleport your character to creature with guid #creature_guid.\r\n.gocreature #creature_name\r\nTeleport your character to creature with this name.\r\n.gocreature id #creature_id\r\nTeleport your character to a creature that was spawned from the template with this entry.\r\n*If* more than one creature is found, then you are teleported to the first that is found inside the database.'),
('go graveyard',2,'Syntax: .go graveyard #graveyardId\r\n Teleport to graveyard with the graveyardId specified.'), ('go graveyard',1,'Syntax: .go graveyard #graveyardId\r\n Teleport to graveyard with the graveyardId specified.'),
('go grid',1,'Syntax: .go grid #gridX #gridY [#mapId]\r\n\r\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'), ('go grid',1,'Syntax: .go grid #gridX #gridY [#mapId]\r\n\r\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'),
('go object',1,'Syntax: .go object #object_guid\r\nTeleport your character to gameobject with guid #object_guid'), ('go object',1,'Syntax: .go object #object_guid\r\nTeleport your character to gameobject with guid #object_guid'),
('go trigger',2,'Syntax: .go trigger #trigger_id\r\n\r\nTeleport your character to areatrigger with id #trigger_id. Character will be teleported to trigger target if selected areatrigger is telporting trigger.'), ('go trigger',1,'Syntax: .go trigger #trigger_id\r\n\r\nTeleport your character to areatrigger with id #trigger_id. Character will be teleported to trigger target if selected areatrigger is telporting trigger.'),
('go xy',1,'Syntax: .go xy #x #y [#mapid]\r\n\r\nTeleport player to point with (#x,#y) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'), ('go xy',1,'Syntax: .go xy #x #y [#mapid]\r\n\r\nTeleport player to point with (#x,#y) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
('go xyz',1,'Syntax: .go xyz #x #y #z [#mapid]\r\n\r\nTeleport player to point with (#x,#y,#z) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'), ('go xyz',1,'Syntax: .go xyz #x #y #z [#mapid]\r\n\r\nTeleport player to point with (#x,#y,#z) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
('go zonexy',1,'Syntax: .go zonexy #x #y [#zone]\r\n\r\nTeleport player to point with (#x,#y) client coordinates at ground(water) level in zone #zoneid or current zone if #zoneid not provided. You can look up zone using .lookup area $namepart'), ('go zonexy',1,'Syntax: .go zonexy #x #y [#zone]\r\n\r\nTeleport player to point with (#x,#y) client coordinates at ground(water) level in zone #zoneid or current zone if #zoneid not provided. You can look up zone using .lookup area $namepart'),
('gobject add',2,'Syntax: .gobject add #id <spawntimeSecs>\r\n\r\nAdd a game object from game object templates to the world at your current location using the #id.\r\nspawntimesecs sets the spawntime, it is optional.\r\n\r\nNote: this is a copy of .gameobject.'), ('gobject add',2,'Syntax: .gobject add #id <spawntimeSecs>\r\n\r\nAdd a game object from game object templates to the world at your current location using the #id.\r\nspawntimesecs sets the spawntime, it is optional.\r\n\r\nNote: this is a copy of .gameobject.'),
('gobject delete',2,'Syntax: .gobject delete #go_guid\r\nDelete gameobject with guid #go_guid.'), ('gobject delete',2,'Syntax: .gobject delete #go_guid\r\nDelete gameobject with guid #go_guid.'),
('gobject move',2,'Syntax: .gobject move #goguid [#x #y #z]\r\n\r\nMove gameobject #goguid to character coordinates (or to (#x,#y,#z) coordinates if its provide).'), ('gobject move',2,'Syntax: .gobject move #goguid [#x #y #z]\r\n\r\nMove gameobject #goguid to character coordinates (or to (#x,#y,#z) coordinates if its provide).'),
('gobject near',3,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'), ('gobject near',2,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject phase',3,'Syntax: .gobject phase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'), ('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'),
('gobject turn',2,'Syntax: .gobject turn #goguid \r\n\r\nSet for gameobject #goguid orientation same as current character orientation.'), ('gobject turn',2,'Syntax: .gobject turn #goguid \r\n\r\nSet for gameobject #goguid orientation same as current character orientation.'),
('gobject target',2,'Syntax: .gobject target [#go_id|#go_name_part]\r\n\r\nLocate and show position nearest gameobject. If #go_id or #go_name_part provide then locate and show position of nearest gameobject with gameobject template id #go_id or name included #go_name_part as part.'), ('gobject target',2,'Syntax: .gobject target [#go_id|#go_name_part]\r\n\r\nLocate and show position nearest gameobject. If #go_id or #go_name_part provide then locate and show position of nearest gameobject with gameobject template id #go_id or name included #go_name_part as part.'),
('goname',1,'Syntax: .goname $charactername\r\n\r\nTeleport to the given character. Either specify the character name or click on the character\'s portrait, e.g. when you are in a group.'), ('goname',1,'Syntax: .goname $charactername\r\n\r\nTeleport to the given character. Either specify the character name or click on the character\'s portrait, e.g. when you are in a group.'),
@ -358,8 +357,7 @@ INSERT INTO `command` VALUES
('lookup spell',3,'Syntax: .lookup spell $namepart\r\n\r\nLooks up a spell by $namepart, and returns all matches with their spell ID\'s.'), ('lookup spell',3,'Syntax: .lookup spell $namepart\r\n\r\nLooks up a spell by $namepart, and returns all matches with their spell ID\'s.'),
('lookup tele',1,'Syntax: .lookup tele $substring\r\n\r\nSearch and output all .tele command locations with provide $substring in name.'), ('lookup tele',1,'Syntax: .lookup tele $substring\r\n\r\nSearch and output all .tele command locations with provide $substring in name.'),
('maxskill',3,'Syntax: .maxskill\r\nSets all skills of the targeted player to their maximum VALUESfor its current level.'), ('maxskill',3,'Syntax: .maxskill\r\nSets all skills of the targeted player to their maximum VALUESfor its current level.'),
('Mod32Value',3,'Syntax: .Mod32Value #field #value\r\n\r\nAdd #value to field #field of your character.'), ('modify arena',1,'Syntax: .modify arena #value\r\nAdd $amount arena points to the selected player.'),
('modify arena',3,'Syntax: .modify arena #value\r\nAdd $amount arena points to the selected player.'),
('modify aspeed',1,'Syntax: .modify aspeed #rate\r\n\r\nModify all speeds -run,swim,run back,swim back- of the selected player to \"normalbase speed for this move type\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'), ('modify aspeed',1,'Syntax: .modify aspeed #rate\r\n\r\nModify all speeds -run,swim,run back,swim back- of the selected player to \"normalbase speed for this move type\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify bit',1,'Syntax: .modify bit #field #bit\r\n\r\nToggle the #bit bit of the #field field for the selected player. If no player is selected, modify your character.'), ('modify bit',1,'Syntax: .modify bit #field #bit\r\n\r\nToggle the #bit bit of the #field field for the selected player. If no player is selected, modify your character.'),
('modify bwalk',1,'Syntax: .modify bwalk #rate\r\n\r\nModify the speed of the selected player while running backwards to \"normal walk back speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'), ('modify bwalk',1,'Syntax: .modify bwalk #rate\r\n\r\nModify the speed of the selected player while running backwards to \"normal walk back speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
@ -380,6 +378,7 @@ INSERT INTO `command` VALUES
('modify scale',1,''), ('modify scale',1,''),
('modify speed',1,'Syntax: .modify speed #rate\r\n.speed #rate\r\n\r\nModify the running speed of the selected player to \"normal base run speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'), ('modify speed',1,'Syntax: .modify speed #rate\r\n.speed #rate\r\n\r\nModify the running speed of the selected player to \"normal base run speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify spell',1,''), ('modify spell',1,''),
('modify standstate',2,'Syntax: .modify standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),
('modify swim',1,'Syntax: .modify swim #rate\r\n\r\nModify the swim speed of the selected player to \"normal swim speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'), ('modify swim',1,'Syntax: .modify swim #rate\r\n\r\nModify the swim speed of the selected player to \"normal swim speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify titles',1,'Syntax: .modify titles #mask\r\n\r\nAllows user to use all titles from #mask.\r\n\r\n #mask=0 disables the title-choose-field'), ('modify titles',1,'Syntax: .modify titles #mask\r\n\r\nAllows user to use all titles from #mask.\r\n\r\n #mask=0 disables the title-choose-field'),
('movegens',3,'Syntax: .movegens\r\n Show movement generators stack for selected creature or player.'), ('movegens',3,'Syntax: .movegens\r\n Show movement generators stack for selected creature or player.'),
@ -389,8 +388,9 @@ INSERT INTO `command` VALUES
('notify',1,'Syntax: .notify $MessageToBroadcast\r\n\r\nSend a global message to all players online in screen.'), ('notify',1,'Syntax: .notify $MessageToBroadcast\r\n\r\nSend a global message to all players online in screen.'),
('npc add',2,'Syntax: .npc add #creatureid\r\n\r\nSpawn a creature by the given template id of #creatureid.'), ('npc add',2,'Syntax: .npc add #creatureid\r\n\r\nSpawn a creature by the given template id of #creatureid.'),
('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 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 addweapon',3,'Not yet implemented.'), ('npc addweapon',3,'Not yet implemented.'),
('npc allowmove',3,'Syntax: .npc allowmove\r\n\r\nEnable or disable movement for the selected creature.'), ('npc allowmove',3,'Syntax: .npc allowmove\r\n\r\nEnable or disable movement creatures in world. Not implemented.'),
('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 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',2,'Syntax: .npc delete [#guid]\r\n\r\nDelete creature with guid #guid (or the selected if no guid is provided)'),
('npc delitem',2,'Syntax: .npc delitem #itemId\r\n\r\nRemove item #itemid from item list of selected vendor.'), ('npc delitem',2,'Syntax: .npc delitem #itemId\r\n\r\nRemove item #itemid from item list of selected vendor.'),
@ -400,7 +400,7 @@ INSERT INTO `command` VALUES
('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 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 move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'),
('npc name',2,'Syntax: .npc name $name\r\n\r\nChange the name of the selected creature or character to $name.\r\n\r\nCommand disabled.'), ('npc name',2,'Syntax: .npc name $name\r\n\r\nChange the name of the selected creature or character to $name.\r\n\r\nCommand disabled.'),
('npc phase',3,'Syntax: .npc 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 setphase',3,'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 playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'), ('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'),
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'), ('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'),
('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'), ('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'),
@ -409,7 +409,7 @@ INSERT INTO `command` VALUES
('npc spawntime',2,'Syntax: .npc spawntime #time \r\n\r\nAdjust spawntime of selected creature to time.'), ('npc spawntime',2,'Syntax: .npc spawntime #time \r\n\r\nAdjust spawntime of selected creature to time.'),
('npc subname',2,'Syntax: .npc subname $Name\r\n\r\nChange the subname of the selected creature or player to $Name.\r\n\r\nCommand disabled.'), ('npc subname',2,'Syntax: .npc subname $Name\r\n\r\nChange the subname of the selected creature or player to $Name.\r\n\r\nCommand disabled.'),
('npc tame',2,'Syntax: .npc tame\r\n\r\nTame selected creature (tameable non pet creature). You don''t must have pet.'), ('npc tame',2,'Syntax: .npc tame\r\n\r\nTame selected creature (tameable non pet creature). You don''t must have pet.'),
('npc textemote',3,'Syntax: .npc textemote #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'), ('npc textemote',1,'Syntax: .npc textemote #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'),
('npc whisper',1,'Syntax: .npc whisper #playerguid #text\r\nMake the selected npc whisper #text to #playerguid.'), ('npc whisper',1,'Syntax: .npc whisper #playerguid #text\r\nMake the selected npc whisper #text to #playerguid.'),
('npc unfollow',2,'Syntax: .npc unfollow\r\n\r\nSelected creature (non pet) stop follow you.'), ('npc unfollow',2,'Syntax: .npc unfollow\r\n\r\nSelected creature (non pet) stop follow you.'),
('password',0,'Syntax: .password $old_password $new_password $new_password\r\n\r\nChange your account password.'), ('password',0,'Syntax: .password $old_password $new_password $new_password\r\n\r\nChange your account password.'),
@ -2488,8 +2488,8 @@ INSERT INTO `mangos_string` VALUES
(273,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (273,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(274,'Game Object (GUID: %u) has references in not found creature %u GO list, can\'t be deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (274,'Game Object (GUID: %u) has references in not found creature %u GO list, can\'t be deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(275,'Game Object (GUID: %u) removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (275,'Game Object (GUID: %u) removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(276,'Game Object (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (276,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (277,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(278,'You must select a vendor',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (278,'You must select a vendor',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(279,'You must send id for item',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (279,'You must send id for item',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(280,'Vendor has too many items (max 128)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (280,'Vendor has too many items (max 128)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
@ -2681,7 +2681,7 @@ INSERT INTO `mangos_string` VALUES
(521,'%d - |cffffffff|Hskill:%d|h[%s %s]|h|r %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (521,'%d - |cffffffff|Hskill:%d|h[%s %s]|h|r %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(522,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (522,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(523,'>> Game Object %s (GUID: %u) at %f %f %f. Orientation %f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (523,'>> Game Object %s (GUID: %u) at %f %f %f. Orientation %f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hitemset:%d|h[%s]|h|r\nGUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (524,'Selected object:\n|cffffffff|Hgameobject:%d|h[%s]|h|r GUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(525,'>> Add Game Object \'%i\' (%s) (GUID: %i) added at \'%f %f %f\'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (525,'>> Add Game Object \'%i\' (%s) (GUID: %i) added at \'%f %f %f\'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(526,'%s (lowguid: %u) movement generators stack:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (526,'%s (lowguid: %u) movement generators stack:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(527,' Idle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (527,' Idle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),

View file

@ -0,0 +1,7 @@
ALTER TABLE db_version CHANGE COLUMN required_7472_01_mangos_mangos_string required_7493_01_mangos_command bit;
DELETE FROM `command` WHERE `name` IN ('gobject near','gobject phase','gobject setphase');
INSERT INTO `command` VALUES
('gobject near',2,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.');

View file

@ -0,0 +1,7 @@
ALTER TABLE db_version CHANGE COLUMN required_7493_01_mangos_command required_7495_01_mangos_mangos_string bit;
DELETE FROM mangos_string WHERE entry IN (276,277,524);
INSERT INTO mangos_string VALUES
(276,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hgameobject:%d|h[%s]|h|r GUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

View file

@ -0,0 +1,19 @@
ALTER TABLE db_version CHANGE COLUMN required_7495_01_mangos_mangos_string required_7503_01_mangos_command bit;
DELETE FROM `command` WHERE `name` IN (
'addmove','allowmove','debug Mod32Value','debug standstate','go creature','go graveyard','go trigger',
'gobject phase','gobject setphase','Mod32Value','modify arena',
'modify standstate','npc addmove','npc allowmove','npc textemote','npc phase','npc setphase','showhonor');
INSERT INTO `command` VALUES
('debug Mod32Value',3,'Syntax: .debug Mod32Value #field #value\r\n\r\nAdd #value to field #field of your character.'),
('go creature',1,'Syntax: .go creature #creature_guid\r\nTeleport your character to creature with guid #creature_guid.\r\n.gocreature #creature_name\r\nTeleport your character to creature with this name.\r\n.gocreature id #creature_id\r\nTeleport your character to a creature that was spawned from the template with this entry.\r\n*If* more than one creature is found, then you are teleported to the first that is found inside the database.'),
('go graveyard',1,'Syntax: .go graveyard #graveyardId\r\n Teleport to graveyard with the graveyardId specified.'),
('go trigger',1,'Syntax: .go trigger #trigger_id\r\n\r\nTeleport your character to areatrigger with id #trigger_id. Character will be teleported to trigger target if selected areatrigger is telporting trigger.'),
('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'),
('modify arena',1,'Syntax: .modify arena #value\r\nAdd $amount arena points to the selected player.'),
('modify standstate',2,'Syntax: .modify standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),
('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 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 textemote',1,'Syntax: .npc textemote #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.');

View file

@ -198,6 +198,9 @@ pkgdata_DATA = \
7422_01_mangos_mangos_string.sql \ 7422_01_mangos_mangos_string.sql \
7439_01_mangos_mangos_string.sql \ 7439_01_mangos_mangos_string.sql \
7472_01_mangos_mangos_string.sql \ 7472_01_mangos_mangos_string.sql \
7493_01_mangos_command.sql \
7495_01_mangos_mangos_string.sql \
7503_01_mangos_command.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -376,4 +379,7 @@ EXTRA_DIST = \
7422_01_mangos_mangos_string.sql \ 7422_01_mangos_mangos_string.sql \
7439_01_mangos_mangos_string.sql \ 7439_01_mangos_mangos_string.sql \
7472_01_mangos_mangos_string.sql \ 7472_01_mangos_mangos_string.sql \
7493_01_mangos_command.sql \
7495_01_mangos_mangos_string.sql \
7503_01_mangos_command.sql \
README README

View file

@ -1048,7 +1048,7 @@ void BattleGround::Reset()
m_Events = 0; m_Events = 0;
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0) if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
sLog.outError("BattleGround system ERROR: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde); sLog.outError("BattleGround system: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde);
m_InvitedAlliance = 0; m_InvitedAlliance = 0;
m_InvitedHorde = 0; m_InvitedHorde = 0;
@ -1460,7 +1460,7 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
if(!pCreature->IsPositionValid()) if(!pCreature->IsPositionValid())
{ {
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY()); sLog.outError("Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
return NULL; return NULL;
} }

View file

@ -1240,7 +1240,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1+1+1+1+1); CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1+1+1+1+1);
uint8 gender, skin, face, hairStyle, hairColor, facialHair; uint8 gender, skin, face, hairStyle, hairColor, facialHair;
recv_data >> gender >> skin >> face >> hairStyle >> hairColor >> facialHair; recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
QueryResult *result = CharacterDatabase.PQuery("SELECT at_login FROM characters WHERE guid ='%u'", GUID_LOPART(guid)); QueryResult *result = CharacterDatabase.PQuery("SELECT at_login FROM characters WHERE guid ='%u'", GUID_LOPART(guid));
if (!result) if (!result)

View file

@ -71,96 +71,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand serverSetCommandTable[] =
{
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverIdleRestartCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverIdleShutdownCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverRestartCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverShutdownCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverCommandTable[] =
{
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand modifyCommandTable[] =
{
{ "hp", SEC_MODERATOR, false, &ChatHandler::HandleModifyHPCommand, "", NULL },
{ "mana", SEC_MODERATOR, false, &ChatHandler::HandleModifyManaCommand, "", NULL },
{ "rage", SEC_MODERATOR, false, &ChatHandler::HandleModifyRageCommand, "", NULL },
{ "runicpower", SEC_MODERATOR, false, &ChatHandler::HandleModifyRunicPowerCommand, "", NULL },
{ "energy", SEC_MODERATOR, false, &ChatHandler::HandleModifyEnergyCommand, "", NULL },
{ "money", SEC_MODERATOR, false, &ChatHandler::HandleModifyMoneyCommand, "", NULL },
{ "speed", SEC_MODERATOR, false, &ChatHandler::HandleModifySpeedCommand, "", NULL },
{ "swim", SEC_MODERATOR, false, &ChatHandler::HandleModifySwimCommand, "", NULL },
{ "scale", SEC_MODERATOR, false, &ChatHandler::HandleModifyScaleCommand, "", NULL },
{ "bit", SEC_MODERATOR, false, &ChatHandler::HandleModifyBitCommand, "", NULL },
{ "bwalk", SEC_MODERATOR, false, &ChatHandler::HandleModifyBWalkCommand, "", NULL },
{ "fly", SEC_MODERATOR, false, &ChatHandler::HandleModifyFlyCommand, "", NULL },
{ "aspeed", SEC_MODERATOR, false, &ChatHandler::HandleModifyASpeedCommand, "", NULL },
{ "faction", SEC_MODERATOR, false, &ChatHandler::HandleModifyFactionCommand, "", NULL },
{ "spell", SEC_MODERATOR, false, &ChatHandler::HandleModifySpellCommand, "", NULL },
{ "tp", SEC_MODERATOR, false, &ChatHandler::HandleModifyTalentCommand, "", NULL },
{ "titles", SEC_MODERATOR, false, &ChatHandler::HandleModifyKnownTitlesCommand, "", NULL },
{ "mount", SEC_MODERATOR, false, &ChatHandler::HandleModifyMountCommand, "", NULL },
{ "honor", SEC_MODERATOR, false, &ChatHandler::HandleModifyHonorCommand, "", NULL },
{ "rep", SEC_MODERATOR, false, &ChatHandler::HandleModifyRepCommand, "", NULL },
{ "arena", SEC_MODERATOR, false, &ChatHandler::HandleModifyArenaCommand, "", NULL },
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleDrunkCommand, "", NULL },
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleStandStateCommand, "", NULL },
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleMorphCommand, "", NULL },
{ "phase", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyPhaseCommand, "", NULL },
{ "gender", SEC_ADMINISTRATOR, false, &ChatHandler::HandleModifyGenderCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand wpCommandTable[] =
{
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
{ "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
{ "export", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpExportCommand, "", NULL },
{ "import", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpImportCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand banCommandTable[] = static ChatCommand banCommandTable[] =
{ {
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL }, { "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
@ -185,44 +95,46 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand unbanCommandTable[] = static ChatCommand castCommandTable[] =
{ {
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL }, { "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL }, { "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL }, { "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand debugCommandTable[] = static ChatCommand debugCommandTable[] =
{ {
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL }, { "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL }, { "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetPoiCommand, "", NULL }, { "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetPoiCommand, "", NULL },
{ "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestPartyMsgCommand, "", NULL }, { "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestPartyMsgCommand, "", NULL },
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestInvalidMsgCommand, "", NULL }, { "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestInvalidMsgCommand, "", NULL },
{ "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleEquipErrorCommand, "", NULL }, { "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugEquipErrorCommand, "", NULL },
{ "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSellErrorCommand, "", NULL }, { "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSellErrorCommand, "", NULL },
{ "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBuyErrorCommand, "", NULL }, { "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBuyErrorCommand, "", NULL },
{ "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendOpcodeCommand, "", NULL }, { "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendOpcodeCommand, "", NULL },
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSpawnVehicle, "", NULL }, { "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpawnVehicle, "", NULL },
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdateWorldStateCommand, "", NULL }, { "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateWorldStateCommand, "", NULL },
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlaySound2Command, "", NULL }, { "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugPlaySound2Command, "", NULL },
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChannelNotifyCommand, "", NULL }, { "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChannelNotifyCommand, "", NULL },
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChatMsgCommand, "", NULL }, { "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChatMsgCommand, "", NULL },
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendSetPhaseShiftCommand, "", NULL }, { "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSetPhaseShiftCommand, "", NULL },
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetItemState, "", NULL }, { "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemState, "", NULL },
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandlePlaySoundCommand, "", NULL }, { "playsound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdate, "", NULL }, { "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdate, "", NULL },
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetValue, "", NULL }, { "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValue, "", NULL },
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetValue, "", NULL }, { "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValue, "", NULL },
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMod32Value, "", NULL }, { "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32Value, "", NULL },
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleAnimCommand, "", NULL }, { "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugAnimCommand, "", NULL },
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleGetLootRecipient, "", NULL }, { "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipient, "", NULL },
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL }, { "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL }, { "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
{ "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendLargePacketCommand, "", NULL }, { "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendLargePacketCommand, "", NULL },
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetItemFlagCommand, "", NULL }, { "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemFlagCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand eventCommandTable[] = static ChatCommand eventCommandTable[] =
@ -230,7 +142,71 @@ ChatCommand * ChatHandler::getCommandTable()
{ "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL }, { "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL },
{ "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL }, { "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL },
{ "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL }, { "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL },
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL }, { "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gmCommandTable[] =
{
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleGMVisibleCommand, "", NULL },
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGMFlyModeCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand goCommandTable[] =
{
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL },
{ "creature", SEC_MODERATOR, false, &ChatHandler::HandleGoCreatureCommand, "", NULL },
{ "object", SEC_MODERATOR, false, &ChatHandler::HandleGoObjectCommand, "", NULL },
{ "trigger", SEC_MODERATOR, false, &ChatHandler::HandleGoTriggerCommand, "", NULL },
{ "graveyard", SEC_MODERATOR, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL },
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gobjectCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectAddCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectDeleteCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectMoveCommand, "", NULL },
{ "near", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectNearCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectPhaseCommand, "", NULL },
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTargetCommand, "", NULL },
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTurnCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand guildCommandTable[] =
{
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand honorCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddCommand, "", NULL },
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorUpdateCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand instanceCommandTable[] =
{
{ "listbinds", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
{ "unbind", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
{ "stats", SEC_ADMINISTRATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
{ "savedata", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
@ -249,9 +225,128 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand listCommandTable[] =
{
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupPlayerCommandTable[] =
{
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupCommandTable[] =
{
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand modifyCommandTable[] =
{
{ "hp", SEC_MODERATOR, false, &ChatHandler::HandleModifyHPCommand, "", NULL },
{ "mana", SEC_MODERATOR, false, &ChatHandler::HandleModifyManaCommand, "", NULL },
{ "rage", SEC_MODERATOR, false, &ChatHandler::HandleModifyRageCommand, "", NULL },
{ "runicpower", SEC_MODERATOR, false, &ChatHandler::HandleModifyRunicPowerCommand, "", NULL },
{ "energy", SEC_MODERATOR, false, &ChatHandler::HandleModifyEnergyCommand, "", NULL },
{ "money", SEC_MODERATOR, false, &ChatHandler::HandleModifyMoneyCommand, "", NULL },
{ "speed", SEC_MODERATOR, false, &ChatHandler::HandleModifySpeedCommand, "", NULL },
{ "swim", SEC_MODERATOR, false, &ChatHandler::HandleModifySwimCommand, "", NULL },
{ "scale", SEC_MODERATOR, false, &ChatHandler::HandleModifyScaleCommand, "", NULL },
{ "bit", SEC_MODERATOR, false, &ChatHandler::HandleModifyBitCommand, "", NULL },
{ "bwalk", SEC_MODERATOR, false, &ChatHandler::HandleModifyBWalkCommand, "", NULL },
{ "fly", SEC_MODERATOR, false, &ChatHandler::HandleModifyFlyCommand, "", NULL },
{ "aspeed", SEC_MODERATOR, false, &ChatHandler::HandleModifyASpeedCommand, "", NULL },
{ "faction", SEC_MODERATOR, false, &ChatHandler::HandleModifyFactionCommand, "", NULL },
{ "spell", SEC_MODERATOR, false, &ChatHandler::HandleModifySpellCommand, "", NULL },
{ "tp", SEC_MODERATOR, false, &ChatHandler::HandleModifyTalentCommand, "", NULL },
{ "titles", SEC_MODERATOR, false, &ChatHandler::HandleModifyKnownTitlesCommand, "", NULL },
{ "mount", SEC_MODERATOR, false, &ChatHandler::HandleModifyMountCommand, "", NULL },
{ "honor", SEC_MODERATOR, false, &ChatHandler::HandleModifyHonorCommand, "", NULL },
{ "rep", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyRepCommand, "", NULL },
{ "arena", SEC_MODERATOR, false, &ChatHandler::HandleModifyArenaCommand, "", NULL },
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleModifyDrunkCommand, "", NULL },
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyStandStateCommand, "", NULL },
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyMorphCommand, "", NULL },
{ "phase", SEC_ADMINISTRATOR, false, &ChatHandler::HandleModifyPhaseCommand, "", NULL },
{ "gender", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyGenderCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand npcCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
{ "allowmove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAllowMovementCommand, "", NULL },
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
{ "delitem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDelVendorItemCommand, "", NULL },
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
//{ TODO: fix or remove this commands
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
//}
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand pdumpCommandTable[] =
{
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpLoadCommand, "", NULL },
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpWriteCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand questCommandTable[] =
{
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestAdd, "", NULL },
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestComplete, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestRemove, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand reloadCommandTable[] = static ChatCommand reloadCommandTable[] =
{ {
{ "all", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllCommand, "", NULL }, { "all", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllCommand, "", NULL },
{ "all_area", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllAreaCommand, "", NULL },
{ "all_loot", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllLootCommand, "", NULL }, { "all_loot", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllLootCommand, "", NULL },
{ "all_npc", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllNpcCommand, "", NULL }, { "all_npc", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllNpcCommand, "", NULL },
{ "all_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllQuestCommand, "", NULL }, { "all_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllQuestCommand, "", NULL },
@ -325,49 +420,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand honorCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleAddHonorCommand, "", NULL },
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleUpdateHonorFieldsCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand guildCommandTable[] =
{
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupPlayerCommandTable[] =
{
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupCommandTable[] =
{
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand resetCommandTable[] = static ChatCommand resetCommandTable[] =
{ {
{ "achievements", SEC_ADMINISTRATOR, false, &ChatHandler::HandleResetAchievementsCommand, "", NULL }, { "achievements", SEC_ADMINISTRATOR, false, &ChatHandler::HandleResetAchievementsCommand, "", NULL },
@ -380,129 +432,80 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand castCommandTable[] = static ChatCommand serverIdleRestartCommandTable[] =
{ {
{ "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL }, { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
{ "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand pdumpCommandTable[] = static ChatCommand serverIdleShutdownCommandTable[] =
{ {
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadPDumpCommand, "", NULL }, { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandleWritePDumpCommand, "", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand listCommandTable[] = static ChatCommand serverRestartCommandTable[] =
{ {
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL }, { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL }
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL }, };
static ChatCommand serverShutdownCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverSetCommandTable[] =
{
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverCommandTable[] =
{
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand teleCommandTable[] = static ChatCommand teleCommandTable[] =
{ {
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddTeleCommand, "", NULL }, { "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleTeleAddCommand, "", NULL },
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleDelTeleCommand, "", NULL }, { "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleTeleDelCommand, "", NULL },
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleNameTeleCommand, "", NULL }, { "name", SEC_MODERATOR, true, &ChatHandler::HandleTeleNameCommand, "", NULL },
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleGroupTeleCommand, "", NULL }, { "group", SEC_MODERATOR, false, &ChatHandler::HandleTeleGroupCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleTeleCommand, "", NULL }, { "", SEC_MODERATOR, false, &ChatHandler::HandleTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand npcCommandTable[] = static ChatCommand unbanCommandTable[] =
{ {
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL }, { "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL }, { "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL },
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL }, { "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL },
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
//{ TODO: fix or remove this commands
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
//}
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
static ChatCommand goCommandTable[] = static ChatCommand wpCommandTable[] =
{ {
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL }, { "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
{ "creature", SEC_GAMEMASTER, false, &ChatHandler::HandleGoCreatureCommand, "", NULL }, { "add", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
{ "object", SEC_GAMEMASTER, false, &ChatHandler::HandleGoObjectCommand, "", NULL }, { "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
{ "trigger", SEC_GAMEMASTER, false, &ChatHandler::HandleGoTriggerCommand, "", NULL }, { "export", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpExportCommand, "", NULL },
{ "graveyard", SEC_GAMEMASTER, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL }, { "import", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpImportCommand, "", NULL },
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gobjectCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleDelObjectCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleMoveObjectCommand, "", NULL },
{ "near", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearObjectCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGOPhaseCommand, "", NULL },
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleTargetObjectCommand, "", NULL },
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleTurnObjectCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand questCommandTable[] =
{
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddQuest, "", NULL },
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCompleteQuest, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleRemoveQuest, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gmCommandTable[] =
{
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleVisibleCommand, "", NULL },
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlyModeCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand instanceCommandTable[] =
{
{ "listbinds", SEC_MODERATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
{ "unbind", SEC_MODERATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
{ "stats", SEC_MODERATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
{ "savedata", SEC_MODERATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
@ -561,7 +564,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ "plimit", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePLimitCommand, "", NULL }, { "plimit", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePLimitCommand, "", NULL },
{ "start", SEC_PLAYER, false, &ChatHandler::HandleStartCommand, "", NULL }, { "start", SEC_PLAYER, false, &ChatHandler::HandleStartCommand, "", NULL },
{ "taxicheat", SEC_MODERATOR, false, &ChatHandler::HandleTaxiCheatCommand, "", NULL }, { "taxicheat", SEC_MODERATOR, false, &ChatHandler::HandleTaxiCheatCommand, "", NULL },
{ "allowmove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAllowMovementCommand, "", NULL },
{ "linkgrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLinkGraveCommand, "", NULL }, { "linkgrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLinkGraveCommand, "", NULL },
{ "neargrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearGraveCommand, "", NULL }, { "neargrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearGraveCommand, "", NULL },
{ "explorecheat", SEC_ADMINISTRATOR, false, &ChatHandler::HandleExploreCheatCommand, "", NULL }, { "explorecheat", SEC_ADMINISTRATOR, false, &ChatHandler::HandleExploreCheatCommand, "", NULL },
@ -588,13 +590,13 @@ ChatCommand * ChatHandler::getCommandTable()
{ "rename", SEC_GAMEMASTER, true, &ChatHandler::HandleRenameCommand, "", NULL }, { "rename", SEC_GAMEMASTER, true, &ChatHandler::HandleRenameCommand, "", NULL },
{ "customize", SEC_GAMEMASTER, true, &ChatHandler::HandleCustomizeCommand, "", NULL }, { "customize", SEC_GAMEMASTER, true, &ChatHandler::HandleCustomizeCommand, "", NULL },
{ "loadscripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadScriptsCommand, "", NULL }, { "loadscripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadScriptsCommand, "", NULL },
{ "mute", SEC_GAMEMASTER, true, &ChatHandler::HandleMuteCommand, "", NULL }, { "mute", SEC_MODERATOR, true, &ChatHandler::HandleMuteCommand, "", NULL },
{ "unmute", SEC_GAMEMASTER, true, &ChatHandler::HandleUnmuteCommand, "", NULL }, { "unmute", SEC_MODERATOR, true, &ChatHandler::HandleUnmuteCommand, "", NULL },
{ "movegens", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMovegensCommand, "", NULL }, { "movegens", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMovegensCommand, "", NULL },
{ "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL }, { "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL },
{ "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL }, { "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL },
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL }, { "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
{ "flusharenapoints", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL }, { "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
{ "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL }, { "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL },
{ "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL }, { "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
{ "repairitems", SEC_GAMEMASTER, false, &ChatHandler::HandleRepairitemsCommand, "", NULL }, { "repairitems", SEC_GAMEMASTER, false, &ChatHandler::HandleRepairitemsCommand, "", NULL },
@ -614,28 +616,9 @@ ChatCommand * ChatHandler::getCommandTable()
{ {
Field *fields = result->Fetch(); Field *fields = result->Fetch();
std::string name = fields[0].GetCppString(); std::string name = fields[0].GetCppString();
for(uint32 i = 0; commandTable[i].Name != NULL; i++)
{ SetDataForCommandInTable(commandTable, name.c_str(), fields[1].GetUInt16(), fields[2].GetCppString(), name);
if (name == commandTable[i].Name)
{
commandTable[i].SecurityLevel = (uint16)fields[1].GetUInt16();
commandTable[i].Help = fields[2].GetCppString();
}
if(commandTable[i].ChildCommands != NULL)
{
ChatCommand *ptable = commandTable[i].ChildCommands;
for(uint32 j = 0; ptable[j].Name != NULL; j++)
{
// first case for "" named subcommand
if (ptable[j].Name[0]=='\0' && name == commandTable[i].Name ||
name == fmtstring("%s %s", commandTable[i].Name, ptable[j].Name) )
{
ptable[j].SecurityLevel = (uint16)fields[1].GetUInt16();
ptable[j].Help = fields[2].GetCppString();
}
}
}
}
} while(result->NextRow()); } while(result->NextRow());
delete result; delete result;
} }
@ -860,6 +843,61 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co
return false; return false;
} }
bool ChatHandler::SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand )
{
std::string cmd = "";
while (*text != ' ' && *text != '\0')
{
cmd += *text;
++text;
}
while (*text == ' ') ++text;
for(uint32 i = 0; table[i].Name != NULL; i++)
{
// for data fill use full explicit command names
if( table[i].Name != cmd )
continue;
// select subcommand from child commands list (including "")
if(table[i].ChildCommands != NULL)
{
if(SetDataForCommandInTable(table[i].ChildCommands, text, security, help, fullcommand))
return true;
else if(*text)
return false;
// fail with "" subcommands, then use normal level up command instead
}
// expected subcommand by full name DB content
else if(*text)
{
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.",text,fullcommand.c_str());
return false;
}
if(table[i].SecurityLevel != security)
sLog.outDetail("Table `command` overwrite for command '%s' default security (%u) by %u",fullcommand.c_str(),table[i].SecurityLevel,security);
table[i].SecurityLevel = security;
table[i].Help = help;
return true;
}
// in case "" command let process by caller
if(!cmd.empty())
{
if(table==getCommandTable())
sLog.outErrorDb("Table `command` have not existed command '%s', skip.",cmd.c_str());
else
sLog.outErrorDb("Table `command` have not existed subcommand '%s' in command '%s', skip.",cmd.c_str(),fullcommand.c_str());
}
return false;
}
int ChatHandler::ParseCommands(const char* text) int ChatHandler::ParseCommands(const char* text)
{ {
ASSERT(text); ASSERT(text);

View file

@ -80,6 +80,7 @@ class ChatHandler
void SendGlobalSysMessage(const char *str); void SendGlobalSysMessage(const char *str);
bool SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand );
bool ExecuteCommandInTable(ChatCommand *table, const char* text, const std::string& fullcommand); bool ExecuteCommandInTable(ChatCommand *table, const char* text, const std::string& fullcommand);
bool ShowHelpForCommand(ChatCommand *table, const char* cmd); bool ShowHelpForCommand(ChatCommand *table, const char* cmd);
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd); bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd);
@ -110,13 +111,13 @@ class ChatHandler
bool HandleNotifyCommand(const char* args); bool HandleNotifyCommand(const char* args);
bool HandleGMmodeCommand(const char* args); bool HandleGMmodeCommand(const char* args);
bool HandleGMChatCommand(const char* args); bool HandleGMChatCommand(const char* args);
bool HandleVisibleCommand(const char* args); bool HandleGMVisibleCommand(const char* args);
bool HandleGPSCommand(const char* args); bool HandleGPSCommand(const char* args);
bool HandleTaxiCheatCommand(const char* args); bool HandleTaxiCheatCommand(const char* args);
bool HandleWhispersCommand(const char* args); bool HandleWhispersCommand(const char* args);
bool HandleNameTeleCommand(const char* args); bool HandleTeleNameCommand(const char* args);
bool HandleGroupTeleCommand(const char* args); bool HandleTeleGroupCommand(const char* args);
bool HandleDrunkCommand(const char* args); bool HandleModifyDrunkCommand(const char* args);
bool HandleSendItemsCommand(const char* args); bool HandleSendItemsCommand(const char* args);
bool HandleSendMailCommand(const char* args); bool HandleSendMailCommand(const char* args);
bool HandleSendMoneyCommand(const char* args); bool HandleSendMoneyCommand(const char* args);
@ -298,13 +299,13 @@ class ChatHandler
bool HandleServerShutDownCommand(const char* args); bool HandleServerShutDownCommand(const char* args);
bool HandleServerShutDownCancelCommand(const char* args); bool HandleServerShutDownCancelCommand(const char* args);
bool HandleAddHonorCommand(const char* args); bool HandleHonorAddCommand(const char* args);
bool HandleHonorAddKillCommand(const char* args); bool HandleHonorAddKillCommand(const char* args);
bool HandleUpdateHonorFieldsCommand(const char* args); bool HandleHonorUpdateCommand(const char* args);
bool HandleLoadScriptsCommand(const char* args); bool HandleLoadScriptsCommand(const char* args);
bool HandleSendQuestPartyMsgCommand(const char* args); bool HandleDebugSendQuestPartyMsgCommand(const char* args);
bool HandleSendQuestInvalidMsgCommand(const char* args); bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
bool HandleDebugInArcCommand(const char* args); bool HandleDebugInArcCommand(const char* args);
bool HandleDebugSpellFailCommand(const char* args); bool HandleDebugSpellFailCommand(const char* args);
@ -312,17 +313,17 @@ class ChatHandler
bool HandleGUIDCommand(const char* args); bool HandleGUIDCommand(const char* args);
bool HandleItemMoveCommand(const char* args); bool HandleItemMoveCommand(const char* args);
bool HandleDeMorphCommand(const char* args); bool HandleDeMorphCommand(const char* args);
bool HandleSetPoiCommand(const char* args); bool HandleDebugSetPoiCommand(const char* args);
bool HandleEquipErrorCommand(const char* args); bool HandleDebugEquipErrorCommand(const char* args);
bool HandleGoCreatureCommand(const char* args); bool HandleGoCreatureCommand(const char* args);
bool HandleGoObjectCommand(const char* args); bool HandleGoObjectCommand(const char* args);
bool HandleGoTriggerCommand(const char* args); bool HandleGoTriggerCommand(const char* args);
bool HandleGoGraveyardCommand(const char* args); bool HandleGoGraveyardCommand(const char* args);
bool HandleTargetObjectCommand(const char* args); bool HandleGameObjectTargetCommand(const char* args);
bool HandleDelObjectCommand(const char* args); bool HandleGameObjectDeleteCommand(const char* args);
bool HandleMoveObjectCommand(const char* args); bool HandleGameObjectMoveCommand(const char* args);
bool HandleGOPhaseCommand(const char* args); bool HandleGameObjectPhaseCommand(const char* args);
bool HandleTurnObjectCommand(const char* args); bool HandleGameObjectTurnCommand(const char* args);
bool HandlePInfoCommand(const char* args); bool HandlePInfoCommand(const char* args);
bool HandlePLimitCommand(const char* args); bool HandlePLimitCommand(const char* args);
bool HandleMuteCommand(const char* args); bool HandleMuteCommand(const char* args);
@ -346,20 +347,20 @@ class ChatHandler
bool HandleGoXYZCommand(const char* args); bool HandleGoXYZCommand(const char* args);
bool HandleGoZoneXYCommand(const char* args); bool HandleGoZoneXYCommand(const char* args);
bool HandleGoGridCommand(const char* args); bool HandleGoGridCommand(const char* args);
bool HandleAllowMovementCommand(const char* args); bool HandleNpcAllowMovementCommand(const char* args);
bool HandleGoCommand(const char* args); bool HandleGoCommand(const char* args);
bool HandleCooldownCommand(const char* args); bool HandleCooldownCommand(const char* args);
bool HandleUnLearnCommand(const char* args); bool HandleUnLearnCommand(const char* args);
bool HandleGetDistanceCommand(const char* args); bool HandleGetDistanceCommand(const char* args);
bool HandleGameObjectCommand(const char* args); bool HandleGameObjectAddCommand(const char* args);
bool HandleAnimCommand(const char* args); bool HandleDebugAnimCommand(const char* args);
bool HandlePlaySoundCommand(const char* args); bool HandleDebugPlaySoundCommand(const char* args);
bool HandleStandStateCommand(const char* args); bool HandleModifyStandStateCommand(const char* args);
bool HandleDieCommand(const char* args); bool HandleDieCommand(const char* args);
bool HandleDamageCommand(const char *args); bool HandleDamageCommand(const char *args);
bool HandleReviveCommand(const char* args); bool HandleReviveCommand(const char* args);
bool HandleMorphCommand(const char* args); bool HandleModifyMorphCommand(const char* args);
bool HandleAuraCommand(const char* args); bool HandleAuraCommand(const char* args);
bool HandleUnAuraCommand(const char* args); bool HandleUnAuraCommand(const char* args);
bool HandleLinkGraveCommand(const char* args); bool HandleLinkGraveCommand(const char* args);
@ -377,13 +378,13 @@ class ChatHandler
bool HandleGuildUninviteCommand(const char* args); bool HandleGuildUninviteCommand(const char* args);
bool HandleGuildRankCommand(const char* args); bool HandleGuildRankCommand(const char* args);
bool HandleGuildDeleteCommand(const char* args); bool HandleGuildDeleteCommand(const char* args);
bool HandleUpdate(const char* args); bool HandleDebugUpdate(const char* args);
bool HandleBankCommand(const char* args); bool HandleBankCommand(const char* args);
bool HandleChangeWeather(const char* args); bool HandleChangeWeather(const char* args);
bool HandleKickPlayerCommand(const char * args); bool HandleKickPlayerCommand(const char * args);
bool HandleTeleCommand(const char * args); bool HandleTeleCommand(const char * args);
bool HandleAddTeleCommand(const char * args); bool HandleTeleAddCommand(const char * args);
bool HandleDelTeleCommand(const char * args); bool HandleTeleDelCommand(const char * args);
bool HandleListAurasCommand(const char * args); bool HandleListAurasCommand(const char * args);
bool HandleResetAchievementsCommand(const char * args); bool HandleResetAchievementsCommand(const char * args);
@ -402,7 +403,7 @@ class ChatHandler
bool HandleListCreatureCommand(const char* args); bool HandleListCreatureCommand(const char* args);
bool HandleListItemCommand(const char* args); bool HandleListItemCommand(const char* args);
bool HandleListObjectCommand(const char* args); bool HandleListObjectCommand(const char* args);
bool HandleNearObjectCommand(const char* args); bool HandleGameObjectNearCommand(const char* args);
bool HandlePasswordCommand(const char* args); bool HandlePasswordCommand(const char* args);
bool HandleLockAccountCommand(const char* args); bool HandleLockAccountCommand(const char* args);
bool HandleRespawnCommand(const char* args); bool HandleRespawnCommand(const char* args);
@ -411,18 +412,18 @@ class ChatHandler
bool HandleWpShowCommand(const char* args); bool HandleWpShowCommand(const char* args);
bool HandleWpExportCommand(const char* args); bool HandleWpExportCommand(const char* args);
bool HandleWpImportCommand(const char* args); bool HandleWpImportCommand(const char* args);
bool HandleFlyModeCommand(const char* args); bool HandleGMFlyModeCommand(const char* args);
bool HandleSendOpcodeCommand(const char* args); bool HandleDebugSendOpcodeCommand(const char* args);
bool HandleSellErrorCommand(const char* args); bool HandleDebugSellErrorCommand(const char* args);
bool HandleBuyErrorCommand(const char* args); bool HandleDebugBuyErrorCommand(const char* args);
bool HandleUpdateWorldStateCommand(const char* args); bool HandleDebugUpdateWorldStateCommand(const char* args);
bool HandlePlaySound2Command(const char* args); bool HandleDebugPlaySound2Command(const char* args);
bool HandleSendChannelNotifyCommand(const char* args); bool HandleDebugSendChannelNotifyCommand(const char* args);
bool HandleSendChatMsgCommand(const char* args); bool HandleDebugSendChatMsgCommand(const char* args);
bool HandleRenameCommand(const char * args); bool HandleRenameCommand(const char * args);
bool HandleCustomizeCommand(const char * args); bool HandleCustomizeCommand(const char * args);
bool HandleLoadPDumpCommand(const char *args); bool HandlePDumpLoadCommand(const char *args);
bool HandleWritePDumpCommand(const char *args); bool HandlePDumpWriteCommand(const char *args);
bool HandleCastCommand(const char *args); bool HandleCastCommand(const char *args);
bool HandleCastBackCommand(const char *args); bool HandleCastBackCommand(const char *args);
bool HandleCastDistCommand(const char *args); bool HandleCastDistCommand(const char *args);
@ -436,22 +437,22 @@ class ChatHandler
bool HandleWaterwalkCommand(const char* args); bool HandleWaterwalkCommand(const char* args);
//! Development Commands //! Development Commands
bool HandleSetValue(const char* args); bool HandleDebugSetValue(const char* args);
bool HandleGetValue(const char* args); bool HandleDebugGetValue(const char* args);
bool HandleSet32Bit(const char* args); bool HandleSet32Bit(const char* args);
bool HandleMod32Value(const char* args); bool HandleDebugMod32Value(const char* args);
bool HandleAddQuest(const char * args); bool HandleQuestAdd(const char * args);
bool HandleRemoveQuest(const char * args); bool HandleQuestRemove(const char * args);
bool HandleCompleteQuest(const char * args); bool HandleQuestComplete(const char * args);
bool HandleSaveAllCommand(const char* args); bool HandleSaveAllCommand(const char* args);
bool HandleGetItemState(const char * args); bool HandleDebugGetItemState(const char * args);
bool HandleGetLootRecipient(const char * args); bool HandleDebugGetLootRecipient(const char * args);
bool HandleDebugArenaCommand(const char * args); bool HandleDebugArenaCommand(const char * args);
bool HandleDebugBattlegroundCommand(const char * args); bool HandleDebugBattlegroundCommand(const char * args);
bool HandleSpawnVehicle(const char * args); bool HandleDebugSpawnVehicle(const char * args);
bool HandleSendLargePacketCommand(const char * args); bool HandleDebugSendLargePacketCommand(const char * args);
bool HandleSendSetPhaseShiftCommand(const char * args); bool HandleDebugSendSetPhaseShiftCommand(const char * args);
bool HandleSetItemFlagCommand(const char * args); bool HandleDebugSetItemFlagCommand(const char * args);
Player* getSelectedPlayer(); Player* getSelectedPlayer();
Creature* getSelectedCreature(); Creature* getSelectedCreature();

View file

@ -76,7 +76,7 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow,owner->GetName(),owner->GetPositionX(), owner->GetPositionY()); guidlow,owner->GetName(),owner->GetPositionX(), owner->GetPositionY());
return false; return false;
} }
@ -149,7 +149,7 @@ bool Corpse::LoadFromDB(uint32 guid, QueryResult *result)
if( ! result ) if( ! result )
{ {
sLog.outError("ERROR: Corpse (GUID: %u) not found in table `corpse`, can't load. ",guid); sLog.outError("Corpse (GUID: %u) not found in table `corpse`, can't load. ",guid);
return false; return false;
} }
@ -177,7 +177,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
if(!LoadValues( fields[5].GetString() )) if(!LoadValues( fields[5].GetString() ))
{ {
sLog.outError("ERROR: Corpse #%d have broken data in `data` field. Can't be loaded.",guid); sLog.outError("Corpse #%d have broken data in `data` field. Can't be loaded.",guid);
return false; return false;
} }
@ -185,7 +185,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
m_type = CorpseType(fields[7].GetUInt32()); m_type = CorpseType(fields[7].GetUInt32());
if(m_type >= MAX_CORPSE_TYPE) if(m_type >= MAX_CORPSE_TYPE)
{ {
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID())); sLog.outError("Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
return false; return false;
} }
uint32 instanceid = fields[8].GetUInt32(); uint32 instanceid = fields[8].GetUInt32();
@ -202,7 +202,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(),GUID_LOPART(GetOwnerGUID()),GetPositionX(),GetPositionY()); GetGUIDLow(),GUID_LOPART(GetOwnerGUID()),GetPositionX(),GetPositionY());
return false; return false;
} }

View file

@ -1252,7 +1252,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 team, const
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(Entry); CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(Entry);
if(!cinfo) if(!cinfo)
{ {
sLog.outErrorDb("Error: creature entry %u does not exist.", Entry); sLog.outErrorDb("Creature entry %u does not exist.", Entry);
return false; return false;
} }
m_originalEntry = Entry; m_originalEntry = Entry;
@ -1295,7 +1295,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",GetGUIDLow(),GetEntry(),GetPositionX(),GetPositionY()); sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",GetGUIDLow(),GetEntry(),GetPositionX(),GetPositionY());
return false; return false;
} }

View file

@ -59,7 +59,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effIndex,GetPositionX(),GetPositionY()); sLog.outError("DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effIndex,GetPositionX(),GetPositionY());
return false; return false;
} }

View file

@ -98,7 +98,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Gameobject (GUID: %u Entry: %u ) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y); sLog.outError("Gameobject (GUID: %u Entry: %u ) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
return false; return false;
} }
@ -557,7 +557,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
if( !data ) if( !data )
{ {
sLog.outErrorDb("ERROR: Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid); sLog.outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid);
return false; return false;
} }
@ -1300,11 +1300,13 @@ const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/) void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/)
{ {
int64 rotation = 0; static double const atan_pow = atan(pow(2.0f, -20.0f));
double f_rot1 = sin(GetOrientation() / 2.0f); double f_rot1 = sin(GetOrientation() / 2.0f);
int64 i_rot1 = int64(f_rot1 / atan(pow(2.0f, -20.0f))); double f_rot2 = cos(GetOrientation() / 2.0f);
rotation |= (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
int64 i_rot1 = int64(f_rot1 / atan_pow *(f_rot2 >= 0 ? 1.0f : -1.0f));
int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
//float f_rot2 = sin(0.0f / 2.0f); //float f_rot2 = sin(0.0f / 2.0f);
//int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f)); //int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f));
@ -1318,8 +1320,8 @@ void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3
if(rotation2==0.0f && rotation3==0.0f) if(rotation2==0.0f && rotation3==0.0f)
{ {
rotation2 = sin(GetOrientation()/2); rotation2 = f_rot1;
rotation3 = cos(GetOrientation()/2); rotation3 = f_rot2;
} }
SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rotation2); SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rotation2);

View file

@ -348,7 +348,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
if (!result) if (!result)
{ {
sLog.outError("ERROR: Item (GUID: %u owner: %u) not found in table `item_instance`, can't load. ",guid,GUID_LOPART(owner_guid)); sLog.outError("Item (GUID: %u owner: %u) not found in table `item_instance`, can't load. ",guid,GUID_LOPART(owner_guid));
return false; return false;
} }
@ -356,7 +356,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
if(!LoadValues(fields[0].GetString())) if(!LoadValues(fields[0].GetString()))
{ {
sLog.outError("ERROR: Item #%d have broken data in `data` field. Can't be loaded.",guid); sLog.outError("Item #%d have broken data in `data` field. Can't be loaded.",guid);
if (delete_result) delete result; if (delete_result) delete result;
return false; return false;
} }

View file

@ -223,7 +223,7 @@ bool ChatHandler::HandleGMChatCommand(const char* args)
} }
//Enable\Dissable Invisible mode //Enable\Dissable Invisible mode
bool ChatHandler::HandleVisibleCommand(const char* args) bool ChatHandler::HandleGMVisibleCommand(const char* args)
{ {
if (!*args) if (!*args)
{ {
@ -1972,7 +1972,7 @@ bool ChatHandler::HandleWhispersCommand(const char* args)
} }
//Play sound //Play sound
bool ChatHandler::HandlePlaySoundCommand(const char* args) bool ChatHandler::HandleDebugPlaySoundCommand(const char* args)
{ {
// USAGE: .debug playsound #soundid // USAGE: .debug playsound #soundid
// #soundid - ID decimal number from SoundEntries.dbc (1st column) // #soundid - ID decimal number from SoundEntries.dbc (1st column)
@ -2089,7 +2089,7 @@ bool ChatHandler::HandleSendMailCommand(const char* args)
} }
// teleport player to given game_tele.entry // teleport player to given game_tele.entry
bool ChatHandler::HandleNameTeleCommand(const char * args) bool ChatHandler::HandleTeleNameCommand(const char * args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -2166,7 +2166,7 @@ bool ChatHandler::HandleNameTeleCommand(const char * args)
} }
//Teleport group to given game_tele.entry //Teleport group to given game_tele.entry
bool ChatHandler::HandleGroupTeleCommand(const char * args) bool ChatHandler::HandleTeleGroupCommand(const char * args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -2557,7 +2557,7 @@ bool ChatHandler::HandleGoGridCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleDrunkCommand(const char* args) bool ChatHandler::HandleModifyDrunkCommand(const char* args)
{ {
if(!*args) return false; if(!*args) return false;

File diff suppressed because it is too large Load diff

View file

@ -882,21 +882,6 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleAllowMovementCommand(const char* /*args*/)
{
if(sWorld.getAllowMovement())
{
sWorld.SetAllowMovement(false);
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
}
else
{
sWorld.SetAllowMovement(true);
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
}
return true;
}
bool ChatHandler::HandleMaxSkillCommand(const char* /*args*/) bool ChatHandler::HandleMaxSkillCommand(const char* /*args*/)
{ {
Player* SelectedPlayer = getSelectedPlayer(); Player* SelectedPlayer = getSelectedPlayer();
@ -2368,47 +2353,6 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleNearObjectCommand(const char* args)
{
float distance = (!*args) ? 10 : atol(args);
uint32 count = 0;
Player* pl = m_session->GetPlayer();
QueryResult *result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, map, "
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
if (result)
{
do
{
Field *fields = result->Fetch();
uint32 guid = fields[0].GetUInt32();
uint32 entry = fields[1].GetUInt32();
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
float z = fields[4].GetFloat();
int mapid = fields[5].GetUInt16();
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
if(!gInfo)
continue;
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
++count;
} while (result->NextRow());
delete result;
}
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
return true;
}
bool ChatHandler::HandleListCreatureCommand(const char* args) bool ChatHandler::HandleListCreatureCommand(const char* args)
{ {
if(!*args) if(!*args)
@ -3228,7 +3172,7 @@ bool ChatHandler::HandleGuildDeleteCommand(const char* args)
bool ChatHandler::HandleGetDistanceCommand(const char* args) bool ChatHandler::HandleGetDistanceCommand(const char* args)
{ {
WorldObject* obj; WorldObject* obj = NULL;
if (*args) if (*args)
{ {
@ -3595,6 +3539,21 @@ bool ChatHandler::HandleNearGraveCommand(const char* args)
} }
//-----------------------Npc Commands----------------------- //-----------------------Npc Commands-----------------------
bool ChatHandler::HandleNpcAllowMovementCommand(const char* /*args*/)
{
if(sWorld.getAllowMovement())
{
sWorld.SetAllowMovement(false);
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
}
else
{
sWorld.SetAllowMovement(true);
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
}
return true;
}
bool ChatHandler::HandleNpcChangeEntryCommand(const char *args) bool ChatHandler::HandleNpcChangeEntryCommand(const char *args)
{ {
if(!args) if(!args)
@ -3984,7 +3943,7 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleUpdate(const char* args) bool ChatHandler::HandleDebugUpdate(const char* args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4084,7 +4043,7 @@ bool ChatHandler::HandleChangeWeather(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSetValue(const char* args) bool ChatHandler::HandleDebugSetValue(const char* args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4135,7 +4094,7 @@ bool ChatHandler::HandleSetValue(const char* args)
return true; return true;
} }
bool ChatHandler::HandleGetValue(const char* args) bool ChatHandler::HandleDebugGetValue(const char* args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4208,7 +4167,7 @@ bool ChatHandler::HandleSet32Bit(const char* args)
return true; return true;
} }
bool ChatHandler::HandleMod32Value(const char* args) bool ChatHandler::HandleDebugMod32Value(const char* args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4240,7 +4199,7 @@ bool ChatHandler::HandleMod32Value(const char* args)
return true; return true;
} }
bool ChatHandler::HandleAddTeleCommand(const char * args) bool ChatHandler::HandleTeleAddCommand(const char * args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4280,7 +4239,7 @@ bool ChatHandler::HandleAddTeleCommand(const char * args)
return true; return true;
} }
bool ChatHandler::HandleDelTeleCommand(const char * args) bool ChatHandler::HandleTeleDelCommand(const char * args)
{ {
if(!*args) if(!*args)
return false; return false;
@ -4878,7 +4837,7 @@ bool ChatHandler::HandleServerIdleShutDownCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleAddQuest(const char* args) bool ChatHandler::HandleQuestAdd(const char* args)
{ {
Player* player = getSelectedPlayer(); Player* player = getSelectedPlayer();
if(!player) if(!player)
@ -4932,7 +4891,7 @@ bool ChatHandler::HandleAddQuest(const char* args)
return true; return true;
} }
bool ChatHandler::HandleRemoveQuest(const char* args) bool ChatHandler::HandleQuestRemove(const char* args)
{ {
Player* player = getSelectedPlayer(); Player* player = getSelectedPlayer();
if(!player) if(!player)
@ -4982,7 +4941,7 @@ bool ChatHandler::HandleRemoveQuest(const char* args)
return true; return true;
} }
bool ChatHandler::HandleCompleteQuest(const char* args) bool ChatHandler::HandleQuestComplete(const char* args)
{ {
Player* player = getSelectedPlayer(); Player* player = getSelectedPlayer();
if(!player) if(!player)
@ -5574,7 +5533,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
return true; return true;
} }
bool ChatHandler::HandleFlyModeCommand(const char* args) bool ChatHandler::HandleGMFlyModeCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -5600,7 +5559,7 @@ bool ChatHandler::HandleFlyModeCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleLoadPDumpCommand(const char *args) bool ChatHandler::HandlePDumpLoadCommand(const char *args)
{ {
if(!args) if(!args)
return false; return false;
@ -5711,7 +5670,7 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args)
return true; return true;
} }
bool ChatHandler::HandleWritePDumpCommand(const char *args) bool ChatHandler::HandlePDumpWriteCommand(const char *args)
{ {
if(!args) if(!args)
return false; return false;

View file

@ -1737,7 +1737,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const
Cell xy_cell(xy_val); Cell xy_cell(xy_val);
if(xy_cell != cur_cell) if(xy_cell != cur_cell)
{ {
sLog.outError("ERROR: %s (GUID: %u) X: %f Y: %f (%s) in grid[%u,%u]cell[%u,%u] instead grid[%u,%u]cell[%u,%u]", sLog.outError("%s (GUID: %u) X: %f Y: %f (%s) in grid[%u,%u]cell[%u,%u] instead grid[%u,%u]cell[%u,%u]",
(c->GetTypeId()==TYPEID_PLAYER ? "Player" : "Creature"),c->GetGUIDLow(), (c->GetTypeId()==TYPEID_PLAYER ? "Player" : "Creature"),c->GetGUIDLow(),
c->GetPositionX(),c->GetPositionY(),(moved ? "final" : "original"), c->GetPositionX(),c->GetPositionY(),(moved ? "final" : "original"),
cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(), cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(),
@ -1946,7 +1946,7 @@ void Map::RemoveAllObjectsInRemoveList()
{ {
Corpse* corpse = ObjectAccessor::Instance().GetCorpse(*obj, obj->GetGUID()); Corpse* corpse = ObjectAccessor::Instance().GetCorpse(*obj, obj->GetGUID());
if (!corpse) if (!corpse)
sLog.outError("ERROR: Try delete corpse/bones %u that not in map", obj->GetGUIDLow()); sLog.outError("Try delete corpse/bones %u that not in map", obj->GetGUIDLow());
else else
Remove(corpse,true); Remove(corpse,true);
break; break;

View file

@ -1050,7 +1050,7 @@ void Object::RemoveByteFlag( uint16 index, uint8 offset, uint8 oldFlag )
bool Object::PrintIndexError(uint32 index, bool set) const bool Object::PrintIndexError(uint32 index, bool set) const
{ {
sLog.outError("ERROR: Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType); sLog.outError("Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);
// assert must fail after function call // assert must fail after function call
return false; return false;
@ -1490,7 +1490,7 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa
if(!pCreature->IsPositionValid()) if(!pCreature->IsPositionValid())
{ {
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY()); sLog.outError("Creature (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
delete pCreature; delete pCreature;
return NULL; return NULL;
} }

View file

@ -404,7 +404,7 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia)
{ {
//in fact this function is called from several places //in fact this function is called from several places
//even when player doesn't have a corpse, not an error //even when player doesn't have a corpse, not an error
//sLog.outError("ERROR: Try remove corpse that not in map for GUID %ul", player_guid); //sLog.outError("Try remove corpse that not in map for GUID %ul", player_guid);
return NULL; return NULL;
} }

View file

@ -146,7 +146,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
delete result; delete result;
return false; return false;
@ -704,7 +704,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
{ {
if(!creature) if(!creature)
{ {
sLog.outError("CRITICAL ERROR: NULL pointer parsed into CreateBaseAtCreature()"); sLog.outError("CRITICAL: NULL pointer parsed into CreateBaseAtCreature()");
return false; return false;
} }
uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET); uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET);
@ -721,7 +721,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
return false; return false;
} }
@ -729,7 +729,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
CreatureInfo const *cinfo = GetCreatureInfo(); CreatureInfo const *cinfo = GetCreatureInfo();
if(!cinfo) if(!cinfo)
{ {
sLog.outError("ERROR: CreateBaseAtCreature() failed, creatureInfo is missing!"); sLog.outError("CreateBaseAtCreature() failed, creatureInfo is missing!");
return false; return false;
} }
@ -771,7 +771,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
Unit* owner = GetOwner(); Unit* owner = GetOwner();
if(!owner) if(!owner)
{ {
sLog.outError("ERROR: attempt to summon pet (Entry %u) without owner! Attempt terminated.", cinfo->Entry); sLog.outError("attempt to summon pet (Entry %u) without owner! Attempt terminated.", cinfo->Entry);
return false; return false;
} }

View file

@ -4216,7 +4216,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityCostsEntry const *dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel); DurabilityCostsEntry const *dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
if(!dcost) if(!dcost)
{ {
sLog.outError("ERROR: RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel); sLog.outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
return TotalCost; return TotalCost;
} }
@ -4224,7 +4224,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityQualityEntry const *dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId); DurabilityQualityEntry const *dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
if(!dQualitymodEntry) if(!dQualitymodEntry)
{ {
sLog.outError("ERROR: RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId); sLog.outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
return TotalCost; return TotalCost;
} }
@ -4467,7 +4467,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{ {
if(modGroup >= BASEMOD_END || modType > MOD_END) if(modGroup >= BASEMOD_END || modType > MOD_END)
{ {
sLog.outError("ERROR: trial to access non existed BaseModGroup or wrong BaseModType!"); sLog.outError("trial to access non existed BaseModGroup or wrong BaseModType!");
return 0.0f; return 0.0f;
} }
@ -4481,7 +4481,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
{ {
if(modGroup >= BASEMOD_END) if(modGroup >= BASEMOD_END)
{ {
sLog.outError("ERROR: wrong BaseModGroup in GetTotalBaseModValue()!"); sLog.outError("wrong BaseModGroup in GetTotalBaseModValue()!");
return 0.0f; return 0.0f;
} }
@ -5493,7 +5493,7 @@ void Player::CheckExploreSystem()
if(offset >= 128) if(offset >= 128)
{ {
sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset); sLog.outError("Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
return; return;
} }
@ -13890,7 +13890,7 @@ bool Player::MinimalLoadFromDB( QueryResult *result, uint32 guid )
if(!LoadValues( fields[1].GetString())) if(!LoadValues( fields[1].GetString()))
{ {
sLog.outError("ERROR: Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid)); sLog.outError("Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid));
if(delete_result) delete result; if(delete_result) delete result;
return false; return false;
} }
@ -14085,7 +14085,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
if(!result) if(!result)
{ {
sLog.outError("ERROR: Player (GUID: %u) not found in table `characters`, can't load. ",guid); sLog.outError("Player (GUID: %u) not found in table `characters`, can't load. ",guid);
return false; return false;
} }
@ -14097,7 +14097,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// player should be able to load/delete character only with correct account! // player should be able to load/delete character only with correct account!
if( dbAccountId != GetSession()->GetAccountId() ) if( dbAccountId != GetSession()->GetAccountId() )
{ {
sLog.outError("ERROR: Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId); sLog.outError("Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId);
delete result; delete result;
return false; return false;
} }
@ -14116,7 +14116,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
if(!LoadValues( fields[2].GetString())) if(!LoadValues( fields[2].GetString()))
{ {
sLog.outError("ERROR: Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid)); sLog.outError("Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid));
delete result; delete result;
return false; return false;
} }
@ -14194,7 +14194,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation()); sLog.outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
RelocateToHomebind(); RelocateToHomebind();
transGUID = 0; transGUID = 0;
@ -14270,7 +14270,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// transport size limited // transport size limited
m_movementInfo.t_x > 50 || m_movementInfo.t_y > 50 || m_movementInfo.t_z > 50 ) m_movementInfo.t_x > 50 || m_movementInfo.t_y > 50 || m_movementInfo.t_z > 50 )
{ {
sLog.outError("ERROR: Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", sLog.outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",
guid,GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y, guid,GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y,
GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o); GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o);
@ -14308,7 +14308,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
if(!m_transport) if(!m_transport)
{ {
sLog.outError("ERROR: Player (guidlow %d) have problems with transport guid (%u). Teleport to default race/class locations.", sLog.outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to default race/class locations.",
guid,transGUID); guid,transGUID);
RelocateToHomebind(); RelocateToHomebind();

View file

@ -3396,6 +3396,22 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
data.append(m_target->GetPackGUID()); data.append(m_target->GetPackGUID());
data << uint32(0); data << uint32(0);
m_target->SendMessageToSet(&data,true); m_target->SendMessageToSet(&data,true);
// Summon the Naj'entus Spine GameObject on target if spell is Impaling Spine
if(GetId() == 39837)
{
GameObject* pObj = new GameObject;
if(pObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 185584, m_target->GetMap(), m_target->GetPhaseMask(),
m_target->GetPositionX(), m_target->GetPositionY(), m_target->GetPositionZ(), m_target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
{
pObj->SetRespawnTime(GetAuraDuration()/IN_MILISECONDS);
pObj->SetSpellId(GetId());
m_target->AddGameObject(pObj);
m_target->GetMap()->Add(pObj);
}
else
delete pObj;
}
} }
else else
{ {
@ -4233,142 +4249,152 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading()); bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
// Custom damage calculation after // Custom damage calculation after
if (!apply || loading) if (apply)
return;
Unit *caster = GetCaster();
if (!caster)
return;
switch (m_spellProto->SpellFamilyName)
{ {
case SPELLFAMILY_GENERIC: if(loading)
{ return;
// Pounce Bleed
if ( m_spellProto->SpellIconID == 147 && m_spellProto->SpellVisual[0] == 0 )
{
// $AP*0.18/6 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 / 100);
return;
}
break;
}
case SPELLFAMILY_WARRIOR:
{
// Rend
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
{
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 mws = caster->GetAttackTime(BASE_ATTACK);
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f);
return;
}
break;
}
case SPELLFAMILY_DRUID:
{
// Rake
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
{
// $AP*0.06 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return;
}
// Lacerate
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
{
// $AP*0.05/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
}
// Rip
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
{
// 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER)
return;
uint8 cp = ((Player*)caster)->GetComboPoints(); Unit *caster = GetCaster();
if (!caster)
return;
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs switch (m_spellProto->SpellFamilyName)
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY); {
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) case SPELLFAMILY_GENERIC:
{
// Pounce Bleed
if ( m_spellProto->SpellIconID == 147 && m_spellProto->SpellVisual[0] == 0 )
{ {
if((*itr)->GetId()==34241) // $AP*0.18/6 bonus per tick
{ m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 / 100);
m_modifier.m_amount += cp * (*itr)->GetModifier()->m_amount;
break;
}
}
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100);
return;
}
// Lock Jaw
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
{
// 0.15*$AP
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
return;
}
break;
}
case SPELLFAMILY_ROGUE:
{
// Rupture
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
{
if (caster->GetTypeId() != TYPEID_PLAYER)
return; return;
//1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs }
//2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs break;
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
uint8 cp = ((Player*)caster)->GetComboPoints();
if (cp > 5) cp = 5;
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
return;
} }
// Garrote case SPELLFAMILY_WARRIOR:
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
{ {
// $AP*0.07 bonus per tick // Rend
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100); if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
return; {
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 mws = caster->GetAttackTime(BASE_ATTACK);
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f);
return;
}
break;
} }
// Deadly Poison case SPELLFAMILY_DRUID:
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
{ {
// 0.08*$AP / 4 * amount of stack // Rake
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100); if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
return; {
// $AP*0.06 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return;
}
// Lacerate
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
{
// $AP*0.05/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
}
// Rip
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
{
// 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER)
return;
uint8 cp = ((Player*)caster)->GetComboPoints();
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
{
if((*itr)->GetId()==34241)
{
m_modifier.m_amount += cp * (*itr)->GetModifier()->m_amount;
break;
}
}
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100);
return;
}
// Lock Jaw
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
{
// 0.15*$AP
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
return;
}
break;
} }
break; case SPELLFAMILY_ROGUE:
{
// Rupture
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
{
if (caster->GetTypeId() != TYPEID_PLAYER)
return;
//1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs
//2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
uint8 cp = ((Player*)caster)->GetComboPoints();
if (cp > 5) cp = 5;
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
return;
}
// Garrote
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
{
// $AP*0.07 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
return;
}
// Deadly Poison
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
{
// 0.08*$AP / 4 * amount of stack
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
return;
}
break;
}
case SPELLFAMILY_HUNTER:
{
// Serpent Sting
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL)
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return;
}
// Immolation Trap
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678)
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return;
}
break;
}
default:
break;
} }
case SPELLFAMILY_HUNTER: }
{ // remove time effects
// Serpent Sting else
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL) {
{ // Parasitic Shadowfiend - handle summoning of two Shadowfiends on DoT expire
// $RAP*0.1/5 bonus per tick if(m_spellProto->Id == 41917)
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500); m_target->CastSpell(m_target, 41915, true);
return;
}
// Immolation Trap
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678)
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return;
}
break;
}
default:
break;
} }
} }

View file

@ -1367,6 +1367,20 @@ void Spell::EffectDummy(uint32 i)
} }
break; break;
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
// Starfall
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
{
switch(m_spellInfo->Id)
{
case 50286: m_caster->CastSpell(unitTarget, 50288, true); return;
case 53196: m_caster->CastSpell(unitTarget, 53191, true); return;
case 53197: m_caster->CastSpell(unitTarget, 53194, true); return;
case 53198: m_caster->CastSpell(unitTarget, 53195, true); return;
default:
sLog.outError("Spell::EffectDummy: Unhandeled Starfall spell rank %u",m_spellInfo->Id);
return;
}
}
break; break;
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
switch(m_spellInfo->Id ) switch(m_spellInfo->Id )
@ -3261,7 +3275,7 @@ void Spell::EffectSummon(uint32 i)
if(!spawnCreature->IsPositionValid()) if(!spawnCreature->IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY()); spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY());
delete spawnCreature; delete spawnCreature;
return; return;
@ -3694,7 +3708,7 @@ void Spell::EffectSummonGuardian(uint32 i)
if(!spawnCreature->IsPositionValid()) if(!spawnCreature->IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY()); spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY());
delete spawnCreature; delete spawnCreature;
return; return;
@ -4165,7 +4179,7 @@ void Spell::EffectSummonPet(uint32 i)
if(!NewSummon->IsPositionValid()) if(!NewSummon->IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
NewSummon->GetGUIDLow(), NewSummon->GetEntry(), NewSummon->GetPositionX(), NewSummon->GetPositionY()); NewSummon->GetGUIDLow(), NewSummon->GetEntry(), NewSummon->GetPositionX(), NewSummon->GetPositionY());
delete NewSummon; delete NewSummon;
return; return;
@ -5935,7 +5949,7 @@ void Spell::EffectSummonCritter(uint32 i)
if(!critter->IsPositionValid()) if(!critter->IsPositionValid())
{ {
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
critter->GetGUIDLow(), critter->GetEntry(), critter->GetPositionX(), critter->GetPositionY()); critter->GetGUIDLow(), critter->GetEntry(), critter->GetPositionX(), critter->GetPositionY());
delete critter; delete critter;
return; return;

View file

@ -222,7 +222,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_NORMAL; return SPELL_NORMAL;
} }
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2) bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2)
{ {
switch(spellSpec1) switch(spellSpec1)
{ {
@ -255,6 +255,19 @@ bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2)
} }
} }
bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec)
{
switch(spellId_spec)
{
case SPELL_BLESSING:
case SPELL_AURA:
case SPELL_CURSE:
return spellId_spec==i_spellId_spec;
default:
return false;
}
}
bool IsPositiveTarget(uint32 targetA, uint32 targetB) bool IsPositiveTarget(uint32 targetA, uint32 targetB)
{ {
// non-positive targets // non-positive targets

View file

@ -145,7 +145,8 @@ inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
} }
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2); int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2); bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2);
bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec);
bool IsPassiveSpell(uint32 spellId); bool IsPassiveSpell(uint32 spellId);
inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto) inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)

View file

@ -147,7 +147,7 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
if(!IsPositionValid()) if(!IsPositionValid())
{ {
sLog.outError("ERROR: Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow,x,y); guidlow,x,y);
return false; return false;
} }

View file

@ -3549,6 +3549,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId); SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId);
bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec); bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec);
bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellId_spec,i_spellId_spec);
if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() ) if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
{ {
@ -3570,6 +3571,25 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
else else
next = m_Auras.begin(); next = m_Auras.begin();
} }
else if( is_sspt && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId) )
{
// cannot remove higher rank
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
return false;
// Its a parent aura (create this aura in ApplyModifier)
if ((*i).second->IsInUse())
{
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
continue;
}
RemoveAurasDueToSpell(i_spellId);
if( m_Auras.empty() )
break;
else
next = m_Auras.begin();
}
else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) ) else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
{ {
// Its a parent aura (create this aura in ApplyModifier) // Its a parent aura (create this aura in ApplyModifier)
@ -4070,17 +4090,25 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
{ {
assert(gameObj && gameObj->GetOwnerGUID()==GetGUID()); assert(gameObj && gameObj->GetOwnerGUID()==GetGUID());
// GO created by some spell
if ( GetTypeId()==TYPEID_PLAYER && gameObj->GetSpellId() )
{
SpellEntry const* createBySpell = sSpellStore.LookupEntry(gameObj->GetSpellId());
// Need activate spell use for owner
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
((Player*)this)->SendCooldownEvent(createBySpell);
}
gameObj->SetOwnerGUID(0); gameObj->SetOwnerGUID(0);
// GO created by some spell
if (uint32 spellid = gameObj->GetSpellId())
{
RemoveAurasDueToSpell(spellid);
if (GetTypeId()==TYPEID_PLAYER)
{
SpellEntry const* createBySpell = sSpellStore.LookupEntry(spellid );
// Need activate spell use for owner
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
((Player*)this)->SendCooldownEvent(createBySpell);
}
}
m_gameObj.remove(gameObj); m_gameObj.remove(gameObj);
if(del) if(del)
{ {
gameObj->SetRespawnTime(0); gameObj->SetRespawnTime(0);
@ -5120,6 +5148,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 28810; triggered_spell_id = 28810;
break; break;
} }
// Glyph of Dispel Magic
case 55677:
{
if(!target->IsFriendlyTo(this))
return false;
basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
triggered_spell_id = 56131;
break;
}
} }
break; break;
} }
@ -9725,7 +9763,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
{ {
if( unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END) if( unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{ {
sLog.outError("ERROR: trial to access non existed modifier value from UnitMods!"); sLog.outError("trial to access non existed modifier value from UnitMods!");
return 0.0f; return 0.0f;
} }
@ -9755,7 +9793,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
{ {
if(unitMod >= UNIT_MOD_END) if(unitMod >= UNIT_MOD_END)
{ {
sLog.outError("ERROR: trial to access non existed UnitMods in GetTotalAuraModValue()!"); sLog.outError("trial to access non existed UnitMods in GetTotalAuraModValue()!");
return 0.0f; return 0.0f;
} }
@ -11185,7 +11223,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
if(!pet->InitStatsForLevel(level)) if(!pet->InitStatsForLevel(level))
{ {
sLog.outError("ERROR: Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry()); sLog.outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
delete pet; delete pet;
return NULL; return NULL;
} }

View file

@ -108,10 +108,10 @@ void WaypointManager::Load()
{ {
QueryResult *result1 = WorldDatabase.PQuery("SELECT id, map FROM creature WHERE guid = '%u'", id); QueryResult *result1 = WorldDatabase.PQuery("SELECT id, map FROM creature WHERE guid = '%u'", id);
if(result1) if(result1)
sLog.outErrorDb("ERROR: Creature (guidlow %d, entry %d) have invalid coordinates in his waypoint %d (X: %f, Y: %f).", sLog.outErrorDb("Creature (guidlow %d, entry %d) have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
id, result1->Fetch()[0].GetUInt32(), point, node.x, node.y); id, result1->Fetch()[0].GetUInt32(), point, node.x, node.y);
else else
sLog.outErrorDb("ERROR: Waypoint path %d, have invalid coordinates in his waypoint %d (X: %f, Y: %f).", sLog.outErrorDb("Waypoint path %d, have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
id, point, node.x, node.y); id, point, node.x, node.y);
MaNGOS::NormalizeMapCoord(node.x); MaNGOS::NormalizeMapCoord(node.x);
@ -327,7 +327,7 @@ void WaypointManager::CheckTextsExistance(std::set<int32>& ids)
{ {
if (!objmgr.GetMangosStringLocale(be->textid[j])) if (!objmgr.GetMangosStringLocale(be->textid[j]))
{ {
sLog.outErrorDb("ERROR: Some waypoint has textid%u with not existing %u text.", j, be->textid[j]); sLog.outErrorDb("Some waypoint has textid%u with not existing %u text.", j, be->textid[j]);
be->textid[j] = 0; be->textid[j] = 0;
++zeroCount; ++zeroCount;
continue; continue;

View file

@ -66,7 +66,7 @@ bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSetPoiCommand(const char* args) bool ChatHandler::HandleDebugSetPoiCommand(const char* args)
{ {
Player *pPlayer = m_session->GetPlayer(); Player *pPlayer = m_session->GetPlayer();
Unit* target = getSelectedUnit(); Unit* target = getSelectedUnit();
@ -92,7 +92,7 @@ bool ChatHandler::HandleSetPoiCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleEquipErrorCommand(const char* args) bool ChatHandler::HandleDebugEquipErrorCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -102,7 +102,7 @@ bool ChatHandler::HandleEquipErrorCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSellErrorCommand(const char* args) bool ChatHandler::HandleDebugSellErrorCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -112,7 +112,7 @@ bool ChatHandler::HandleSellErrorCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleBuyErrorCommand(const char* args) bool ChatHandler::HandleDebugBuyErrorCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -122,7 +122,7 @@ bool ChatHandler::HandleBuyErrorCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/) bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
{ {
Unit *unit = getSelectedUnit(); Unit *unit = getSelectedUnit();
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER)) if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
@ -199,7 +199,7 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
return true; return true;
} }
bool ChatHandler::HandleUpdateWorldStateCommand(const char* args) bool ChatHandler::HandleDebugUpdateWorldStateCommand(const char* args)
{ {
char* w = strtok((char*)args, " "); char* w = strtok((char*)args, " ");
char* s = strtok(NULL, " "); char* s = strtok(NULL, " ");
@ -213,7 +213,7 @@ bool ChatHandler::HandleUpdateWorldStateCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandlePlaySound2Command(const char* args) bool ChatHandler::HandleDebugPlaySound2Command(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -224,7 +224,7 @@ bool ChatHandler::HandlePlaySound2Command(const char* args)
} }
//Send notification in channel //Send notification in channel
bool ChatHandler::HandleSendChannelNotifyCommand(const char* args) bool ChatHandler::HandleDebugSendChannelNotifyCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -242,7 +242,7 @@ bool ChatHandler::HandleSendChannelNotifyCommand(const char* args)
} }
//Send notification in chat //Send notification in chat
bool ChatHandler::HandleSendChatMsgCommand(const char* args) bool ChatHandler::HandleDebugSendChatMsgCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -255,14 +255,14 @@ bool ChatHandler::HandleSendChatMsgCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSendQuestPartyMsgCommand(const char* args) bool ChatHandler::HandleDebugSendQuestPartyMsgCommand(const char* args)
{ {
uint32 msg = atol((char*)args); uint32 msg = atol((char*)args);
m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg); m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg);
return true; return true;
} }
bool ChatHandler::HandleGetLootRecipient(const char* /*args*/) bool ChatHandler::HandleDebugGetLootRecipient(const char* /*args*/)
{ {
Creature* target = getSelectedCreature(); Creature* target = getSelectedCreature();
if(!target) if(!target)
@ -272,14 +272,14 @@ bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
return true; return true;
} }
bool ChatHandler::HandleSendQuestInvalidMsgCommand(const char* args) bool ChatHandler::HandleDebugSendQuestInvalidMsgCommand(const char* args)
{ {
uint32 msg = atol((char*)args); uint32 msg = atol((char*)args);
m_session->GetPlayer()->SendCanTakeQuestResponse(msg); m_session->GetPlayer()->SendCanTakeQuestResponse(msg);
return true; return true;
} }
bool ChatHandler::HandleGetItemState(const char* args) bool ChatHandler::HandleDebugGetItemState(const char* args)
{ {
if (!args) if (!args)
return false; return false;
@ -525,7 +525,7 @@ bool ChatHandler::HandleDebugArenaCommand(const char * /*args*/)
return true; return true;
} }
bool ChatHandler::HandleSpawnVehicle(const char* args) bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -564,7 +564,7 @@ bool ChatHandler::HandleSpawnVehicle(const char* args)
if(!v->IsPositionValid()) if(!v->IsPositionValid())
{ {
sLog.outError("ERROR: Vehicle (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", sLog.outError("Vehicle (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
v->GetGUIDLow(), v->GetEntry(), v->GetPositionX(), v->GetPositionY()); v->GetGUIDLow(), v->GetEntry(), v->GetPositionX(), v->GetPositionY());
delete v; delete v;
return false; return false;
@ -575,7 +575,7 @@ bool ChatHandler::HandleSpawnVehicle(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/) bool ChatHandler::HandleDebugSendLargePacketCommand(const char* /*args*/)
{ {
const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. "; const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
std::ostringstream ss; std::ostringstream ss;
@ -585,7 +585,7 @@ bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/)
return true; return true;
} }
bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args) bool ChatHandler::HandleDebugSendSetPhaseShiftCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;
@ -595,7 +595,7 @@ bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args)
return true; return true;
} }
bool ChatHandler::HandleSetItemFlagCommand(const char* args) bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
{ {
if(!args) if(!args)
return false; return false;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7490" #define REVISION_NR "7507"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__