From 8c3fcea7a40c9210062395fd47d64b86e972d6e5 Mon Sep 17 00:00:00 2001 From: theluda Date: Mon, 27 Aug 2007 09:29:22 +0000 Subject: [PATCH] [4400] * sql/updates/Makefile.am: Added missing SQL updates. * sql/realmd.sql, sql/mangos.sql: Re-exported with mysqldump utility. * src/game/: A few modifications to make things look a bit more like MaNGOS style. --- sql/mangos.sql | 170 ++++++++++++++++------------- sql/realmd.sql | 24 ++-- sql/updates/4376_battleground_template.sql | 6 +- sql/updates/4392_battleground_template.sql | 4 +- sql/updates/4395_spell_chain.sql | 40 +++---- sql/updates/4397_command.sql | 30 ++--- sql/updates/Makefile.am | 4 + src/game/BattleGround.cpp | 26 ++--- src/game/BattleGround.h | 2 +- src/game/BattleGroundHandler.cpp | 6 +- src/game/BattleGroundRL.h | 92 ++++++++-------- src/game/Item.cpp | 16 +-- src/game/ItemPrototype.h | 1 - src/game/Level1.cpp | 20 ++-- src/game/Level2.cpp | 2 +- src/game/Level3.cpp | 2 +- src/game/Spell.cpp | 4 +- src/game/Unit.cpp | 2 +- src/game/UpdateFields.h | 69 ++++++++---- src/shared/Database/DBCStores.cpp | 26 ++--- 20 files changed, 293 insertions(+), 253 deletions(-) diff --git a/sql/mangos.sql b/sql/mangos.sql index 1a3e92ee..4465adc5 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -2,7 +2,7 @@ -- -- Host: localhost Database: mangos -- ------------------------------------------------------ --- Server version5.0.38-Ubuntu_0ubuntu1-log +-- Server version 5.0.38-Ubuntu_0ubuntu1-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -215,10 +215,10 @@ CREATE TABLE `battleground_template` ( LOCK TABLES `battleground_template` WRITE; /*!40000 ALTER TABLE `battleground_template` DISABLE KEYS */; INSERT INTO `battleground_template` VALUES -('1', '0', '0', '0', '611', '2.72532', '610','2.27452'), -('2', '0', '0', '0', '769', '3.14159', '770','3.14159'), -('3', '0', '0', '0', '890', '3.40156', '889','0.263892'), -('7', '0', '0', '0', '1103', '3.40156', '1104','0.263892'); +(1,0,0,0,611,2.72532,610,2.27452), +(2,0,0,0,769,3.14159,770,3.14159), +(3,0,0,0,890,3.40156,889,0.263892), +(7,0,0,0,1103,3.40156,1104,0.263892); /*!40000 ALTER TABLE `battleground_template` ENABLE KEYS */; UNLOCK TABLES; @@ -277,8 +277,8 @@ CREATE TABLE `character` ( `transguid` bigint(20) unsigned NOT NULL default '0', `gmstate` tinyint(3) unsigned NOT NULL default '0', `stable_slots` tinyint(1) unsigned NOT NULL default '0', - `rename` tinyint (3) unsigned NOT NULL default '0', - `zone` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `rename` tinyint(3) unsigned NOT NULL default '0', + `zone` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`), KEY `idx_account` (`account`), KEY `idx_online` (`online`) @@ -326,7 +326,7 @@ CREATE TABLE `character_aura` ( `caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier', `spell` int(11) unsigned NOT NULL default '0', `effect_index` int(11) unsigned NOT NULL default '0', - `amount` int(11) NOT NULL default '0', + `amount` int(11) NOT NULL default '0', `remaintime` int(11) NOT NULL default '0', PRIMARY KEY (`guid`,`spell`,`effect_index`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; @@ -462,7 +462,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `character_pet`; CREATE TABLE `character_pet` ( - `id` int(11) unsigned NOT NULL default '0', + `id` int(11) unsigned NOT NULL default '0', `entry` int(11) unsigned NOT NULL default '0', `owner` int(11) unsigned NOT NULL default '0', `modelid` int(11) unsigned default '0', @@ -702,8 +702,8 @@ INSERT INTO `command` VALUES ('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'), ('notify',1,'Syntax: .notify $MessageToBroadcast\r\n\r\nSend a global message to all players online in screen.'), ('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'), -('ban','3','Syntax is: ban $NameOrIp $bantime $reason\r\nBan account or IP and kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like "4d20h3s".'), -('unban','3','Syntax is: unban $NameOrIp\r\nUnban account or IP.'), +('ban',3,'Syntax is: ban $NameOrIp $bantime $reason\r\nBan account or IP and kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'), +('unban',3,'Syntax is: unban $NameOrIp\r\nUnban account or IP.'), ('bank',3,'Syntax: .bank\r\n\r\nShow your bank inventory.'), ('changelevel',2,'Syntax: .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.'), ('commands',0,'Syntax: .commands\r\n\r\nDisplay a list of available commands for your account level.'), @@ -725,9 +725,9 @@ INSERT INTO `command` VALUES ('factionid',2,'Syntax: .factionid #factionid\r\n\r\nSet the faction of the selected creature to #factionid.'), ('gameobject',3,'Syntax: .gameobject #id \r\n\r\nAdd a game object from game object templates to the world at your current location using the #id.\r\nlootID specifies the loot-template to be used and spawntimeSecs sets the spawntime, both are optional.'), ('getvalue',3,'Syntax: .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.'), -('gm', 1, 'Syntax: .gm on/off\r\n\r\nEnable or Disable GM MODE'), +('gm',1,'Syntax: .gm on/off\r\n\r\nEnable or Disable GM MODE'), ('gocreature',2,'Syntax: .gocreature #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.'), -('gogrid', '1', 'Syntax: .gogrid #gridX #gridY [#mapId]\n\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'), +('gogrid',1,'Syntax: .gogrid #gridX #gridY [#mapId]\n\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'), ('goobject',1,'Syntax: .goobject #object_guid\r\nTeleport your character to gameobject with guid #object_guid'), ('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.'), ('goxy',1,'Syntax: .goxy #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.'), @@ -831,8 +831,8 @@ INSERT INTO `command` VALUES ('transport',3,'Not yet implemented.'), ('turnobject',2,'Syntax: .turnobject #goguid \r\n\r\nSet for gameobject #goguid orientation same as current character orientation.'), ('unaura',3,'Syntax: .unaura #spellid\r\n\r\nRemove aura due to spell #spellid from the selected Unit.'), -('baninfo','3','Syntax is: baninfo \r\nWatch full information about a specific ban.'), -('banlist','3','Syntax is: banlist $NameOrIp\r\nsearches the banlist for a pattern.'), +('baninfo',3,'Syntax is: baninfo \r\nWatch full information about a specific ban.'), +('banlist',3,'Syntax is: banlist $NameOrIp\r\nsearches the banlist for a pattern.'), ('unlearn',3,'Syntax: .unlearn #startspell #endspell\r\n\r\nUnlearn for selected player the range of spells between id #startspell and #endspell. If no #endspell is provided, just unlearn spell of id #startspell.'), ('update',3,'Syntax: .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.'), ('visible',1,'Syntax: .visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'), @@ -868,7 +868,7 @@ CREATE TABLE `corpse` ( `instance` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`), KEY `idx_bones_flag` (`bones_flag`), - INDEX (`instance`) + KEY `instance` (`instance`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Death System'; -- @@ -1088,7 +1088,7 @@ CREATE TABLE `creature_respawn` ( `respawntime` bigint(40) NOT NULL default '0', `instance` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`,`instance`), - INDEX (`instance`) + KEY `instance` (`instance`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Grid Loading System'; -- @@ -1320,18 +1320,27 @@ CREATE TABLE `fishing_loot_template` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -- +-- Dumping data for table `fishing_loot_template` +-- + +LOCK TABLES `fishing_loot_template` WRITE; +/*!40000 ALTER TABLE `fishing_loot_template` DISABLE KEYS */; +/*!40000 ALTER TABLE `fishing_loot_template` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `game_event` -- DROP TABLE IF EXISTS `game_event`; CREATE TABLE `game_event` ( `entry` mediumint(8) unsigned NOT NULL COMMENT 'Entry of the game event', - `start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute start date, the event will never start before', - `end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute end date, the event will never start afler', - `occurence` bigint(20) unsigned NOT NULL DEFAULT '86400' COMMENT 'Delay in hours between occurences of the event', - `length` bigint(20) unsigned NOT NULL DEFAULT '43200' COMMENT 'Length in hours of the event', - `description` varchar(255) DEFAULT NULL COMMENT 'Description of the event displayed in console', - PRIMARY KEY (`entry`) + `start` timestamp NOT NULL default '0000-00-00 00:00:00' COMMENT 'Absolute start date, the event will never start before', + `end` timestamp NOT NULL default '0000-00-00 00:00:00' COMMENT 'Absolute end date, the event will never start afler', + `occurence` bigint(20) unsigned NOT NULL default '86400' COMMENT 'Delay in hours between occurences of the event', + `length` bigint(20) unsigned NOT NULL default '43200' COMMENT 'Length in hours of the event', + `description` varchar(255) default NULL COMMENT 'Description of the event displayed in console', + PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- @@ -1350,8 +1359,8 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `game_event_creature`; CREATE TABLE `game_event_creature` ( `guid` int(10) unsigned NOT NULL, - `event` mediumint(9) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', - PRIMARY KEY (`guid`) + `event` mediumint(9) NOT NULL default '0' COMMENT 'Put negatives values to remove during event', + PRIMARY KEY (`guid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- @@ -1370,8 +1379,8 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `game_event_gameobject`; CREATE TABLE `game_event_gameobject` ( `guid` int(10) unsigned NOT NULL, - `event` mediumint(9) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', - PRIMARY KEY (`guid`) + `event` mediumint(9) NOT NULL default '0' COMMENT 'Put negatives values to remove during event', + PRIMARY KEY (`guid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- @@ -1568,7 +1577,7 @@ CREATE TABLE `gameobject_respawn` ( `respawntime` bigint(40) NOT NULL default '0', `instance` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`,`instance`), - INDEX (`instance`) + KEY `instance` (`instance`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Grid Loading System'; -- @@ -1835,17 +1844,16 @@ INSERT INTO `instance_template` VALUES /*!40000 ALTER TABLE `instance_template` ENABLE KEYS */; UNLOCK TABLES; - -- -- Table structure for table `item_enchantment_template` -- DROP TABLE IF EXISTS `item_enchantment_template`; CREATE TABLE `item_enchantment_template` ( - `entry` int(11) unsigned NOT NULL DEFAULT '0', - `ench` int(10) unsigned NOT NULL DEFAULT '0', - `chance` float unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`,`ench`) + `entry` int(11) unsigned NOT NULL default '0', + `ench` int(10) unsigned NOT NULL default '0', + `chance` float unsigned NOT NULL default '0', + PRIMARY KEY (`entry`,`ench`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item Random Enchantment System'; -- @@ -2424,7 +2432,7 @@ CREATE TABLE `pet_aura` ( `caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier', `spell` int(11) unsigned NOT NULL default '0', `effect_index` int(11) unsigned NOT NULL default '0', - `amount` int(11) NOT NULL default '0', + `amount` int(11) NOT NULL default '0', `remaintime` int(11) NOT NULL default '0', PRIMARY KEY (`guid`,`spell`,`effect_index`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet System'; @@ -2710,7 +2718,7 @@ LOCK TABLES `pet_spell` WRITE; UNLOCK TABLES; -- --- Table structure for table `pet_spell` +-- Table structure for table `pet_spell_cooldown` -- DROP TABLE IF EXISTS `pet_spell_cooldown`; @@ -2736,13 +2744,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `petcreateinfo_spell`; CREATE TABLE `petcreateinfo_spell` ( - `entry` int(11) unsigned NOT NULL DEFAULT '0', - `Spell1` int(11) unsigned NOT NULL DEFAULT '0', - `Spell2` int(11) unsigned NOT NULL DEFAULT '0', - `Spell3` int(11) unsigned NOT NULL DEFAULT '0', - `Spell4` int(11) unsigned NOT NULL DEFAULT '0', - `FamilyPassive` int(11) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) + `entry` int(11) unsigned NOT NULL default '0', + `Spell1` int(11) unsigned NOT NULL default '0', + `Spell2` int(11) unsigned NOT NULL default '0', + `Spell3` int(11) unsigned NOT NULL default '0', + `Spell4` int(11) unsigned NOT NULL default '0', + `FamilyPassive` int(11) unsigned NOT NULL default '0', + PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet Create Spells'; -- @@ -9588,7 +9596,6 @@ LOCK TABLES `prospecting_loot_template` WRITE; /*!40000 ALTER TABLE `prospecting_loot_template` ENABLE KEYS */; UNLOCK TABLES; - -- -- Table structure for table `quest_end_scripts` -- @@ -9608,7 +9615,7 @@ CREATE TABLE `quest_end_scripts` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- --- Dumping data for table `scripts` +-- Dumping data for table `quest_end_scripts` -- LOCK TABLES `quest_end_scripts` WRITE; @@ -9635,7 +9642,7 @@ CREATE TABLE `quest_start_scripts` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- --- Dumping data for table `scripts` +-- Dumping data for table `quest_start_scripts` -- LOCK TABLES `quest_start_scripts` WRITE; @@ -9658,7 +9665,7 @@ CREATE TABLE `quest_template` ( `RequiredSkillValue` int(11) unsigned NOT NULL default '1', `RequiredRepFaction` int(11) unsigned NOT NULL default '0', `RequiredRepValue` int(11) unsigned NOT NULL default '0', - `SuggestedPlayers` int(11) unsigned NOT NULL DEFAULT '0', + `SuggestedPlayers` int(11) unsigned NOT NULL default '0', `LimitTime` int(11) unsigned NOT NULL default '0', `SpecialFlags` int(11) unsigned NOT NULL default '0', `PrevQuestId` int(11) NOT NULL default '0', @@ -9797,7 +9804,6 @@ LOCK TABLES `skinning_loot_template` WRITE; /*!40000 ALTER TABLE `skinning_loot_template` ENABLE KEYS */; UNLOCK TABLES; - -- -- Table structure for table `spell_affect` -- @@ -10479,8 +10485,8 @@ INSERT INTO `spell_affect` VALUES (31658,0,0,0,0,0,0,1,0), (31659,0,0,0,0,0,0,1,0), (31660,0,0,0,0,0,0,1,0), -(31670,0,0,0,0,0,0,0x500000200,0), -(31672,0,0,0,0,0,0,0x500000200,0), +(31670,0,0,0,0,0,0,21474836992,0), +(31672,0,0,0,0,0,0,21474836992,0), (31682,0,0,0,0,0,0,32,0), (31682,1,0,0,0,0,0,32,0), (31683,0,0,0,0,0,0,32,0), @@ -12333,8 +12339,6 @@ INSERT INTO `spell_chain` VALUES (35694,0,35694,1), (35698,35694,35694,2), (40120,33943,33943,2); - - /*!40000 ALTER TABLE `spell_chain` ENABLE KEYS */; UNLOCK TABLES; @@ -12479,6 +12483,10 @@ CREATE TABLE `spell_proc_event` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- +-- Dumping data for table `spell_proc_event` +-- + LOCK TABLES `spell_proc_event` WRITE; /*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */; INSERT INTO `spell_proc_event` VALUES @@ -12488,9 +12496,9 @@ INSERT INTO `spell_proc_event` VALUES (742,0,0,0,0,0,1,0), (905,0,0,0,0,0,1049602,0), (945,0,0,0,0,0,1049602,0), -(974,0,0,0,0,0,0x100402,0), +(974,0,0,0,0,0,1049602,0), (1120,0,0,0,0,0,4,0), -(2652, 0,0,0,0,0,0x2,0), +(2652,0,0,0,0,0,2,0), (2689,0,0,0,0,0,4,0), (3235,0,0,0,0,0,2,0), (3284,0,0,0,0,0,2,0), @@ -12682,7 +12690,7 @@ INSERT INTO `spell_proc_event` VALUES (12289,0,0,26,0,2,131072,0), (12292,0,0,0,0,0,128,0), (12298,0,0,0,0,0,64,0), -(12311,0,0,0,4,0x800,0x20000,0), +(12311,0,0,0,4,2048,131072,0), (12317,0,0,0,0,0,8658944,0), (12319,0,0,0,0,0,69632,0), (12322,0,0,0,0,0,1,0), @@ -12725,7 +12733,7 @@ INSERT INTO `spell_proc_event` VALUES (12849,0,0,0,0,0,69632,0), (12867,0,0,0,0,0,69632,0), (12947,0,0,0,0,0,1,0), -(12958,0,0,0,4,0x800,0x20000,0), +(12958,0,0,0,4,2048,131072,0), (12971,0,0,0,0,0,69632,0), (12972,0,0,0,0,0,69632,0), (12973,0,0,0,0,0,69632,0), @@ -12907,11 +12915,11 @@ INSERT INTO `spell_proc_event` VALUES (19228,0,0,0,0,64,131072,0), (19232,0,0,0,0,64,131072,0), (19233,0,0,0,0,64,131072,0), -(19261,0,0,0,0,0,0x2,0), -(19262,0,0,0,0,0,0x2,0), -(19264,0,0,0,0,0,0x2,0), -(19265,0,0,0,0,0,0x2,0), -(19266,0,0,0,0,0,0x2,0), +(19261,0,0,0,0,0,2,0), +(19262,0,0,0,0,0,2,0), +(19264,0,0,0,0,0,2,0), +(19265,0,0,0,0,0,2,0), +(19266,0,0,0,0,0,2,0), (19271,0,0,0,0,0,1048576,0), (19273,0,0,0,0,0,1048576,0), (19274,0,0,0,0,0,1048576,0), @@ -13066,7 +13074,7 @@ INSERT INTO `spell_proc_event` VALUES (24949,0,0,0,0,0,32,0), (25020,0,0,0,0,0,1026,0), (25023,0,0,0,0,0,2,0), -(25461,0,0,0,0,0,0x2,0), +(25461,0,0,0,0,0,2,0), (25469,0,0,0,0,0,1049602,0), (25472,0,0,0,0,0,1049602,0), (25477,0,0,0,0,0,1049602,0), @@ -13183,9 +13191,9 @@ INSERT INTO `spell_proc_event` VALUES (30080,0,0,0,0,0,2,0), (30081,0,0,0,0,0,2,0), (30160,0,0,0,0,0,65536,0), -(30299,36,0,0,0,0,0x100000,0), -(30301,36,0,0,0,0,0x100000,0), -(30302,36,0,0,0,0,0x100000,0), +(30299,36,0,0,0,0,1048576,0), +(30301,36,0,0,0,0,1048576,0), +(30302,36,0,0,0,0,1048576,0), (30339,0,0,0,0,0,1,0), (30482,0,0,0,0,0,32768,0), (30675,0,0,0,11,3,16384,0), @@ -13213,8 +13221,8 @@ INSERT INTO `spell_proc_event` VALUES (31833,0,0,0,10,2147483648,16384,0), (31835,0,0,0,10,2147483648,16384,0), (31836,0,0,0,10,2147483648,16384,0), -(32593,0,0,0,0,0,0x100402,0), -(32594,0,0,0,0,0,0x100402,0), +(32593,0,0,0,0,0,1049602,0), +(32594,0,0,0,0,0,1049602,0), (33012,0,0,0,0,0,4,0), (33014,0,0,0,0,0,4,0), (33089,0,0,0,0,0,64,0), @@ -13257,7 +13265,7 @@ INSERT INTO `spell_proc_event` VALUES (34916,32,0,0,0,0,32768,0), (34917,32,0,0,0,0,32768,0), (34935,0,0,0,0,0,2,0), -(34938,0,0,0,0,0,2,0), +(34938,0,0,0,0,0,2,0), (34939,0,0,0,0,0,2,0), (34948,0,0,0,0,0,4,0), (34949,0,0,0,0,0,4,0), @@ -13276,8 +13284,7 @@ INSERT INTO `spell_proc_event` VALUES (39437,4,0,0,0,0,16384,0), (40475,0,0,0,0,0,524289,3), (41434,0,0,0,0,0,1,2), -(42083,0,0,0,0,0,4198400,0); - +(42083,0,0,0,0,0,4198400,0); /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; @@ -13394,6 +13401,18 @@ CREATE TABLE `transports` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Transports'; +-- +-- Dumping data for table `transports` +-- + +LOCK TABLES `transports` WRITE; +/*!40000 ALTER TABLE `transports` DISABLE KEYS */; +/*!40000 ALTER TABLE `transports` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `uptime` +-- DROP TABLE IF EXISTS `uptime`; CREATE TABLE `uptime` ( @@ -13403,14 +13422,13 @@ CREATE TABLE `uptime` ( PRIMARY KEY (`starttime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; - -- --- Dumping data for table `transports` +-- Dumping data for table `uptime` -- -LOCK TABLES `transports` WRITE; -/*!40000 ALTER TABLE `transports` DISABLE KEYS */; -/*!40000 ALTER TABLE `transports` ENABLE KEYS */; +LOCK TABLES `uptime` WRITE; +/*!40000 ALTER TABLE `uptime` DISABLE KEYS */; +/*!40000 ALTER TABLE `uptime` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -13422,6 +13440,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2007-05-15 6:46:42 - +-- Dump completed on 2007-08-27 9:19:21 diff --git a/sql/realmd.sql b/sql/realmd.sql index 155520e7..89b88f8b 100644 --- a/sql/realmd.sql +++ b/sql/realmd.sql @@ -49,10 +49,10 @@ CREATE TABLE `account` ( LOCK TABLES `account` WRITE; /*!40000 ALTER TABLE `account` DISABLE KEYS */; INSERT INTO `account` VALUES -(1,'administrator',SHA1('ADMINISTRATOR:ADMINISTRATOR'),3,'','0','0','','2006-04-25 10:18:56','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), -(2,'gamemaster',SHA1('GAMEMASTER:GAMEMASTER'),2,'','0','0','','2006-04-25 10:18:56','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), -(3,'moderator',SHA1('MODERATOR:MODERATOR'),1,'','0','0','','2006-04-25 10:19:35','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), -(4,'player',SHA1('PLAYER:PLAYER'),0,'','0','0','','2006-04-25 10:19:35','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0); +(1,'administrator','a34b29541b87b7e4823683ce6c7bf6ae68beaaac',3,'','0','0','','2006-04-25 10:18:56','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), +(2,'gamemaster','7841e21831d7c6bc0b57fbe7151eb82bd65ea1f9',2,'','0','0','','2006-04-25 10:18:56','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), +(3,'moderator','a7f5fbff0b4eec2d6b6e78e38e8312e64d700008',1,'','0','0','','2006-04-25 10:19:35','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0), +(4,'player','3ce8a96d17c5ae88a30681024e86279f1a38c041',0,'','0','0','','2006-04-25 10:19:35','127.0.0.1',0,0,'0000-00-00 00:00:00',0,0,0); /*!40000 ALTER TABLE `account` ENABLE KEYS */; UNLOCK TABLES; @@ -62,12 +62,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `account_banned`; CREATE TABLE `account_banned` ( - `id` int(11) NOT NULL COMMENT 'Account id' default '0', - `bandate` bigint(40) NOT NULL default '0', + `id` int(11) NOT NULL default '0' COMMENT 'Account id', + `bandate` bigint(40) NOT NULL default '0', `unbandate` bigint(40) NOT NULL default '0', - `bannedby` VARCHAR(50) NOT NULL, - `banreason` VARCHAR(255) NOT NULL, - `active` TINYINT NOT NULL DEFAULT 1, + `bannedby` varchar(50) NOT NULL, + `banreason` varchar(255) NOT NULL, + `active` tinyint(4) NOT NULL default '1', PRIMARY KEY (`id`,`bandate`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Ban List'; @@ -89,8 +89,8 @@ CREATE TABLE `ip_banned` ( `ip` varchar(32) NOT NULL default '127.0.0.1', `bandate` bigint(40) NOT NULL, `unbandate` bigint(40) NOT NULL, - `bannedby` VARCHAR(50) NOT NULL DEFAULT '[Console]', - `banreason` VARCHAR(255) NOT NULL DEFAULT 'no reason', + `bannedby` varchar(50) NOT NULL default '[Console]', + `banreason` varchar(255) NOT NULL default 'no reason', PRIMARY KEY (`ip`,`bandate`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Banned IPs'; @@ -161,4 +161,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2007-04-23 8:56:41 +-- Dump completed on 2007-08-27 9:19:21 diff --git a/sql/updates/4376_battleground_template.sql b/sql/updates/4376_battleground_template.sql index d552456d..46738725 100644 --- a/sql/updates/4376_battleground_template.sql +++ b/sql/updates/4376_battleground_template.sql @@ -1,3 +1,3 @@ -DELETE FROM `battleground_template` WHERE `id` IN ('5', '6'); -INSERT INTO `battleground_template` VALUES ('5', '2', '10', '70', '939', '0', '940', '3.14159'); -INSERT INTO `battleground_template` VALUES ('6', '2', '10', '70', '0', '0', '0', '0'); +DELETE FROM `battleground_template` WHERE `id` IN ('5', '6'); +INSERT INTO `battleground_template` VALUES ('5', '2', '10', '70', '939', '0', '940', '3.14159'); +INSERT INTO `battleground_template` VALUES ('6', '2', '10', '70', '0', '0', '0', '0'); diff --git a/sql/updates/4392_battleground_template.sql b/sql/updates/4392_battleground_template.sql index 3607cec4..7187f1cd 100644 --- a/sql/updates/4392_battleground_template.sql +++ b/sql/updates/4392_battleground_template.sql @@ -1,2 +1,2 @@ -DELETE FROM `battleground_template` WHERE `id`='8'; -INSERT INTO `battleground_template` VALUES ('8', '2', '10', '70', '1258', '0', '1259', '3.14159'); +DELETE FROM `battleground_template` WHERE `id`='8'; +INSERT INTO `battleground_template` VALUES ('8', '2', '10', '70', '1258', '0', '1259', '3.14159'); diff --git a/sql/updates/4395_spell_chain.sql b/sql/updates/4395_spell_chain.sql index 52bd0856..fb5b7285 100644 --- a/sql/updates/4395_spell_chain.sql +++ b/sql/updates/4395_spell_chain.sql @@ -1,20 +1,20 @@ -DELETE FROM `spell_chain` WHERE `spell_id` IN (27149); -INSERT INTO `spell_chain` VALUES -(27149,10293,465,8); - -DELETE FROM `spell_chain` WHERE `spell_id` IN (27150); -INSERT INTO `spell_chain` VALUES -(27150,10301,7294,6); - -DELETE FROM `spell_chain` WHERE `spell_id` IN (27151); -INSERT INTO `spell_chain` VALUES -(27151,19896,19876,4); - -DELETE FROM `spell_chain` WHERE `spell_id` IN (27152); -INSERT INTO `spell_chain` VALUES -(27152,19898,19888,4); - -DELETE FROM `spell_chain` WHERE `spell_id` IN (27153); -INSERT INTO `spell_chain` VALUES -(27153,19900,19891,4); - +DELETE FROM `spell_chain` WHERE `spell_id` IN (27149); +INSERT INTO `spell_chain` VALUES +(27149,10293,465,8); + +DELETE FROM `spell_chain` WHERE `spell_id` IN (27150); +INSERT INTO `spell_chain` VALUES +(27150,10301,7294,6); + +DELETE FROM `spell_chain` WHERE `spell_id` IN (27151); +INSERT INTO `spell_chain` VALUES +(27151,19896,19876,4); + +DELETE FROM `spell_chain` WHERE `spell_id` IN (27152); +INSERT INTO `spell_chain` VALUES +(27152,19898,19888,4); + +DELETE FROM `spell_chain` WHERE `spell_id` IN (27153); +INSERT INTO `spell_chain` VALUES +(27153,19900,19891,4); + diff --git a/sql/updates/4397_command.sql b/sql/updates/4397_command.sql index 68c43006..ad554c52 100644 --- a/sql/updates/4397_command.sql +++ b/sql/updates/4397_command.sql @@ -1,15 +1,15 @@ -delete from command where name in('whisper2', 'nyi', 'prog', 'run','go', 'object', 'gmon', 'gmoff', 'worldport'); - -update command set name='playemote' where name='emote'; -update command set name='setmodel' where name='displayid'; -update command set name='listgm' where name='gmlist'; - -update command set security=1 where name in ('gogrid', 'goxy') ; -update command set security=2 where name in ('addgo', 'standstate', 'anim', 'morph'); - -delete from command where name in('textemote', 'taxicheat','gm','visible'); -INSERT INTO `command` VALUES -('textemote',3,'Syntax: .text #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'), -('taxicheat',1,'Syntax: .taxicheat on/off\r\n\r\nTemporary grant access or remove to all taxi routes for the selected character. If no character is selected, hide or reveal all routes to you.\r\n\r\nVisited taxi nodes sill accessible after removing access.'), -('visible',1,'Syntax: .visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'), -('gm', 1, 'Syntax: .gm on/off\r\n\r\nEnable or Disable GM MODE'); +delete from command where name in('whisper2', 'nyi', 'prog', 'run','go', 'object', 'gmon', 'gmoff', 'worldport'); + +update command set name='playemote' where name='emote'; +update command set name='setmodel' where name='displayid'; +update command set name='listgm' where name='gmlist'; + +update command set security=1 where name in ('gogrid', 'goxy') ; +update command set security=2 where name in ('addgo', 'standstate', 'anim', 'morph'); + +delete from command where name in('textemote', 'taxicheat','gm','visible'); +INSERT INTO `command` VALUES +('textemote',3,'Syntax: .text #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'), +('taxicheat',1,'Syntax: .taxicheat on/off\r\n\r\nTemporary grant access or remove to all taxi routes for the selected character. If no character is selected, hide or reveal all routes to you.\r\n\r\nVisited taxi nodes sill accessible after removing access.'), +('visible',1,'Syntax: .visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'), +('gm', 1, 'Syntax: .gm on/off\r\n\r\nEnable or Disable GM MODE'); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 29521c56..08a659de 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -421,6 +421,8 @@ pkgdata_DATA = \ 4369_battleground_template.sql \ 4376_battleground_template.sql \ 4392_battleground_template.sql \ + 4395_spell_chain.sql \ + 4397_command.sql \ README ## Additional files to include when running 'make dist' @@ -822,4 +824,6 @@ EXTRA_DIST = \ 4369_battleground_template.sql \ 4376_battleground_template.sql \ 4392_battleground_template.sql \ + 4395_spell_chain.sql \ + 4397_command.sql \ README diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 9d107948..e97051e3 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -963,18 +963,18 @@ bool BattleGround::AddSpiritGuide(float x, float y, float z, float o, uint32 tea objmgr.AddCreatureToGrid(guid, &data); m_SpiritGuides.push_back(MAKE_GUID(guid, HIGHGUID_UNIT)); -/* - // set some fields to off like values - pCreature->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, pCreature->GetGUID()); - // aura - pCreature->SetUInt32Value(UNIT_FIELD_AURA, SPELL_SPIRIT_HEAL_CHANNEL); - pCreature->SetUInt32Value(UNIT_FIELD_AURAFLAGS, 0x00000009); - pCreature->SetUInt32Value(UNIT_FIELD_AURALEVELS, 0x0000003C); - pCreature->SetUInt32Value(UNIT_FIELD_AURAAPPLICATIONS, 0x000000FF); - // casting visual effect - pCreature->SetUInt32Value(UNIT_CHANNEL_SPELL, SPELL_SPIRIT_HEAL_CHANNEL); - // correct cast speed - pCreature->SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); -*/ + /* + // set some fields to off like values + pCreature->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, pCreature->GetGUID()); + // aura + pCreature->SetUInt32Value(UNIT_FIELD_AURA, SPELL_SPIRIT_HEAL_CHANNEL); + pCreature->SetUInt32Value(UNIT_FIELD_AURAFLAGS, 0x00000009); + pCreature->SetUInt32Value(UNIT_FIELD_AURALEVELS, 0x0000003C); + pCreature->SetUInt32Value(UNIT_FIELD_AURAAPPLICATIONS, 0x000000FF); + // casting visual effect + pCreature->SetUInt32Value(UNIT_CHANNEL_SPELL, SPELL_SPIRIT_HEAL_CHANNEL); + // correct cast speed + pCreature->SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); + */ return true; } diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index afb7b631..299e573d 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -82,7 +82,7 @@ struct BattleGroundQueue bool IsInvited; // was invited flag uint32 LastOnlineTime; // for tracking and removing offline players from queue after 5 minutes bool IsRated; - bool AsGroup; // uint32 GroupId; + bool AsGroup; // uint32 GroupId; uint8 ArenaType; }; diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 392deda5..9d0698c6 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -54,17 +54,17 @@ void WorldSession::HandleBattleGroundHelloOpcode( WorldPacket & recv_data ) case 1216: bgid = 1; break; - // WSG Battlemaster + // WSG Battlemaster case 1641: case 1514: bgid = 2; break; - // AB Battlemaster + // AB Battlemaster case 1577: case 412: bgid = 3; break; - // todo: add more... + // todo: add more... } if(!strcmp(unit->GetCreatureInfo()->SubName, "Arena Battlemaster")) diff --git a/src/game/BattleGroundRL.h b/src/game/BattleGroundRL.h index 5ff4db00..1a297310 100644 --- a/src/game/BattleGroundRL.h +++ b/src/game/BattleGroundRL.h @@ -1,46 +1,46 @@ -/* - * Copyright (C) 2005,2006,2007 MaNGOS - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __BATTLEGROUNDRL_H -#define __BATTLEGROUNDRL_H - -class BattleGround; - -enum BattleGroundRLObjectTypes -{ - BG_RL_OBJECT_DOOR_1 = 0, - BG_RL_OBJECT_DOOR_2 = 1, - BG_RL_OBJECT_MAX = 2 -}; - -class BattleGroundRL : public BattleGround -{ - friend class BattleGroundMgr; - - public: - BattleGroundRL(); - ~BattleGroundRL(); - void Update(time_t diff); - void RemovePlayer(Player *plr, uint64 guid); - void HandleAreaTrigger(Player *Source, uint32 Trigger); - bool SetupBattleGround(); - void HandleKillPlayer(Player* player, Player *killer); - - private: - uint32 m_TeamKills[2]; // count of kills for each team -}; -#endif +/* + * Copyright (C) 2005,2006,2007 MaNGOS + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __BATTLEGROUNDRL_H +#define __BATTLEGROUNDRL_H + +class BattleGround; + +enum BattleGroundRLObjectTypes +{ + BG_RL_OBJECT_DOOR_1 = 0, + BG_RL_OBJECT_DOOR_2 = 1, + BG_RL_OBJECT_MAX = 2 +}; + +class BattleGroundRL : public BattleGround +{ + friend class BattleGroundMgr; + + public: + BattleGroundRL(); + ~BattleGroundRL(); + void Update(time_t diff); + void RemovePlayer(Player *plr, uint64 guid); + void HandleAreaTrigger(Player *Source, uint32 Trigger); + bool SetupBattleGround(); + void HandleKillPlayer(Player* player, Player *killer); + + private: + uint32 m_TeamKills[2]; // count of kills for each team +}; +#endif diff --git a/src/game/Item.cpp b/src/game/Item.cpp index bf955fa8..24c4de05 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -42,10 +42,10 @@ void AddItemsSetItem(Player*player,Item *item) for(size_t x = 0; x < player->ItemSetEff.size(); x++) if(player->ItemSetEff[x] && player->ItemSetEff[x]->setid == setid) - { - eff = player->ItemSetEff[x]; - break; - } + { + eff = player->ItemSetEff[x]; + break; + } if(!eff) { @@ -111,10 +111,10 @@ void RemoveItemsSetItem(Player*player,ItemPrototype const *proto) size_t setindex = 0; for(;setindex < player->ItemSetEff.size(); setindex++) if(player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->setid == setid) - { - eff = player->ItemSetEff[setindex]; - break; - } + { + eff = player->ItemSetEff[setindex]; + break; + } // can be in case now enough skill requirement for set appling but set has been appliend when skill requirement not enough if(!eff) diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index f0f188a3..e557e610 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -438,5 +438,4 @@ struct ItemPrototype #else #pragma pack(pop) #endif - #endif diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 319fca30..714047fb 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -124,17 +124,17 @@ bool ChatHandler::HandleNotifyCommand(const char* args) //Enable\Dissable GM Mode bool ChatHandler::HandleGMmodeCommand(const char* args) { - if(!*args) return false; + if(!*args) return false; std::string argstr = (char*)args; if (argstr == "on") - { + { m_session->GetPlayer()->SetGameMaster(true); m_session->SendNotification("GM mode is ON"); #ifdef _DEBUG_VMAPS - VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); - vMapManager->processCommand("stoplog"); + VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); + vMapManager->processCommand("stoplog"); #endif return true; } @@ -144,8 +144,8 @@ bool ChatHandler::HandleGMmodeCommand(const char* args) m_session->GetPlayer()->SetGameMaster(false); m_session->SendNotification("GM mode is OFF"); #ifdef _DEBUG_VMAPS - VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); - vMapManager->processCommand("startlog"); + VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); + vMapManager->processCommand("startlog"); #endif return true; } @@ -453,7 +453,7 @@ bool ChatHandler::HandleRecallCommand(const char* args) bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args) { if(!*args) - return false; + return false; uint32 titles = atoi((char*)args); @@ -745,7 +745,7 @@ bool ChatHandler::HandleModifyFactionCommand(const char* args) //Edit Player Spell bool ChatHandler::HandleModifySpellCommand(const char* args) { - if(!*args) return false; + if(!*args) return false; char* pspellflatid = strtok((char*)args, " "); if (!pspellflatid) return false; @@ -845,7 +845,7 @@ bool ChatHandler::HandleTaxiCheatCommand(const char* args) } return true; } - + if (argstr == "off") { chr->SetTaxiCheater(false); @@ -865,8 +865,6 @@ bool ChatHandler::HandleTaxiCheatCommand(const char* args) return false; } - - //Edit Player Aspeed bool ChatHandler::HandleModifyASpeedCommand(const char* args) { diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index baa1ae34..b3013d75 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -307,7 +307,7 @@ bool ChatHandler::HandleGoObjectCommand(const char* args) //teleport to creature bool ChatHandler::HandleGoCreatureCommand(const char* args) { - + if(!*args) return false; Player* _player = m_session->GetPlayer(); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 82267b95..fdbe46f8 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -2165,7 +2165,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args) bool ChatHandler::HandleCreateGuildCommand(const char* args) { - + if (!*args) return false; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f74f855d..39c37382 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -328,7 +328,7 @@ void Spell::FillTargetMap() // TargetA/TargetB dependent from each other, we not switch to full support this dependences // but need it support inn some know cases - if( m_spellInfo->EffectImplicitTargetA[i]==TARGET_ALL_AROUND_CASTER && + if( m_spellInfo->EffectImplicitTargetA[i]==TARGET_ALL_AROUND_CASTER && m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_PARTY) { SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap); @@ -874,7 +874,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list &TagUnitMap) Player* Target = itr->getSource(); // IsHostileTo check duel and controlled by enemy - if( Target && targetPlayer->IsWithinDistInMap(Target, radius) && + if( Target && targetPlayer->IsWithinDistInMap(Target, radius) && targetPlayer->getClass() == Target->getClass() && !m_caster->IsHostileTo(Target) ) { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4ccc2325..b7df9adb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6663,7 +6663,7 @@ struct ProcTriggeredData ProcTriggeredData(SpellEntry const * _spellInfo, uint32 _spellParam, Aura* _triggeredByAura) : spellInfo(_spellInfo), spellParam(_spellParam), triggeredByAura(_triggeredByAura), triggeredByAura_SpellPair(Unit::spellEffectPair(triggeredByAura->GetId(),triggeredByAura->GetEffIndex())) - {} + {} SpellEntry const * spellInfo; uint32 spellParam; diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index be8ecee3..c35b7c78 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -355,29 +355,52 @@ enum EUnitFields PLAYER_FIELD_COMBAT_RATING_1 = 0x0566, // 23 1 2 // custom // client names: - PLAYER_FIELD_ALL_WEAPONS_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1, // CR_WEAPON_SKILL - PLAYER_FIELD_DEFENCE_RATING = PLAYER_FIELD_COMBAT_RATING_1+1, // CR_DEFENSE_SKILL - PLAYER_FIELD_DODGE_RATING = PLAYER_FIELD_COMBAT_RATING_1+2, // CR_DODGE - PLAYER_FIELD_PARRY_RATING = PLAYER_FIELD_COMBAT_RATING_1+3, // CR_PARRY - PLAYER_FIELD_BLOCK_RATING = PLAYER_FIELD_COMBAT_RATING_1+4, // CR_BLOCK - PLAYER_FIELD_MELEE_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+5, // CR_HIT_MELEE - PLAYER_FIELD_RANGED_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+6, // CR_HIT_RANGED - PLAYER_FIELD_SPELL_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+7, // CR_HIT_SPELL - PLAYER_FIELD_MELEE_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+8, // CR_CRIT_MELEE - PLAYER_FIELD_RANGED_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+9, // CR_CRIT_RANGED - PLAYER_FIELD_SPELL_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+10,// CR_CRIT_SPELL - PLAYER_FIELD_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+11,// CR_HIT_TAKEN_MELEE - PLAYER_FIELD_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+12,// CR_HIT_TAKEN_RANGED - PLAYER_FIELD_UNK3_RATING = PLAYER_FIELD_COMBAT_RATING_1+13,// CR_HIT_TAKEN_SPELL - PLAYER_FIELD_UNK4_RATING = PLAYER_FIELD_COMBAT_RATING_1+14,// CR_CRIT_TAKEN_MELEE - PLAYER_FIELD_UNK5_RATING = PLAYER_FIELD_COMBAT_RATING_1+15,// CR_CRIT_TAKEN_RANGED - PLAYER_FIELD_RESILIENCE_RATING = PLAYER_FIELD_COMBAT_RATING_1+16,// CR_CRIT_TAKEN_SPELL - PLAYER_FIELD_MELEE_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+17,// CR_HASTE_MELEE - PLAYER_FIELD_RANGED_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+19,// CR_HASTE_RANGED - PLAYER_FIELD_SPELL_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+20,// CR_HASTE_SPELL - PLAYER_FIELD_MELEE_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+21,// CR_WEAPON_SKILL_MAINHAND - PLAYER_FIELD_OFFHAND_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+22,// CR_WEAPON_SKILL_OFFHAND - PLAYER_FIELD_RANGED_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+23,// CR_WEAPON_SKILL_RANGED + // CR_WEAPON_SKILL + PLAYER_FIELD_ALL_WEAPONS_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1, + // CR_DEFENSE_SKILL + PLAYER_FIELD_DEFENCE_RATING = PLAYER_FIELD_COMBAT_RATING_1+1, + // CR_DODGE + PLAYER_FIELD_DODGE_RATING = PLAYER_FIELD_COMBAT_RATING_1+2, + // CR_PARRY + PLAYER_FIELD_PARRY_RATING = PLAYER_FIELD_COMBAT_RATING_1+3, + // CR_BLOCK + PLAYER_FIELD_BLOCK_RATING = PLAYER_FIELD_COMBAT_RATING_1+4, + // CR_HIT_MELEE + PLAYER_FIELD_MELEE_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+5, + // CR_HIT_RANGED + PLAYER_FIELD_RANGED_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+6, + // CR_HIT_SPELL + PLAYER_FIELD_SPELL_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+7, + // CR_CRIT_MELEE + PLAYER_FIELD_MELEE_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+8, + // CR_CRIT_RANGED + PLAYER_FIELD_RANGED_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+9, + // CR_CRIT_SPELL + PLAYER_FIELD_SPELL_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+10, + // CR_HIT_TAKEN_MELEE + PLAYER_FIELD_HIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+11, + // CR_HIT_TAKEN_RANGED + PLAYER_FIELD_CRIT_RATING = PLAYER_FIELD_COMBAT_RATING_1+12, + // CR_HIT_TAKEN_SPELL + PLAYER_FIELD_UNK3_RATING = PLAYER_FIELD_COMBAT_RATING_1+13, + // CR_CRIT_TAKEN_MELEE + PLAYER_FIELD_UNK4_RATING = PLAYER_FIELD_COMBAT_RATING_1+14, + // CR_CRIT_TAKEN_RANGED + PLAYER_FIELD_UNK5_RATING = PLAYER_FIELD_COMBAT_RATING_1+15, + // CR_CRIT_TAKEN_SPELL + PLAYER_FIELD_RESILIENCE_RATING = PLAYER_FIELD_COMBAT_RATING_1+16, + // CR_HASTE_MELEE + PLAYER_FIELD_MELEE_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+17, + // CR_HASTE_RANGED + PLAYER_FIELD_RANGED_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+19, + // CR_HASTE_SPELL + PLAYER_FIELD_SPELL_HASTE_RATING = PLAYER_FIELD_COMBAT_RATING_1+20, + // CR_WEAPON_SKILL_MAINHAND + PLAYER_FIELD_MELEE_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+21, + // CR_WEAPON_SKILL_OFFHAND + PLAYER_FIELD_OFFHAND_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+22, + // CR_WEAPON_SKILL_RANGED + PLAYER_FIELD_RANGED_WEAPON_SKILL_RATING = PLAYER_FIELD_COMBAT_RATING_1+23, PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = 0x057D, // 15 1 2 diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp index ebc84b8d..9c7435f3 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/shared/Database/DBCStores.cpp @@ -430,13 +430,13 @@ bool IsSealSpell(uint32 spellId) bool CanCastWhileMounted(uint32 spellId) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); + SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); - if(!spellInfo) - return false; + if(!spellInfo) + return false; - return (spellInfo->Attributes == 151322624 && spellInfo->AttributesEx2 == 16 && spellInfo->AttributesExEx == 2097152) || - (spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellFamilyFlags == 0x800000); + return (spellInfo->Attributes == 151322624 && spellInfo->AttributesEx2 == 16 && spellInfo->AttributesExEx == 2097152) || + (spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellFamilyFlags == 0x800000); } SpellSpecific GetSpellSpecific(uint32 spellId) @@ -588,7 +588,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex) return false; // non-positive aura use - if( spellproto->Effect[effIndex]==6 /*SPELL_EFFECT_APPLY_AURA*/ || + if( spellproto->Effect[effIndex]==6 /*SPELL_EFFECT_APPLY_AURA*/ || spellproto->Effect[effIndex]==128 /*SPELL_EFFECT_APPLY_AURA_NEW2*/ ) { switch(spellproto->EffectApplyAuraName[effIndex]) @@ -631,13 +631,13 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex) case 95 /*SPELL_AURA_GHOST*/: return false; case 33 /*SPELL_AURA_MOD_DECREASE_SPEED*/: // used in positive spells also - // part of positive spell if casted at self - if(spellproto->EffectImplicitTargetA[effIndex] != 1/*TARGET_SELF*/) - return false; - // but not this if this first effect (don't found batter check) - if(spellproto->Attributes & 0x4000000 && effIndex==0) - return false; - break; + // part of positive spell if casted at self + if(spellproto->EffectImplicitTargetA[effIndex] != 1/*TARGET_SELF*/) + return false; + // but not this if this first effect (don't found batter check) + if(spellproto->Attributes & 0x4000000 && effIndex==0) + return false; + break; case 77 /*SPELL_AURA_MECHANIC_IMMUNITY*/: { // non-positive immunities -- 2.11.4.GIT