diff --git a/sql/mangos.sql b/sql/mangos.sql index 2ed073452..b529fb552 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, - `required_6944_01_mangos_mangos_string` bit(1) default NULL + `required_6961_01_mangos_command` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -343,6 +343,7 @@ INSERT INTO `command` VALUES ('modify mount',1,'Syntax:\r\n.modify mount #id #speed\r\nDisplay selected player as mounted at #id creature and set speed to #speed value.'), ('modify rage',1,'Syntax: .modify rage #newrage\r\n\r\nModify the rage of the selected player. If no player is selected, modify your rage.'), ('modify rep',2,'Syntax: .modify rep #repId (#repvalue | $rankname [#delta])\r\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\r\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\r\nYou can use \'.pinfo rep\' to list all known reputation ids, or use \'.lookup faction $name\' to locate a specific faction id.'), +('modify runicpower',1,'Syntax: .modify runicpower #newrunicpower\r\n\r\nModify the runic power of the selected player. If no player is selected, modify your runic power.'), ('modify scale',1,''), ('modify speed',1,'Syntax:\r\n.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,''), @@ -385,7 +386,6 @@ INSERT INTO `command` VALUES ('quest complete',3,'Syntax: .quest complete #questid\r\nMark all quest objectives as completed for target character active quest. After this target character can go and get quest reward.'), ('quest remove',3,'Syntax: .quest remove #quest_id\r\n\r\nSet quest #quest_id state to not completed and not active (and remove from active quest list) for selected player.'), ('recall',1,'Syntax: .recall [$playername]\r\n\r\nTeleport $playername or selected player to the place where he has been before last use of a teleportation command. If no $playername is entered and no player is selected, it will teleport you.'), -('reload',3,'Syntax: .reload table_name\r\n\r\nReload table `table_name` if reload support added for this table and this table can be _safe_ reloaded.'), ('reload all',3,'Syntax: .reload all\r\n\r\nReload all tables with reload support added and that can be _safe_ reloaded.'), ('reload all_area',3,'Syntax: .reload all_area\r\n\r\nReload all `areatrigger_*` tables if reload support added for this table and this table can be _safe_ reloaded.'), ('reload all_loot',3,'Syntax: .reload all_loot\r\n\r\nReload all `*_loot_template` tables. This can be slow operation with lags for server run.'), @@ -2330,6 +2330,8 @@ INSERT INTO `mangos_string` VALUES (169,'Mail sent to %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (170,'You try to hear sound %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (172,'server console command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(173,'You changed runic power of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(174,'%s changed your runic power to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (200,'No selection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (201,'Object GUID is: lowpart %u highpart %X',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (202,'The name was too long by %i characters.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), @@ -15931,13 +15933,13 @@ DROP TABLE IF EXISTS `spell_proc_event`; CREATE TABLE `spell_proc_event` ( `entry` smallint(5) unsigned NOT NULL default '0', `SchoolMask` tinyint(4) NOT NULL default '0', - `Category` smallint(6) NOT NULL default '0', - `SkillID` smallint(6) NOT NULL default '0', `SpellFamilyName` smallint(5) unsigned NOT NULL default '0', `SpellFamilyMask` bigint(20) unsigned NOT NULL default '0', `procFlags` int(10) unsigned NOT NULL default '0', + `procEx` int(10) unsigned NOT NULL default '0', `ppmRate` float NOT NULL default '0', - `cooldown` int(10) unsigned NOT NULL default '0', + `CustomChance` float NOT NULL default '0', + `Cooldown` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -15948,1004 +15950,687 @@ CREATE TABLE `spell_proc_event` ( LOCK TABLES `spell_proc_event` WRITE; /*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */; INSERT INTO `spell_proc_event` VALUES -(168,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(324,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(325,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(588,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(602,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(742,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(905,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(945,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(974,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(1006,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(1120,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(2565,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(2652,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3235,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3284,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3338,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3394,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3417,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3418,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3424,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3436,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3439,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(3440,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3509,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3512,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3582,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3616,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(3637,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4070,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4112,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4113,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4114,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4115,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4133,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4136,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4138,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4140,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4142,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(4144,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4241,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4242,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4245,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4279,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4283,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4284,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4315,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4317,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4493,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(4525,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4932,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(4951,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5104,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5118,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(5202,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5205,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5262,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5301,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(5364,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5368,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5369,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5370,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(5377,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5427,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5680,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(5728,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(5811,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(6268,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6397,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(6398,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(6399,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(6433,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(6645,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6750,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6752,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6866,0,0,0,0,0x0000000000000000,0x00000072,0,0), -(6867,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6870,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(6871,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6909,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6921,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6923,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6947,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(6961,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7095,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7098,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7102,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7103,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7128,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(7131,0,0,0,0,0x0000000000000000,0x000A22A8,0,0), -(7137,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7276,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7300,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7301,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7302,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7320,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7445,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7446,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7486,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7617,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(7619,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(7711,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7721,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7722,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7723,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7724,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7725,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7726,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7806,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7807,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7808,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(7849,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(7999,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(8134,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(8224,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(8247,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(8260,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(8288,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(8289,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(8397,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(8601,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(8612,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(8788,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(8852,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(8876,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(8981,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(9084,0,0,0,0,0x0000000000000000,0x00000008,0,0), -(9160,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(9233,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(9276,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(9452,0,0,0,0,0x0000000000000000,0x00000014,3,0), -(9460,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(9463,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(9778,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(9782,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(9784,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(9799,0,0,0,0,0x0000000000000000,0x00040000,0,0), -(10022,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(10092,0,0,0,0,0x0000000000000000,0x00000080,0,0), -(10219,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(10220,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(10425,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(10426,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(10431,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(10432,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(10951,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(10952,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(11103,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(11119,4,0,0,0,0x0000000000000000,0x00010000,0,0), -(11120,4,0,0,0,0x0000000000000000,0x00010000,0,0), -(11129,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(11180,16,0,0,0,0x0000000000000000,0x00020000,0,0), -(11185,0,0,0,3,0x0000000000000080,0x00020000,0,0), -(11213,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(11255,0,0,0,3,0x0000000000004000,0x00004000,0,0), -(11371,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(11441,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(11675,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(11919,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(11959,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(11964,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(11984,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12099,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12169,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12246,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(12254,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12281,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12284,0,0,0,0,0x0000000000000000,0x00000001,0.33252,0), -(12289,0,0,26,0,0x0000000000000002,0x00020000,0,0), -(12292,0,0,0,0,0x0000000000000000,0x00000080,0,0), -(12298,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12311,0,0,0,4,0x0000000000000800,0x00020000,0,0), -(12317,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(12319,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12322,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(12328,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12357,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(12358,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(12359,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(12360,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(12487,0,0,0,3,0x0000000000000080,0x00020000,0,0), -(12488,0,0,0,3,0x0000000000000080,0x00020000,0,0), -(12529,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(12539,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12544,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(12550,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(12556,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(12574,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(12575,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(12576,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(12577,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(12598,0,0,0,3,0x0000000000004000,0x00004000,0,0), -(12668,0,0,26,0,0x0000000000000002,0x00020000,0,0), -(12701,0,0,0,0,0x0000000000000000,0x00000001,0.66504,0), -(12702,0,0,0,0,0x0000000000000000,0x00000001,0.99756,0), -(12703,0,0,0,0,0x0000000000000000,0x00000001,1.33008,0), -(12704,0,0,0,0,0x0000000000000000,0x00000001,1.6626,0), -(12724,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12725,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12726,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12727,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12782,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(12787,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12797,0,0,0,0,0x0000000000000400,0x00020000,0,0), -(12799,0,0,0,0,0x0000000000000400,0x00020000,0,0), -(12800,0,0,0,0,0x0000000000000400,0x00020000,0,0), -(12812,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12813,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12814,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12815,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12834,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12846,4,0,0,0,0x0000000000000000,0x00010000,0,0), -(12847,4,0,0,0,0x0000000000000000,0x00010000,0,0), -(12848,4,0,0,0,0x0000000000000000,0x00010000,0,0), -(12849,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12867,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12947,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(12958,0,0,0,4,0x0000000000000800,0x00020000,0,0), -(12966,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12967,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12968,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12969,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12970,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(12971,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12972,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12973,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12974,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(12999,0,0,0,0,0x0000000000000000,0x00000001,4,0), -(13000,0,0,0,0,0x0000000000000000,0x00000001,6,0), -(13001,0,0,0,0,0x0000000000000000,0x00000001,8,0), -(13002,0,0,0,0,0x0000000000000000,0x00000001,10,0), -(13045,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(13046,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(13047,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(13048,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(13159,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(13165,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(13299,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13358,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(13585,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(13616,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13709,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13716,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(13754,0,0,0,0,0x0000000000000010,0x00020000,0,0), -(13800,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13801,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13802,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13803,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13867,0,0,0,0,0x0000000000000010,0x00020000,0,0), -(13877,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(13879,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(13886,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13896,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(13959,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(13960,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13961,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13962,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13963,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13964,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(13983,0,0,0,0,0x0000000000000000,0x01000010,0,0), -(14070,0,0,0,0,0x0000000000000000,0x01000010,0,0), -(14071,0,0,0,0,0x0000000000000000,0x01000010,0,0), -(14108,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(14111,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(14133,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(14144,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(14148,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(14156,0,0,0,0,0x00000000003E0000,0x00020000,0,0), -(14160,0,0,0,0,0x00000000003E0000,0x00020000,0,0), -(14161,0,0,0,0,0x00000000003E0000,0x00020000,0,0), -(14178,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(14186,0,0,0,8,0x0000000040800508,0x00010000,0,0), -(14190,0,0,0,8,0x0000000040800508,0x00010000,0,0), -(14193,0,0,0,8,0x0000000040800508,0x00010000,0,0), -(14194,0,0,0,8,0x0000000040800508,0x00010000,0,0), -(14195,0,0,0,8,0x0000000040800508,0x00010000,0,0), -(14318,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(14319,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(14320,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(14321,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(14322,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(14531,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(14774,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(14796,0,0,0,0,0x0000000000000000,0x00000800,0,0), -(14869,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(14892,0,0,0,6,0x0000000410001E00,0x10000000,0,0), -(15088,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(15097,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(15268,32,0,0,0,0x0000000000000000,0x00020000,0,0), -(15270,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(15277,0,0,0,0,0x0000000000000000,0x00000001,6,0), -(15286,32,0,0,0,0x0000000000000000,0x00008000,0,0), -(15323,32,0,0,0,0x0000000000000000,0x00020000,0,0), -(15324,32,0,0,0,0x0000000000000000,0x00020000,0,0), -(15325,32,0,0,0,0x0000000000000000,0x00020000,0,0), -(15326,32,0,0,0,0x0000000000000000,0x00020000,0,0), -(15335,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(15336,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(15337,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(15338,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(15346,0,0,0,0,0x0000000000000000,0x00000001,6,0), -(15362,0,0,0,6,0x0000000410001E00,0x10000000,0,0), -(15363,0,0,0,6,0x0000000410001E00,0x10000000,0,0), -(15506,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15507,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(15573,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15594,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(15599,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15600,0,0,0,0,0x0000000000000000,0x00000001,0.6,0), -(15603,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(15636,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15641,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15730,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15733,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15784,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(15849,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15852,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(15876,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(15978,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16092,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(16142,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16146,0,0,0,0,0x0000000000000000,0x00000800,0,0), -(16164,28,0,0,0,0x0000000000000000,0x00010000,0,0), -(16176,0,0,0,0,0x0000000000000000,0x10000000,0,0), -(16235,0,0,0,0,0x0000000000000000,0x10000000,0,0), -(16240,0,0,0,0,0x0000000000000000,0x10000000,0,0), -(16247,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16256,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(16257,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(16277,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(16278,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(16279,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(16280,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(16281,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(16282,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(16283,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(16284,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(16428,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16487,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(16489,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(16492,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(16550,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(16574,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16575,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16611,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16615,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16620,0,0,0,0,0x0000000000000000,0x00100402,0,30), -(16624,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(16689,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16792,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(16800,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16810,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16811,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16812,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16813,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(16843,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(16850,0,0,0,0,0x0000000000000004,0x00020000,0,0), -(16864,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(16880,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(16923,0,0,0,0,0x0000000000000004,0x00020000,0,0), -(16924,0,0,0,0,0x0000000000000004,0x00020000,0,0), -(16952,0,0,0,0,0x0000040000039000,0x00010000,0,0), -(16954,0,0,0,0,0x0000040000039000,0x00010000,0,0), -(16958,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(16961,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(16982,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(17010,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(17106,0,0,0,7,0x0000000000080000,0x00004000,0,0), -(17107,0,0,0,7,0x0000000000080000,0x00004000,0,0), -(17108,0,0,0,7,0x0000000000080000,0x00004000,0,0), -(17329,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(17332,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(17350,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(17364,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17495,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(17670,0,0,0,0,0x0000000000000000,0x00000008,0,0), -(17687,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(17688,0,0,0,0,0x0000000000000000,0x00000080,0,0), -(17690,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(17793,0,0,0,5,0x0000000000000001,0x00010000,0,0), -(17794,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17796,0,0,0,5,0x0000000000000001,0x00010000,0,0), -(17797,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17798,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17799,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17800,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(17801,0,0,0,5,0x0000000000000001,0x00010000,0,0), -(17802,0,0,0,5,0x0000000000000001,0x00010000,0,0), -(17803,0,0,0,5,0x0000000000000001,0x00010000,0,0), -(18073,0,0,0,0,0x0000008000000060,0x00020000,0,0), -(18094,0,0,0,5,0x000000000000000A,0x00020000,0,0), -(18095,0,0,0,5,0x000000000000000A,0x00020000,0,0), -(18096,0,0,0,0,0x0000008000000060,0x00020000,0,0), -(18097,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18100,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18119,0,0,593,0,0x0000000000000000,0x00020000,0,0), -(18120,0,0,593,0,0x0000000000000000,0x00020000,0,0), -(18121,0,0,593,0,0x0000000000000000,0x00020000,0,0), -(18122,0,0,593,0,0x0000000000000000,0x00020000,0,0), -(18123,0,0,593,0,0x0000000000000000,0x00020000,0,0), -(18137,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(18146,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18167,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18186,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18189,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(18542,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18765,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(18799,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18800,0,0,0,0,0x0000000000000000,0x00000008,0,0), -(18803,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(18815,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18816,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(18847,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18943,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18979,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(18983,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(19184,0,0,0,0,0x0000000000000000,0x00200000,0,0), -(19194,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(19228,0,0,0,0,0x0000000000000040,0x00020000,0,0), -(19232,0,0,0,0,0x0000000000000040,0x00020000,0,0), -(19233,0,0,0,0,0x0000000000000040,0x00020000,0,0), -(19261,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19262,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19264,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19265,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19266,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19271,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(19273,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(19274,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(19275,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(19308,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(19309,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(19310,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(19311,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(19312,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(19387,0,0,0,0,0x0000000000000000,0x00200000,0,0), -(19388,0,0,0,0,0x0000000000000000,0x00200000,0,0), -(19407,0,0,0,0,0x0000000000000200,0x00020000,0,0), -(19409,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(19412,0,0,0,0,0x0000000000000200,0x00020000,0,0), -(19413,0,0,0,0,0x0000000000000200,0x00020000,0,0), -(19414,0,0,0,0,0x0000000000000200,0x00020000,0,0), -(19415,0,0,0,0,0x0000000000000200,0x00020000,0,0), -(19449,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19478,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19514,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(19572,0,0,0,9,0x0000000000800000,0x08000000,0,0), -(19573,0,0,0,9,0x0000000000800000,0x08000000,0,0), -(19577,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(19655,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19656,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19660,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(19817,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(19818,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20049,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(20056,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(20057,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(20058,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(20059,0,0,0,0,0x0000000000000000,0x00011000,0,0), -(20127,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20128,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20130,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20131,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20132,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20133,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20134,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20135,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20136,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20137,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20154,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20164,0,0,0,0,0x0000000000000000,0x00000001,5,0), -(20165,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20166,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20177,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20178,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20179,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20180,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20181,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20182,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20185,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20186,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20210,0,0,0,10,0x00010000C0000000,0x10000000,0,0), -(20212,0,0,0,10,0x00010000C0000000,0x10000000,0,0), -(20213,0,0,0,10,0x00010000C0000000,0x10000000,0,0), -(20214,0,0,0,10,0x00010000C0000000,0x10000000,0,0), -(20215,0,0,0,10,0x00010000C0000000,0x10000000,0,0), -(20230,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20234,0,0,0,0,0x0000000000008000,0x00020000,0,0), -(20235,0,0,0,0,0x0000000000008000,0x00020000,0,0), -(20287,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20288,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20289,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20290,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20291,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20292,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20293,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20344,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20345,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20346,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20347,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20348,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20349,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20354,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20355,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(20356,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20357,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(20375,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(20500,0,0,0,4,0x0000000010000000,0x00004000,0,0), -(20501,0,0,0,4,0x0000000010000000,0x00004000,0,0), -(20545,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(20705,0,0,0,0,0x0000000000000000,0x00002000,0,0), -(20725,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(20784,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(20847,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(20884,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(20891,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(20911,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20912,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20913,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20914,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20915,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(20918,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(20919,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(20920,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(20925,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20927,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(20928,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(21053,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(21061,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21063,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(21080,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21084,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21185,0,0,0,0,0x0000000000000000,0x00000004,0,10), -(21334,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(21645,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21747,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21788,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21838,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(21841,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21853,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(21882,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(21890,0,0,0,4,0x0000036C2A764EEF,0x00082001,0,0), -(21893,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(21897,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(21911,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(21969,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(21978,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(22007,0,0,0,0,0x0000000000200821,0x00004000,0,0), -(22413,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(22438,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(22618,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(22620,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(22648,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(22835,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(22857,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(23340,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(23378,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(23547,0,0,0,0,0x0000000000000000,0x00000020,0,0), -(23548,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(23551,0,0,0,0,0x00000000000000C0,0x00004000,0,0), -(23552,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(23572,0,0,0,0,0x00000000000000C0,0x00004000,0,0), -(23578,0,0,0,0,0x0000000000000000,0x00080000,2,0), -(23581,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(23686,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(23688,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(23689,0,0,0,0,0x0000000000000000,0x00000001,4,0), -(23695,0,0,0,0,0x0000000000000002,0x00020000,0,0), -(23721,0,0,0,0,0x0000000000000800,0x00020000,0,0), -(23771,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(23780,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(23863,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(23867,0,0,0,0,0x0000000000000000,0x00000081,0,0), -(23885,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(23886,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(23887,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(23888,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(24051,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(24256,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24389,4,0,0,0,0x0000000000000000,0x00020000,0,0), -(24398,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(24574,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(24596,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(24597,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24603,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24604,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24605,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24658,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(24661,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(24905,0,0,0,0,0x0000000000000000,0x00000001,15,0), -(24932,0,0,0,0,0x0000000000000000,0x00001000,0,6), -(24949,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25020,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(25023,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(25296,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(25431,0,0,0,0,0x0000000000000000,0x00000402,0,0), -(25441,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(25461,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(25469,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(25472,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(25477,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(25513,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(25669,0,0,0,0,0x0000000000000000,0x00000001,1,0), -(25759,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25760,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25761,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25762,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25767,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(25820,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(25899,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(25906,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(25937,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(25988,0,0,0,0,0x0000000000000000,0x00040000,0,0), -(26016,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(26021,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(26107,0,0,0,7,0x0000008000800000,0xC4000000,0,0), -(26119,0,0,0,11,0x0000000090100003,0x00004000,0,0), -(26128,0,0,0,0,0x0000000000000000,0x02000000,0,0), -(26135,0,0,0,0,0x0000000000800000,0x00004000,0,0), -(26169,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(26376,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(26463,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(26467,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(26480,0,0,0,0,0x0000000000000000,0x00080001,3,0), -(27009,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27044,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(27124,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27155,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(27160,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(27162,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27164,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(27166,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(27168,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(27169,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(27170,0,0,0,0,0x0000000000000000,0x00000001,7,0), -(27179,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(27200,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27217,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(27243,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(27280,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27419,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(27420,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27498,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(27521,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(27522,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(27539,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(27561,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(27656,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(27688,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(27774,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(27776,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27778,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27780,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27781,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(27785,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(27787,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(27811,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(27815,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(27816,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(27852,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(27861,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27863,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27864,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27865,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(27867,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(28200,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(28305,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(28429,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(28458,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(28460,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(28592,16,0,0,0,0x0000000000000000,0x00020000,0,0), -(28593,16,0,0,0,0x0000000000000000,0x00020000,0,0), -(28594,16,0,0,0,0x0000000000000000,0x00020000,0,0), -(28595,16,0,0,0,0x0000000000000000,0x00020000,0,0), -(28716,0,0,0,7,0x0000000000000010,0x08000000,0,0), -(28719,0,0,0,7,0x0000000000000020,0x10000000,0,0), -(28744,0,0,0,7,0x0000000000000040,0x08000000,0,0), -(28752,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(28761,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(28764,0,0,0,0,0x0000000000000000,0x00100000,0,0), -(28771,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(28780,0,0,0,0,0x0000000000000000,0x08020000,0,0), -(28789,0,0,0,10,0x0000000000006000,0x20000000,0,0), -(28802,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(28809,0,0,0,0,0x0000000000001000,0x10000000,0,0), -(28812,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(28816,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(28823,0,0,0,0,0x00000000000000C0,0x08000000,0,0), -(28845,0,0,0,0,0x0000000000000000,0x00000200,0,0), -(28847,0,0,0,7,0x0000000000000020,0x00004000,0,0), -(28849,0,0,0,11,0x0000000000000080,0x00004000,0,0), -(29062,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(29064,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(29065,0,0,0,0,0x0000000000000000,0x00802000,0,0), -(29074,20,0,0,0,0x0000000000000000,0x00010000,0,0), -(29075,20,0,0,0,0x0000000000000000,0x00010000,0,0), -(29076,20,0,0,0,0x0000000000000000,0x00010000,0,0), -(29150,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(29162,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(29179,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(29180,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(29185,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(29194,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(29196,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(29198,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(29220,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(29307,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(29441,0,0,0,0,0x0000000000000000,0x01000000,0,1), -(29444,0,0,0,0,0x0000000000000000,0x01000000,0,1), -(29445,0,0,0,0,0x0000000000000000,0x01000000,0,1), -(29446,0,0,0,0,0x0000000000000000,0x01000000,0,1), -(29447,0,0,0,0,0x0000000000000000,0x01000000,0,1), -(29448,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(29501,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29601,0,0,0,7,0x0000000000000000,0x00004000,0,0), -(29624,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29625,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29626,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29632,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29633,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29634,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29635,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29636,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29637,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(29801,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(30030,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(30033,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(30079,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(30080,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(30081,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(30160,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(30293,0,0,0,5,0x000000C000000381,0x00020000,0,0), -(30295,0,0,0,5,0x000000C000000381,0x00020000,0,0), -(30296,0,0,0,5,0x000000C000000381,0x00020000,0,0), -(30299,36,0,0,0,0x0000000000000000,0x00100000,0,0), -(30301,36,0,0,0,0x0000000000000000,0x00100000,0,0), -(30302,36,0,0,0,0x0000000000000000,0x00100000,0,0), -(30339,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(30482,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(30636,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(30675,0,0,0,11,0x0000000000000003,0x00004000,0,0), -(30678,0,0,0,11,0x0000000000000003,0x00004000,0,0), -(30679,0,0,0,11,0x0000000000000003,0x00004000,0,0), -(30680,0,0,0,11,0x0000000000000003,0x00004000,0,0), -(30681,0,0,0,11,0x0000000000000003,0x00004000,0,0), -(30802,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(30808,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(30809,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(30810,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(30811,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(30823,0,0,0,0,0x0000000000000000,0x00000001,10.5,0), -(30881,0,0,0,0,0x0000000000000000,0x00008000,0,5), -(30883,0,0,0,0,0x0000000000000000,0x00008000,0,5), -(30884,0,0,0,0,0x0000000000000000,0x00008000,0,5), -(30885,0,0,0,0,0x0000000000000000,0x00008000,0,5), -(30886,0,0,0,0,0x0000000000000000,0x00008000,0,5), -(31233,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(31239,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(31240,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(31241,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(31242,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(31244,0,0,0,0,0x0000000000000000,0x80000000,0,0), -(31245,0,0,0,0,0x0000000000000000,0x80000000,0,0), -(31255,0,0,0,0,0x0000000000000000,0x00000100,0,0), -(31316,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(31569,0,0,0,3,0x0000000000010000,0x00004000,0,0), -(31570,0,0,0,3,0x0000000000010000,0x00004000,0,0), -(31641,0,0,0,0,0x0000000000000000,0x00080002,0,0), -(31642,0,0,0,0,0x0000000000000000,0x00080002,0,0), -(31785,0,0,0,0,0x0000000000000000,0x20000000,0,0), -(31794,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(31801,0,0,0,0,0x0000000000000000,0x00000001,20,0), -(31828,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(31829,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(31830,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(31833,0,0,0,10,0x0000000080000000,0x00004000,0,0), -(31835,0,0,0,10,0x0000000080000000,0x00004000,0,0), -(31836,0,0,0,10,0x0000000080000000,0x00004000,0,0), -(31892,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(31895,0,0,0,0,0x0000000000000000,0x00000001,5,0), -(31896,0,0,0,0,0x0000000000000000,0x00000001,2,0), -(32215,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(32385,0,0,0,5,0x0000001100000402,0x00020000,0,0), -(32387,0,0,0,5,0x0000001100000402,0x00020000,0,0), -(32392,0,0,0,5,0x0000001100000402,0x00020000,0,0), -(32393,0,0,0,5,0x0000001100000402,0x00020000,0,0), -(32394,0,0,0,5,0x0000001100000402,0x00020000,0,0), -(32587,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(32593,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(32594,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(32642,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(32734,0,0,0,0,0x0000000000000000,0x00000002,0,3), -(32748,0,0,0,8,0x0000000100000000,0x00080000,0,0), -(32776,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(32777,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(32837,0,0,0,0,0x0000000000000000,0x00004000,0,45), -(32850,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(32863,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(33012,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(33014,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(33089,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(33142,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33145,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33146,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33150,0,0,0,0,0x0000000000000000,0x10010000,0,0), -(33154,0,0,0,0,0x0000000000000000,0x10010000,0,0), -(33191,0,0,0,6,0x0000040000808000,0x00020000,0,0), -(33192,0,0,0,6,0x0000040000808000,0x00020000,0,0), -(33193,0,0,0,6,0x0000040000808000,0x00020000,0,0), -(33194,0,0,0,6,0x0000040000808000,0x00020000,0,0), -(33195,0,0,0,6,0x0000040000808000,0x00020000,0,0), -(33297,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(33299,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(33493,0,0,0,0,0x0000000000000000,0x00000002,0,0), -(33510,0,0,0,0,0x0000000000000000,0x00080001,5,0), -(33511,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(33522,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(33648,0,0,0,0,0x0000000000000000,0x00401000,0,0), -(33727,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(33735,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(33736,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(33746,0,0,0,0,0x0000000000000000,0x00000004,0,10), -(33754,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(33755,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(33756,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(33757,0,0,0,0,0x0000000000000000,0x00000001,0,3), -(33759,0,0,0,0,0x0000000000000000,0x00000004,0,10), -(33776,0,0,0,0,0x0000000000000000,0x20000000,0,0), -(33881,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33882,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33883,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(33953,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(34082,0,0,0,0,0x0000000000000000,0x00000000,0,0), -(34138,0,0,0,11,0x0000000000000080,0x08000000,0,0), -(34139,0,0,0,10,0x0000000040000000,0x08000000,0,0), -(34303,0,0,0,0,0x0000000000000000,0x00000080,0,0), -(34320,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(34355,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(34457,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(34497,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34498,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34499,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34500,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34502,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34503,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34506,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(34507,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(34508,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(34584,0,0,0,0,0x0000000000000000,0x00004000,0,30), -(34586,0,0,0,0,0x0000000000000000,0x00080001,1.5,0), -(34598,0,0,0,0,0x0000000000000000,0x00020000,0,45), -(34749,0,0,0,0,0x0000000000000000,0x02000000,0,0), -(34753,0,0,0,6,0x0000000000001800,0x08000000,0,0), -(34774,0,0,0,0,0x0000000000000000,0x00080001,1.5,20), -(34827,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(34838,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(34839,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(34859,0,0,0,6,0x0000000000001800,0x08000000,0,0), -(34860,0,0,0,6,0x0000000000001800,0x08000000,0,0), -(34914,32,0,0,0,0x0000000000000000,0x00008000,0,0), -(34916,32,0,0,0,0x0000000000000000,0x00008000,0,0), -(34917,32,0,0,0,0x0000000000000000,0x00008000,0,0), -(34935,0,0,0,0,0x0000000000000000,0x00000002,0,8), -(34938,0,0,0,0,0x0000000000000000,0x00000002,0,8), -(34939,0,0,0,0,0x0000000000000000,0x00000002,0,8), -(34948,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(34949,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(34950,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(34954,0,0,0,0,0x0000000000000000,0x00400000,0,0), -(35077,0,0,0,0,0x0000000000000000,0x00008000,0,60), -(35080,0,0,0,0,0x0000000000000000,0x00080001,0,60), -(35083,0,0,0,0,0x0000000000000000,0x00020000,0,60), -(35086,0,0,0,0,0x0000000000000000,0x08020000,0,60), -(35100,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(35102,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(35103,0,0,0,0,0x0000000000000000,0x00080000,0,0), -(35205,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(35541,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(35550,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(35551,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(35552,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(35553,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(35942,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(36111,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(36123,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(36488,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(36576,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(37168,0,0,0,8,0x00000009003E0000,0x00020000,0,0), -(37169,0,0,0,8,0x0000000000020000,0x00000000,0,0), -(37170,0,0,0,0,0x0000000000000000,0x00000001,1,0), -(37173,0,0,0,8,0x000001062CBC0598,0x000A0001,0,30), -(37188,0,0,0,10,0x0000000000800000,0x00004000,0,0), -(37189,0,0,0,10,0x0000000000006000,0x10000000,0,60), -(37195,0,0,0,10,0x0000000000800000,0x00004000,0,0), -(37197,0,0,0,0,0x0000000000000000,0x00004000,0,45), -(37213,0,0,0,11,0x0000000090100007,0x00010000,0,0), -(37227,0,0,0,11,0x00000000000001C0,0x10000000,0,60), -(37228,0,0,0,11,0x0000000090100007,0x00020000,0,0), -(37237,0,0,0,11,0x0000000000000001,0x00010000,0,0), -(37239,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(37247,8,0,0,0,0x0000000000000000,0x00004000,0,45), -(37288,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(37295,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(37306,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(37311,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(37336,0,0,0,0,0x0000000000000000,0x00084001,0,0), -(37377,32,0,0,0,0x0000000000000000,0x00004000,0,0), -(37381,0,0,0,0,0x0000000000000000,0x000A0001,0,0), -(37443,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(37447,0,0,0,3,0x0000010000000000,0x00004000,0,0), -(37514,0,0,0,0,0x0000000000000000,0x00000020,0,0), -(37519,0,0,0,0,0x0000000000000000,0x04000000,0,0), -(37525,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(37528,0,0,0,4,0x0000000000000004,0x00000001,0,0), -(37604,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(37617,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(37655,0,0,0,0,0x0000000000000000,0x00004000,0,60), -(37657,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(37705,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(37982,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(38031,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(38196,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(38252,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(38290,0,0,0,0,0x0000000000000000,0x00080000,3,0), -(38299,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(38319,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(38332,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(38334,0,0,0,0,0x0000000000000000,0x00004000,0,60), -(38347,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(38350,0,0,0,0,0x0000000000000000,0x00401000,0,0), -(38394,0,0,0,5,0x0000000000000006,0x00020000,0,0), -(38427,0,0,0,0,0x0000000000000000,0x00000001,0,0), -(39027,0,0,0,0,0x0000000000000000,0x00100402,0,3), -(39367,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(39372,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(39437,4,0,0,0,0x0000000000000000,0x00004000,0,0), -(39438,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(39440,0,0,0,0,0x0000000000000000,0x00020000,0,0), -(39442,0,0,0,0,0x0000000000000000,0x00020001,0,0), -(39443,0,0,0,0,0x0000000000000000,0x00401000,0,0), -(39444,0,0,0,0,0x0000000000000000,0x00100002,0,0), -(39446,0,0,0,0,0x0000000000000000,0x00000004,0,0), -(39530,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(39958,0,0,0,0,0x0000000000000000,0x00000001,0.7,40), -(40353,0,0,0,0,0x0000000000000000,0xC4000001,0,0), -(40407,0,0,0,0,0x0000000000000000,0x00000402,6,0), -(40438,0,0,0,6,0x0000000000008010,0x08020000,0,0), -(40442,0,0,0,7,0x0000044000000014,0x00004001,0,0), -(40444,0,0,0,0,0x0000000000000000,0x00000040,0,0), -(40458,0,0,0,4,0x0000060102000000,0x00000001,0,0), -(40463,0,0,0,11,0x0000001000000081,0x00004001,0,0), -(40470,0,0,0,10,0x00000000C0800000,0x00004000,0,0), -(40475,0,0,0,0,0x0000000000000000,0x00080001,3,0), -(40482,0,0,0,0,0x0000000000000000,0x00010000,0,0), -(40485,0,0,0,9,0x0000000100000000,0x00080000,0,0), -(40478,0,0,0,5,0x0000000000000002,0x00020000,0,0), -(40971,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(41260,0,0,0,0,0x0000000000000000,0x00000004,0,10), -(41262,0,0,0,0,0x0000000000000000,0x00000004,0,10), -(41434,0,0,0,0,0x0000000000000000,0x00000001,2,45), -(41635,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(41989,0,0,0,0,0x0000000000000000,0x00000001,3,0), -(42083,0,0,0,0,0x0000000000000000,0x00401000,0,45), -(42135,0,0,0,0,0x0000000000000000,0x00100402,0,90), -(42136,0,0,0,0,0x0000000000000000,0x00100402,0,90), -(42368,0,0,0,10,0x0000000040000000,0x08000000,0,0), -(42370,0,0,0,11,0x0000000000000080,0x08000000,0,0), -(43338,0,0,0,0,0x0000000000000000,0x00001000,0,0), -(43726,0,0,0,10,0x0000000040000000,0x08000000,0,0), -(43728,0,0,0,11,0x0000000000000080,0x08000000,0,0), -(43737,0,0,0,7,0x0000044000000000,0x00000001,0,10), -(43739,0,0,0,7,0x0000000000000002,0x00020000,0,0), -(43745,0,0,0,10,0x0000020000000000,0x00020000,0,0), -(43748,0,0,0,11,0x0000000090100000,0x00004000,0,0), -(43750,0,0,0,11,0x0000000000000001,0x00004000,0,0), -(43823,0,0,0,0,0x0000000000000000,0x00008000,0,0), -(44604,0,0,0,0,0x0000000000000000,0x00004000,0,0), -(44599,0,0,0,0,0x0000000000000000,0x00000001,0,5), -(44835,0,0,0,7,0x0000008000000000,0x00000001,0,0), -(45040,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(45054,0,0,0,0,0x0000000000000000,0x00020000,0,15), -(45057,0,0,0,0,0x0000000000000000,0x00000002,0,30), -(45059,0,0,0,0,0x0000000000000000,0x08000000,0,0), -(45234,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(45243,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(45244,0,0,0,0,0x0000000000000000,0x00842000,0,0), -(45354,0,0,0,0,0x0000000000000000,0x00000001,0,45), -(45355,0,0,0,0,0x0000000000000000,0x00080001,0,0), -(45444,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(45481,0,0,0,0,0x0000000000000000,0x08020000,0,45), -(45482,0,0,0,0,0x0000000000000000,0x00080001,0,45), -(45483,0,0,0,0,0x0000000000000000,0x00080001,0,45), -(45484,0,0,0,0,0x0000000000000000,0x08000000,0,45), -(46046,0,0,0,0,0x0000000000000000,0x00000001,0,5), -(46092,0,0,0,10,0x0000000040000000,0x08000000,0,0), -(46098,0,0,0,11,0x0000000000000080,0x08000000,0,0), -(46364,0,0,0,0,0x0000000000000000,0x00100402,0,0), -(46569,0,0,0,0,0x0000000000000000,0x00004000,0,45), -(46832,0,0,0,7,0x0000000000000001,0x00004000,0,0); +(324, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(325, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(905, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(945, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(974, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(1463, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(3232, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(5952, 0x00000000, 8, 0x0000000100000001, 0x00000000, 0x00000000, 0, 0, 0), +(6346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(7383, 0x00000001, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(7434, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(8134, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(8178, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(8494, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(8495, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(9452, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(9782, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(9784, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(9799, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(10191, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10192, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10193, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10431, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(10432, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(11095, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(11103, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(11119, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(11120, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(11129, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(11180, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(11185, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(11255, 0x00000000, 3, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(12169, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12289, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(12298, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12311, 0x00000000, 4, 0x0000000100000800, 0x00000000, 0x00000000, 0, 0, 0), +(12317, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12319, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12322, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(12357, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(12358, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(12487, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(12488, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(12598, 0x00000000, 3, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(12668, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(12724, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12725, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12726, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12727, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12797, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(12799, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(12812, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12813, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12814, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12815, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12834, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12846, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12847, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12848, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12849, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12867, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12872, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(12873, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(12958, 0x00000000, 4, 0x0000000100000800, 0x00000000, 0x00000000, 0, 0, 0), +(12966, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12967, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12968, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12969, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12970, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12971, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12972, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12973, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12974, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12999, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 4, 0, 0), +(13000, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(13001, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 8, 0, 0), +(13002, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 10, 0, 0), +(13045, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13046, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13047, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13048, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13165, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(13754, 0x00000000, 8, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(13867, 0x00000000, 8, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(13983, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14070, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14071, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14156, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14160, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14161, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14186, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14190, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14193, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14194, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14195, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14318, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14319, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14320, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14321, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14322, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14531, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(14774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(14892, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15088, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(15128, 0x00000004, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(15268, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15277, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(15286, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(15323, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15324, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15325, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15326, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15337, 0x00000000, 6, 0x0000000200002000, 0x00000000, 0x00000002, 0, 0, 0), +(15338, 0x00000000, 6, 0x0000000200002000, 0x00000000, 0x00000002, 0, 0, 0), +(15346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(15362, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15363, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15600, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(16164, 0x00000000, 11, 0x0000000090100003, 0x00000000, 0x00000002, 0, 0, 0), +(16176, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16180, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16196, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16198, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16235, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16240, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16256, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16257, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16277, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16278, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16279, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16280, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16282, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16283, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16284, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16487, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16489, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16492, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16550, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16620, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(16624, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(16850, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16864, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(16880, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16923, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16924, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16952, 0x00000000, 7, 0x0000040000039000, 0x00000000, 0x00000002, 0, 0, 0), +(16954, 0x00000000, 7, 0x0000040000039000, 0x00000000, 0x00000002, 0, 0, 0), +(16958, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16961, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(17106, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17107, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17108, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17364, 0x00000008, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17495, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(17793, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17794, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000001, 0, 0, 0), +(17796, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17797, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17798, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17799, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17800, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17801, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17802, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17803, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(18073, 0x00000000, 5, 0x0000008000000060, 0x00000000, 0x00000000, 0, 0, 0), +(18094, 0x00000000, 5, 0x000000000000000A, 0x00000000, 0x00000000, 0, 0, 0), +(18095, 0x00000000, 5, 0x000000000000000A, 0x00000000, 0x00000000, 0, 0, 0), +(18096, 0x00000000, 5, 0x0000008000000060, 0x00000000, 0x00000000, 0, 0, 0), +(18119, 0x00000000, 5, 0x000010C0000003E5, 0x00000000, 0x00000000, 0, 0, 0), +(18120, 0x00000000, 5, 0x000010C0000003E5, 0x00000000, 0x00000000, 0, 0, 0), +(18820, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(19184, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19228, 0x00000000, 0, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19232, 0x00000000, 9, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19233, 0x00000000, 9, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19387, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19388, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19572, 0x00000000, 9, 0x0000000000800000, 0x00004000, 0x00000000, 0, 0, 0), +(19573, 0x00000000, 9, 0x0000000000800000, 0x00004000, 0x00000000, 0, 0, 0), +(20049, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20056, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20131, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20132, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20164, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 5, 0, 0), +(20165, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(20166, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(20182, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20210, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20212, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20213, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20214, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20215, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20234, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(20235, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(20375, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(20500, 0x00000000, 4, 0x0000000010000000, 0x00000000, 0x00000000, 0, 0, 0), +(20501, 0x00000000, 4, 0x0000000010000000, 0x00000000, 0x00000000, 0, 0, 0), +(20705, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20911, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(20925, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20927, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20928, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(21185, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(21882, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(21890, 0x00000000, 4, 0x0000036C2A764EEF, 0x00000000, 0x00000000, 0, 0, 0), +(22007, 0x00000000, 3, 0x0000000000200021, 0x00000000, 0x00010000, 0, 0, 0), +(22618, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(22648, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(23547, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(23548, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(23551, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(23552, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(23572, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(23578, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23581, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23602, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(23686, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23688, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(23689, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 4, 0, 0), +(23695, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(23721, 0x00000000, 9, 0x0000000000000800, 0x00000000, 0x00000000, 0, 0, 0), +(23920, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(24353, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(24389, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(24398, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(24658, 0x00000000, 0, 0x0000000000000000, 0x00014110, 0x00000000, 0, 0, 0), +(24905, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 15, 0, 0), +(24932, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 6), +(25050, 0x00000004, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(25296, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(25469, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(25472, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(25669, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(25899, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(25988, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(26016, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(26107, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000064, 0, 0, 0), +(26119, 0x00000000, 10, 0x0000000090100003, 0x00000000, 0x00010000, 0, 0, 0), +(26128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(26135, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00010000, 0, 0, 0), +(26480, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(26605, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27044, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(27131, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(27179, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(27419, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27498, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27521, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(27656, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(27787, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27811, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27815, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27816, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(28592, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(28593, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(28716, 0x00000000, 7, 0x0000000000000010, 0x00048000, 0x00000000, 0, 0, 0), +(28719, 0x00000000, 7, 0x0000000000000020, 0x00000000, 0x00000002, 0, 0, 0), +(28744, 0x00000000, 7, 0x0000000000000040, 0x00044000, 0x00000000, 0, 0, 0), +(28752, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(28789, 0x00000000, 10, 0x00000000C0000000, 0x00000000, 0x00000000, 0, 0, 0), +(28802, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(28809, 0x00000000, 6, 0x0000000000001000, 0x00000000, 0x00000002, 0, 0, 0), +(28812, 0x00000000, 8, 0x0000000002000006, 0x00000000, 0x00000002, 0, 0, 0), +(28816, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(28823, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(28847, 0x00000000, 7, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(28849, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(29074, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29075, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29076, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29150, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29179, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29180, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29385, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(29441, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 1), +(29444, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 1), +(29455, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(29501, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29593, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(29594, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(29624, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29625, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29626, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29632, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29633, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29634, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29635, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29636, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29637, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29801, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29834, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(29838, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(29977, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(30003, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(30160, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30293, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30295, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30296, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30299, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30301, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30302, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30675, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30678, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30679, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30680, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30681, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30701, 0x0000001C, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30705, 0x0000001C, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30802, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30803, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30804, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30805, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30806, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30807, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30808, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30809, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30810, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30811, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30823, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 10.5, 0, 0), +(30881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30883, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30884, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30885, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30886, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30937, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(31124, 0x00000000, 8, 0x000000002000000E, 0x00000000, 0x00000000, 0, 0, 0), +(31126, 0x00000000, 8, 0x000000002000000E, 0x00000000, 0x00000000, 0, 0, 0), +(31244, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000004, 0, 0, 0), +(31245, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000004, 0, 0, 0), +(31394, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(31569, 0x00000000, 3, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(31570, 0x00000000, 3, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(31785, 0x00000000, 0, 0x0000000000000000, 0x00008800, 0x00000000, 0, 0, 0), +(31794, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(31801, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(31833, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31835, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31836, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31904, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32385, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32387, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32392, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32393, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32394, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32587, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32593, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32594, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32642, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32734, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32748, 0x00000000, 8, 0x0000000100000000, 0x00000140, 0x00000000, 0, 0, 0), +(32776, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32777, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32837, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(32844, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(32885, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33076, 0x00000000, 0, 0x0000000000000000, 0x000A02A8, 0x00000000, 0, 0, 0), +(33089, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(33127, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(33142, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33145, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33146, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33150, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33151, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33154, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33191, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33192, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33193, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33299, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(33510, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 5, 0, 0), +(33648, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33719, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(33736, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(33746, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(33757, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(33759, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(33776, 0x00000000, 0, 0x0000000000000000, 0x00008800, 0x00000000, 0, 0, 0), +(33881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33882, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33883, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34080, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(34138, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(34139, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(34258, 0x00000000, 10, 0x0000000800000400, 0x00000000, 0x00000000, 0, 0, 0), +(34262, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00010000, 0, 0, 0), +(34320, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34355, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(34497, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34498, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34499, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34500, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34502, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34503, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34584, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(34586, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.5, 0, 0), +(34598, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(34749, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(34753, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.5, 0, 20), +(34783, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(34827, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(34859, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34860, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34914, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34916, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34917, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34935, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34938, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34939, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34950, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34954, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(35077, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35080, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 60), +(35083, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35086, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35100, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35102, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35103, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35121, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(36096, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(36111, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(37165, 0x00000000, 8, 0x0000000000200400, 0x00000000, 0x00000000, 0, 0, 0), +(37168, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(37170, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(37173, 0x00000000, 8, 0x000001062CBC0598, 0x00000000, 0x00000000, 0, 0, 30), +(37189, 0x00000000, 10, 0x00000000C0000000, 0x00000000, 0x00000002, 0, 0, 60), +(37193, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(37195, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00000000, 0, 0, 0), +(37197, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(37213, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(37214, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37227, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 60), +(37237, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(37247, 0x00000008, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(37377, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37384, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(37443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(37514, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(37516, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(37519, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000030, 0, 0, 0), +(37523, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(37528, 0x00000000, 4, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(37536, 0x00000000, 4, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(37568, 0x00000000, 6, 0x0000000000000800, 0x00000000, 0x00000000, 0, 0, 0), +(37594, 0x00000000, 6, 0x0000000000001000, 0x00000000, 0x00000000, 0, 0, 0), +(37600, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37601, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37603, 0x00000000, 6, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(37655, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(37657, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 3), +(38026, 0x00000001, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(38031, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(38290, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.6, 0, 0), +(38326, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38327, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38334, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(38347, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38350, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38394, 0x00000000, 5, 0x0000000000000006, 0x00000000, 0x00000000, 0, 0, 0), +(38857, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(39027, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(39372, 0x00000030, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(39437, 0x00000004, 5, 0x000000C000001364, 0x00000000, 0x00010000, 0, 0, 0), +(39442, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000001, 0, 0, 0), +(39443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(39530, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(39958, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0.7, 0, 40), +(40407, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(40438, 0x00000000, 6, 0x0000000000008040, 0x00000000, 0x00000000, 0, 0, 0), +(40442, 0x00000000, 7, 0x0000044000000014, 0x00000000, 0x00000000, 0, 0, 0), +(40444, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(40458, 0x00000000, 4, 0x0000060102000000, 0x00000000, 0x00000000, 0, 0, 0), +(40463, 0x00000000, 11, 0x0000001000000081, 0x00000000, 0x00000000, 0, 0, 0), +(40470, 0x00000000, 10, 0x00000000C0800000, 0x00000000, 0x00000000, 0, 0, 0), +(40475, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(40478, 0x00000000, 5, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(40482, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(40485, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(40899, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(41034, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(41260, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(41262, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(41381, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(41393, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(41434, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 45), +(41469, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(41635, 0x00000000, 0, 0x0000000000000000, 0x000A02A8, 0x00000000, 0, 0, 0), +(41989, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0.5, 0, 0), +(42083, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 45), +(42135, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 90), +(42136, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 90), +(42368, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(42370, 0x00000000, 11, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(43019, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(43020, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(43338, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(43443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(43726, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(43728, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(43737, 0x00000000, 7, 0x0000044000000000, 0x00000000, 0x00000000, 0, 0, 10), +(43739, 0x00000000, 7, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(43741, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(43745, 0x00000000, 10, 0x0000020000000000, 0x00000000, 0x00000000, 0, 0, 0), +(43748, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(43750, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(43819, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(44404, 0x00000000, 3, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(44835, 0x00000000, 7, 0x0000008000000000, 0x00000010, 0x00000000, 0, 0, 0), +(45054, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 15), +(45057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(45234, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45243, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45244, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45354, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45481, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45482, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45483, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45484, 0x00000000, 0, 0x0000000000000000, 0x00004000, 0x00000000, 0, 0, 45), +(46025, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(46092, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(46098, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(46569, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(46662, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 20), +(46832, 0x00000000, 7, 0x0000000000000001, 0x00000000, 0x00010000, 0, 0, 0), +(46854, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46855, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46867, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46913, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46914, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46915, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46916, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46951, 0x00000000, 4, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(46952, 0x00000000, 0, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(46953, 0x00000000, 0, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(47509, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(47511, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(47515, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(48835, 0x00000000, 10, 0x0000000800000000, 0x00000000, 0x00000000, 0, 0, 0), +(48837, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(48951, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(48952, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(48988, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49018, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49137, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(49188, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(49208, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(49222, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49280, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49283, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49284, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49503, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49504, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49529, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49530, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49531, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49532, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49657, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(50781, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51123, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51127, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51129, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51130, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51349, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51352, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51359, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51466, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51470, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51625, 0x00000000, 8, 0x000000001000A000, 0x00000000, 0x00000000, 0, 0, 0), +(51626, 0x00000000, 8, 0x000000001000A000, 0x00000000, 0x00000000, 0, 0, 0), +(51627, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51628, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51629, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51634, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51635, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51636, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51664, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51665, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51667, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51668, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51669, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51672, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 1), +(51674, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 1), +(51679, 0x00000000, 8, 0x0000000100000001, 0x00000000, 0x00000000, 0, 0, 0), +(51692, 0x00000000, 8, 0x0000000000000200, 0x00000000, 0x00000002, 0, 0, 0), +(51696, 0x00000000, 8, 0x0000000000000200, 0x00000000, 0x00000002, 0, 0, 0), +(51698, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(51700, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(51701, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(52420, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(52423, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(52898, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(53137, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(53138, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(53215, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53216, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53217, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53221, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53222, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53224, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53256, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53259, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53260, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53290, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53291, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53292, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53293, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53294, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53380, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53381, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53382, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53383, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53384, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53486, 0x00000000, 10, 0x0002800000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53488, 0x00000000, 10, 0x0002800000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53569, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(53576, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(54149, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(54486, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54488, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54489, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54490, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54738, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(54841, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(55620, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55623, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55666, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55667, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55668, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55669, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55670, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55689, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56342, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56343, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56344, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56451, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(56611, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56612, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56613, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56614, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56636, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56637, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56638, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56821, 0x00000000, 8, 0x0000000000000002, 0x00000000, 0x00000002, 0, 0, 0), +(56822, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(56834, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(56835, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(57878, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(57880, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(57881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(58357, 0x00000000, 4, 0x0000000000000040, 0x00000000, 0x00000002, 0, 0, 0), +(58364, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(58372, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(58386, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(58616, 0x00000000, 15, 0x0000000000040000, 0x00000000, 0x00000000, 0, 0, 0), +(58620, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(58626, 0x00000000, 15, 0x0000000002000000, 0x00000000, 0x00000000, 0, 0, 0), +(58631, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(58642, 0x00000000, 15, 0x0800000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(58644, 0x00000000, 15, 0x0000000400000000, 0x00000000, 0x00000000, 0, 0, 0), +(58647, 0x00000000, 15, 0x0000000400000000, 0x00000000, 0x00000000, 0, 0, 0), +(58676, 0x00000000, 15, 0x0000000800000000, 0x00000000, 0x00000000, 0, 0, 0), +(58677, 0x00000000, 15, 0x0000000000002000, 0x00000000, 0x00000000, 0, 0, 0), +(58872, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(58874, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(58901, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(59057, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(59176, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(59327, 0x00000000, 15, 0x0000000008000000, 0x00000000, 0x00000000, 0, 0, 0), +(59725, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(60537, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(60572, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(60617, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(60826, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(61324, 0x00000000, 10, 0x0002000000000000, 0x00000000, 0x00000000, 0, 0, 0); /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/6958_01_mangos_spell_proc_event.sql b/sql/updates/6958_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..06304a19e --- /dev/null +++ b/sql/updates/6958_01_mangos_spell_proc_event.sql @@ -0,0 +1,706 @@ +ALTER TABLE db_version CHANGE COLUMN required_6944_01_mangos_mangos_string required_6958_01_mangos_spell_proc_event bit; + +DROP TABLE IF EXISTS `spell_proc_event`; + +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for spell_proc_event +-- ---------------------------- +CREATE TABLE `spell_proc_event` ( + `entry` smallint(6) unsigned NOT NULL default '0', + `SchoolMask` tinyint(4) NOT NULL default '0', + `SpellFamilyName` smallint(6) unsigned NOT NULL default '0', + `SpellFamilyMask` bigint(40) unsigned NOT NULL default '0', + `procFlags` int(10) unsigned NOT NULL default '0', + `procEx` int(10) unsigned NOT NULL default '0', + `ppmRate` float NOT NULL default '0', + `CustomChance` float NOT NULL default '0', + `Cooldown` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records +-- ---------------------------- +INSERT INTO `spell_proc_event` VALUES +(324, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(325, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(905, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(945, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(974, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(1463, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(3232, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(5952, 0x00000000, 8, 0x0000000100000001, 0x00000000, 0x00000000, 0, 0, 0), +(6346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(7383, 0x00000001, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(7434, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(8134, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(8178, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(8494, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(8495, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(9452, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(9782, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(9784, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(9799, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(10191, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10192, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10193, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(10431, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(10432, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(11095, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(11103, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(11119, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(11120, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(11129, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(11180, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(11185, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(11255, 0x00000000, 3, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(12169, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12289, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(12298, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12311, 0x00000000, 4, 0x0000000100000800, 0x00000000, 0x00000000, 0, 0, 0), +(12317, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12319, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12322, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(12357, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(12358, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(12487, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(12488, 0x00000000, 3, 0x0000000000000080, 0x00050000, 0x00000000, 0, 0, 0), +(12598, 0x00000000, 3, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(12668, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(12724, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12725, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12726, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12727, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(12797, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(12799, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(12812, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12813, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12814, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12815, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 6), +(12834, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12846, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12847, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12848, 0x00000004, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12849, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12867, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12872, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(12873, 0x00000000, 3, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(12958, 0x00000000, 4, 0x0000000100000800, 0x00000000, 0x00000000, 0, 0, 0), +(12966, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12967, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12968, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12969, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12970, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(12971, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12972, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12973, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12974, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(12999, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 4, 0, 0), +(13000, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(13001, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 8, 0, 0), +(13002, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 10, 0, 0), +(13045, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13046, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13047, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13048, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(13165, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(13754, 0x00000000, 8, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(13867, 0x00000000, 8, 0x0000000000000010, 0x00000000, 0x00000000, 0, 0, 0), +(13983, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14070, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14071, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000018, 0, 0, 0), +(14156, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14160, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14161, 0x00000000, 8, 0x00000000003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(14186, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14190, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14193, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14194, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14195, 0x00000000, 8, 0x0000000240800508, 0x00000000, 0x00000002, 0, 0, 0), +(14318, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14319, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14320, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14321, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14322, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(14531, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(14774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(14892, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15088, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(15128, 0x00000004, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(15268, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15277, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(15286, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(15323, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15324, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15325, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15326, 0x00000000, 6, 0x000000020608A000, 0x00000000, 0x00000000, 0, 0, 0), +(15337, 0x00000000, 6, 0x0000000200002000, 0x00000000, 0x00000002, 0, 0, 0), +(15338, 0x00000000, 6, 0x0000000200002000, 0x00000000, 0x00000002, 0, 0, 0), +(15346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(15362, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15363, 0x00000000, 6, 0x0000000410001E00, 0x00000000, 0x00000002, 0, 0, 0), +(15600, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(16164, 0x00000000, 11, 0x0000000090100003, 0x00000000, 0x00000002, 0, 0, 0), +(16176, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16180, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16196, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16198, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000002, 0, 0, 0), +(16235, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16240, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 0), +(16256, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16257, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16277, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16278, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16279, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16280, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(16281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16282, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16283, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16284, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16487, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16489, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16492, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16550, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16620, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(16624, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(16850, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16864, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(16880, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16923, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16924, 0x00000000, 7, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(16952, 0x00000000, 7, 0x0000040000039000, 0x00000000, 0x00000002, 0, 0, 0), +(16954, 0x00000000, 7, 0x0000040000039000, 0x00000000, 0x00000002, 0, 0, 0), +(16958, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(16961, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(17106, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17107, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17108, 0x00000000, 7, 0x0000000000080000, 0x00000000, 0x00000000, 0, 0, 0), +(17364, 0x00000008, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17495, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(17793, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17794, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000001, 0, 0, 0), +(17796, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17797, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17798, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17799, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17800, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(17801, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17802, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(17803, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(18073, 0x00000000, 5, 0x0000008000000060, 0x00000000, 0x00000000, 0, 0, 0), +(18094, 0x00000000, 5, 0x000000000000000A, 0x00000000, 0x00000000, 0, 0, 0), +(18095, 0x00000000, 5, 0x000000000000000A, 0x00000000, 0x00000000, 0, 0, 0), +(18096, 0x00000000, 5, 0x0000008000000060, 0x00000000, 0x00000000, 0, 0, 0), +(18119, 0x00000000, 5, 0x000010C0000003E5, 0x00000000, 0x00000000, 0, 0, 0), +(18120, 0x00000000, 5, 0x000010C0000003E5, 0x00000000, 0x00000000, 0, 0, 0), +(18820, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(19184, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19228, 0x00000000, 0, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19232, 0x00000000, 9, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19233, 0x00000000, 9, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(19387, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19388, 0x00000000, 9, 0x0000200000000014, 0x00000000, 0x00000000, 0, 0, 0), +(19572, 0x00000000, 9, 0x0000000000800000, 0x00004000, 0x00000000, 0, 0, 0), +(19573, 0x00000000, 9, 0x0000000000800000, 0x00004000, 0x00000000, 0, 0, 0), +(20049, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20056, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20131, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20132, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20164, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 5, 0, 0), +(20165, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(20166, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(20182, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20210, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20212, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20213, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20214, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20215, 0x00000000, 10, 0x00000000C0200000, 0x00000000, 0x00000002, 0, 0, 0), +(20234, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(20235, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(20375, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(20500, 0x00000000, 4, 0x0000000010000000, 0x00000000, 0x00000000, 0, 0, 0), +(20501, 0x00000000, 4, 0x0000000010000000, 0x00000000, 0x00000000, 0, 0, 0), +(20705, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(20911, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(20925, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20927, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(20928, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(21185, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(21882, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(21890, 0x00000000, 4, 0x0000036C2A764EEF, 0x00000000, 0x00000000, 0, 0, 0), +(22007, 0x00000000, 3, 0x0000000000200021, 0x00000000, 0x00010000, 0, 0, 0), +(22618, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(22648, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(23547, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(23548, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(23551, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(23552, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(23572, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(23578, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23581, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23602, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(23686, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(23688, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(23689, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 4, 0, 0), +(23695, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(23721, 0x00000000, 9, 0x0000000000000800, 0x00000000, 0x00000000, 0, 0, 0), +(23920, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(24353, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(24389, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(24398, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(24658, 0x00000000, 0, 0x0000000000000000, 0x00014110, 0x00000000, 0, 0, 0), +(24905, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 15, 0, 0), +(24932, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 6), +(25050, 0x00000004, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(25296, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(25469, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(25472, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(25669, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(25899, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(25988, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(26016, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(26107, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000064, 0, 0, 0), +(26119, 0x00000000, 10, 0x0000000090100003, 0x00000000, 0x00010000, 0, 0, 0), +(26128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(26135, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00010000, 0, 0, 0), +(26480, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(26605, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27044, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(27131, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(27179, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(27419, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27498, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27521, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(27656, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(27787, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(27811, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27815, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(27816, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(28592, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(28593, 0x00000010, 3, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(28716, 0x00000000, 7, 0x0000000000000010, 0x00048000, 0x00000000, 0, 0, 0), +(28719, 0x00000000, 7, 0x0000000000000020, 0x00000000, 0x00000002, 0, 0, 0), +(28744, 0x00000000, 7, 0x0000000000000040, 0x00044000, 0x00000000, 0, 0, 0), +(28752, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(28789, 0x00000000, 10, 0x00000000C0000000, 0x00000000, 0x00000000, 0, 0, 0), +(28802, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(28809, 0x00000000, 6, 0x0000000000001000, 0x00000000, 0x00000002, 0, 0, 0), +(28812, 0x00000000, 8, 0x0000000002000006, 0x00000000, 0x00000002, 0, 0, 0), +(28816, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(28823, 0x00000000, 11, 0x00000000000000C0, 0x00000000, 0x00000000, 0, 0, 0), +(28847, 0x00000000, 7, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(28849, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(29074, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29075, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29076, 0x00000014, 3, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29150, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29179, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29180, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29385, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(29441, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 1), +(29444, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 1), +(29455, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(29501, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29593, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(29594, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(29624, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29625, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29626, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29632, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29633, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29634, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29635, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29636, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29637, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(29801, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(29834, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(29838, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(29977, 0x00000000, 3, 0x0000004000C00017, 0x00000000, 0x00000000, 0, 0, 0), +(30003, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(30160, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30293, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30295, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30296, 0x00000000, 5, 0x000000C000000381, 0x00000000, 0x00000000, 0, 0, 0), +(30299, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30301, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30302, 0x00000024, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30675, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30678, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30679, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30680, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30681, 0x00000000, 11, 0x0000000000000003, 0x00000000, 0x00000000, 0, 0, 0), +(30701, 0x0000001C, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30705, 0x0000001C, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(30802, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30803, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30804, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30805, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30806, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30807, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30808, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30809, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30810, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30811, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(30823, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 10.5, 0, 0), +(30881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30883, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30884, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30885, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30886, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 5), +(30937, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(31124, 0x00000000, 8, 0x000000002000000E, 0x00000000, 0x00000000, 0, 0, 0), +(31126, 0x00000000, 8, 0x000000002000000E, 0x00000000, 0x00000000, 0, 0, 0), +(31244, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000004, 0, 0, 0), +(31245, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000004, 0, 0, 0), +(31394, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(31569, 0x00000000, 3, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(31570, 0x00000000, 3, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(31785, 0x00000000, 0, 0x0000000000000000, 0x00008800, 0x00000000, 0, 0, 0), +(31794, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(31801, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 20, 0, 0), +(31833, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31835, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31836, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(31904, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32385, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32387, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32392, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32393, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32394, 0x00000000, 5, 0x0000001100000402, 0x00000000, 0x00000000, 0, 0, 0), +(32587, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32593, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32594, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32642, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32734, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(32748, 0x00000000, 8, 0x0000000100000000, 0x00000140, 0x00000000, 0, 0, 0), +(32776, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32777, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(32837, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(32844, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 0), +(32885, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33076, 0x00000000, 0, 0x0000000000000000, 0x000A02A8, 0x00000000, 0, 0, 0), +(33089, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(33127, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(33142, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33145, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33146, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33150, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33151, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33154, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33191, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33192, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33193, 0x00000000, 6, 0x0000040000808000, 0x00000000, 0x00000000, 0, 0, 0), +(33299, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(33510, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 5, 0, 0), +(33648, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33719, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(33736, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(33746, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(33757, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(33759, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(33776, 0x00000000, 0, 0x0000000000000000, 0x00008800, 0x00000000, 0, 0, 0), +(33881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33882, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(33883, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34080, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(34138, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(34139, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(34258, 0x00000000, 10, 0x0000000800000400, 0x00000000, 0x00000000, 0, 0, 0), +(34262, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00010000, 0, 0, 0), +(34320, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34355, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(34497, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34498, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34499, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34500, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34502, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34503, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34584, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(34586, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.5, 0, 0), +(34598, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(34749, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000008, 0, 0, 0), +(34753, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34774, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.5, 0, 20), +(34783, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(34827, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(34859, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34860, 0x00000000, 6, 0x0000000400001800, 0x00000000, 0x00000000, 0, 0, 0), +(34914, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34916, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34917, 0x00000020, 6, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(34935, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34938, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34939, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 8), +(34950, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(34954, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(35077, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35080, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 60), +(35083, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35086, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(35100, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35102, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35103, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(35121, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(36096, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(36111, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(37165, 0x00000000, 8, 0x0000000000200400, 0x00000000, 0x00000000, 0, 0, 0), +(37168, 0x00000000, 8, 0x00000009003E0000, 0x00000000, 0x00000000, 0, 0, 0), +(37170, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1, 0, 0), +(37173, 0x00000000, 8, 0x000001062CBC0598, 0x00000000, 0x00000000, 0, 0, 30), +(37189, 0x00000000, 10, 0x00000000C0000000, 0x00000000, 0x00000002, 0, 0, 60), +(37193, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(37195, 0x00000000, 10, 0x0000000000800000, 0x00000000, 0x00000000, 0, 0, 0), +(37197, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(37213, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(37214, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37227, 0x00000000, 11, 0x00000000000001C0, 0x00000000, 0x00000002, 0, 0, 60), +(37237, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000002, 0, 0, 0), +(37247, 0x00000008, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 45), +(37377, 0x00000020, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37384, 0x00000000, 5, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(37443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(37514, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(37516, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(37519, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000030, 0, 0, 0), +(37523, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(37528, 0x00000000, 4, 0x0000000000000004, 0x00000000, 0x00000000, 0, 0, 0), +(37536, 0x00000000, 4, 0x0000000000010000, 0x00000000, 0x00000000, 0, 0, 0), +(37568, 0x00000000, 6, 0x0000000000000800, 0x00000000, 0x00000000, 0, 0, 0), +(37594, 0x00000000, 6, 0x0000000000001000, 0x00000000, 0x00000000, 0, 0, 0), +(37600, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37601, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(37603, 0x00000000, 6, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0), +(37655, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(37657, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 3), +(38026, 0x00000001, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(38031, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(38290, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 1.6, 0, 0), +(38326, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38327, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38334, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 60), +(38347, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38350, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(38394, 0x00000000, 5, 0x0000000000000006, 0x00000000, 0x00000000, 0, 0, 0), +(38857, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(39027, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(39372, 0x00000030, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(39437, 0x00000004, 5, 0x000000C000001364, 0x00000000, 0x00010000, 0, 0, 0), +(39442, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000001, 0, 0, 0), +(39443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(39530, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(39958, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0.7, 0, 40), +(40407, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 6, 0, 0), +(40438, 0x00000000, 6, 0x0000000000008040, 0x00000000, 0x00000000, 0, 0, 0), +(40442, 0x00000000, 7, 0x0000044000000014, 0x00000000, 0x00000000, 0, 0, 0), +(40444, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(40458, 0x00000000, 4, 0x0000060102000000, 0x00000000, 0x00000000, 0, 0, 0), +(40463, 0x00000000, 11, 0x0000001000000081, 0x00000000, 0x00000000, 0, 0, 0), +(40470, 0x00000000, 10, 0x00000000C0800000, 0x00000000, 0x00000000, 0, 0, 0), +(40475, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 3, 0, 0), +(40478, 0x00000000, 5, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(40482, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(40485, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(40899, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(41034, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(41260, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(41262, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(41381, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000100, 0, 0, 0), +(41393, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(41434, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 2, 0, 45), +(41469, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 7, 0, 0), +(41635, 0x00000000, 0, 0x0000000000000000, 0x000A02A8, 0x00000000, 0, 0, 0), +(41989, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0.5, 0, 0), +(42083, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 45), +(42135, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 90), +(42136, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 90), +(42368, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(42370, 0x00000000, 11, 0x0000000000000040, 0x00000000, 0x00000000, 0, 0, 0), +(43019, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(43020, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000400, 0, 0, 0), +(43338, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(43443, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(43726, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(43728, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(43737, 0x00000000, 7, 0x0000044000000000, 0x00000000, 0x00000000, 0, 0, 10), +(43739, 0x00000000, 7, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(43741, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0), +(43745, 0x00000000, 10, 0x0000020000000000, 0x00000000, 0x00000000, 0, 0, 0), +(43748, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(43750, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(43819, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0), +(44404, 0x00000000, 3, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(44835, 0x00000000, 7, 0x0000008000000000, 0x00000010, 0x00000000, 0, 0, 0), +(45054, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 15), +(45057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(45234, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45243, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45244, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(45354, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45481, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45482, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45483, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(45484, 0x00000000, 0, 0x0000000000000000, 0x00004000, 0x00000000, 0, 0, 45), +(46025, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(46092, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0), +(46098, 0x00000000, 11, 0x0000000000000080, 0x00000000, 0x00000000, 0, 0, 0), +(46569, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 45), +(46662, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 20), +(46832, 0x00000000, 7, 0x0000000000000001, 0x00000000, 0x00010000, 0, 0, 0), +(46854, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46855, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46867, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46913, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46914, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46915, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46916, 0x00000000, 4, 0x0000040000000000, 0x00000000, 0x00000002, 0, 0, 0), +(46951, 0x00000000, 4, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(46952, 0x00000000, 0, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(46953, 0x00000000, 0, 0x0000004000000400, 0x00000000, 0x00000000, 0, 0, 0), +(47509, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(47511, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(47515, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(48835, 0x00000000, 10, 0x0000000800000000, 0x00000000, 0x00000000, 0, 0, 0), +(48837, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(48951, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(48952, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(48988, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49018, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49137, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(49188, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(49208, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(49222, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49280, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49281, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49283, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49284, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(49503, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49504, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(49529, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49530, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49531, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49532, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(49657, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(50781, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51123, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51127, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51128, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51129, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51130, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51346, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51349, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51352, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51359, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 10), +(51466, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51470, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51625, 0x00000000, 8, 0x000000001000A000, 0x00000000, 0x00000000, 0, 0, 0), +(51626, 0x00000000, 8, 0x000000001000A000, 0x00000000, 0x00000000, 0, 0, 0), +(51627, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51628, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51629, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000070, 0, 0, 0), +(51634, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51635, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51636, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(51664, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51665, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51667, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51668, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51669, 0x00000000, 8, 0x0000000800020000, 0x00000000, 0x00000000, 0, 0, 0), +(51672, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 1), +(51674, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 1), +(51679, 0x00000000, 8, 0x0000000100000001, 0x00000000, 0x00000000, 0, 0, 0), +(51692, 0x00000000, 8, 0x0000000000000200, 0x00000000, 0x00000002, 0, 0, 0), +(51696, 0x00000000, 8, 0x0000000000000200, 0x00000000, 0x00000002, 0, 0, 0), +(51698, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(51700, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(51701, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 1), +(52420, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30), +(52423, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(52898, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(53137, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(53138, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(53215, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53216, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53217, 0x00000000, 9, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(53221, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53222, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53224, 0x00000000, 9, 0x0000000100000000, 0x00000000, 0x00000000, 0, 0, 0), +(53256, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53259, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53260, 0x00000000, 9, 0x0080000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53290, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53291, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53292, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53293, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53294, 0x00000000, 9, 0x8000000100000800, 0x00000000, 0x00000002, 0, 0, 0), +(53380, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53381, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53382, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53383, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53384, 0x00000000, 10, 0x0002000000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53486, 0x00000000, 10, 0x0002800000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53488, 0x00000000, 10, 0x0002800000800000, 0x00000000, 0x00000002, 0, 0, 0), +(53569, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(53576, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(54149, 0x00000000, 10, 0x0000000000200000, 0x00000000, 0x00000002, 0, 0, 0), +(54486, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54488, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54489, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54490, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0), +(54738, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(54841, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(55620, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55623, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55666, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55667, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55668, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55669, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55670, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0), +(55689, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56342, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56343, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56344, 0x00000000, 9, 0x0000000000004000, 0x00000000, 0x00000000, 0, 0, 0), +(56451, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 3), +(56611, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56612, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56613, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56614, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(56636, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56637, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56638, 0x00000000, 4, 0x0000000000000020, 0x00000000, 0x00000000, 0, 0, 0), +(56821, 0x00000000, 8, 0x0000000000000002, 0x00000000, 0x00000002, 0, 0, 0), +(56822, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(56834, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(56835, 0x00000000, 15, 0x0000000000440000, 0x00000000, 0x00000000, 0, 0, 0), +(57878, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(57880, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(57881, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000010, 0, 0, 0), +(58357, 0x00000000, 4, 0x0000000000000040, 0x00000000, 0x00000002, 0, 0, 0), +(58364, 0x00000000, 4, 0x0000000000000400, 0x00000000, 0x00000000, 0, 0, 0), +(58372, 0x00000000, 4, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(58386, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(58616, 0x00000000, 15, 0x0000000000040000, 0x00000000, 0x00000000, 0, 0, 0), +(58620, 0x00000000, 15, 0x0000400000000000, 0x00000000, 0x00000000, 0, 0, 0), +(58626, 0x00000000, 15, 0x0000000002000000, 0x00000000, 0x00000000, 0, 0, 0), +(58631, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(58642, 0x00000000, 15, 0x0800000000000000, 0x00000000, 0x00000000, 0, 0, 0), +(58644, 0x00000000, 15, 0x0000000400000000, 0x00000000, 0x00000000, 0, 0, 0), +(58647, 0x00000000, 15, 0x0000000400000000, 0x00000000, 0x00000000, 0, 0, 0), +(58676, 0x00000000, 15, 0x0000000800000000, 0x00000000, 0x00000000, 0, 0, 0), +(58677, 0x00000000, 15, 0x0000000000002000, 0x00000000, 0x00000000, 0, 0, 0), +(58872, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(58874, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000040, 0, 0, 0), +(58901, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(59057, 0x00000000, 15, 0x0000000000000002, 0x00000000, 0x00000000, 0, 0, 0), +(59176, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(59327, 0x00000000, 15, 0x0000000008000000, 0x00000000, 0x00000000, 0, 0, 0), +(59725, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000800, 0, 0, 0), +(60537, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0), +(60572, 0x00000000, 11, 0x0000000090100000, 0x00000000, 0x00000000, 0, 0, 0), +(60617, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000020, 0, 0, 0), +(60826, 0x00000000, 15, 0x0000000001400000, 0x00000000, 0x00000000, 0, 0, 0), +(61324, 0x00000000, 10, 0x0002000000000000, 0x00000000, 0x00000000, 0, 0, 0); \ No newline at end of file diff --git a/sql/updates/6960_01_mangos_command.sql b/sql/updates/6960_01_mangos_command.sql new file mode 100644 index 000000000..a67862f9a --- /dev/null +++ b/sql/updates/6960_01_mangos_command.sql @@ -0,0 +1,5 @@ +ALTER TABLE db_version CHANGE COLUMN required_6958_01_mangos_spell_proc_event required_6960_01_mangos_command bit; + +DELETE FROM `command` WHERE `name` = 'modify runicpower'; +INSERT INTO `command` VALUES +('modify runicpower',1,'Syntax: .modify runicpower #newrunicpower\r\n\r\nModify the runic power of the selected player. If no player is selected, modify your runic power.'); diff --git a/sql/updates/6960_02_mangos_string.sql b/sql/updates/6960_02_mangos_string.sql new file mode 100644 index 000000000..c99fe5db0 --- /dev/null +++ b/sql/updates/6960_02_mangos_string.sql @@ -0,0 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_6960_01_mangos_command required_6960_02_mangos_string bit; + +DELETE FROM `mangos_string` WHERE `entry` IN (173,174); +INSERT INTO `mangos_string` VALUES +(173,'You changed runic power of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(174,'%s changed your runic power to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/6961_01_mangos_command.sql b/sql/updates/6961_01_mangos_command.sql new file mode 100644 index 000000000..60cb686f6 --- /dev/null +++ b/sql/updates/6961_01_mangos_command.sql @@ -0,0 +1,3 @@ +ALTER TABLE db_version CHANGE COLUMN required_6960_02_mangos_string required_6961_01_mangos_command bit; + +DELETE FROM `command` WHERE name = 'reload'; diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index ff1f42a62..719867fa7 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -100,6 +100,10 @@ pkgdata_DATA = \ 6940_01_mangos_spell_learn_spell.sql \ 6941_01_mangos_spell_learn_spell.sql \ 6944_01_mangos_mangos_string.sql \ + 6958_01_mangos_spell_proc_event.sql \ + 6960_01_mangos_command.sql \ + 6960_02_mangos_string.sql \ + 6961_01_mangos_command.sql \ README ## Additional files to include when running 'make dist' @@ -180,4 +184,8 @@ EXTRA_DIST = \ 6940_01_mangos_spell_learn_spell.sql \ 6941_01_mangos_spell_learn_spell.sql \ 6944_01_mangos_mangos_string.sql \ + 6958_01_mangos_spell_proc_event.sql \ + 6960_01_mangos_command.sql \ + 6960_02_mangos_string.sql \ + 6961_01_mangos_command.sql \ README diff --git a/src/game/ArenaTeamHandler.cpp b/src/game/ArenaTeamHandler.cpp index d0e095237..ea0567ed5 100644 --- a/src/game/ArenaTeamHandler.cpp +++ b/src/game/ArenaTeamHandler.cpp @@ -171,7 +171,7 @@ void WorldSession::HandleArenaTeamInviteAcceptOpcode(WorldPacket & /*recv_data*/ if(!at) return; - if(_player->GetArenaTeamIdFromDB(_player->GetGUIDLow(), at->GetType())) + if(_player->GetArenaTeamId(at->GetType())) { SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S,"","",ERR_ALREADY_IN_ARENA_TEAM); // already in arena team that size return; diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 5013e3605..2e0165ad6 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -108,6 +108,7 @@ ChatCommand * ChatHandler::getCommandTable() { "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 }, @@ -294,7 +295,6 @@ ChatCommand * ChatHandler::getCommandTable() { "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL }, { "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL }, - { "", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; @@ -694,9 +694,9 @@ void ChatHandler::PSendSysMessage(int32 entry, ...) { const char *format = GetMangosString(entry); va_list ap; - char str [1024]; + char str [2048]; va_start(ap, entry); - vsnprintf(str,1024,format, ap ); + vsnprintf(str,2048,format, ap ); va_end(ap); SendSysMessage(str); } @@ -704,9 +704,9 @@ void ChatHandler::PSendSysMessage(int32 entry, ...) void ChatHandler::PSendSysMessage(const char *format, ...) { va_list ap; - char str [1024]; + char str [2048]; va_start(ap, format); - vsnprintf(str,1024,format, ap ); + vsnprintf(str,2048,format, ap ); va_end(ap); SendSysMessage(str); } diff --git a/src/game/Chat.h b/src/game/Chat.h index 804e3c9bd..d8e93b2c1 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -156,6 +156,7 @@ class ChatHandler bool HandleModifyHPCommand(const char* args); bool HandleModifyManaCommand(const char* args); bool HandleModifyRageCommand(const char* args); + bool HandleModifyRunicPowerCommand(const char* args); bool HandleModifyEnergyCommand(const char* args); bool HandleModifyMoneyCommand(const char* args); bool HandleModifyASpeedCommand(const char* args); @@ -195,7 +196,6 @@ class ChatHandler bool HandleNpcWhisperCommand(const char* args); bool HandleNpcYellCommand(const char* args); - bool HandleReloadCommand(const char* args); bool HandleReloadAllCommand(const char* args); bool HandleReloadAllAreaCommand(const char* args); bool HandleReloadAllItemCommand(const char* args); diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 851e21030..d5e641129 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -154,6 +154,7 @@ void WorldSession::HandleGroupInviteOpcode( WorldPacket & recv_data ) // ok, we do it WorldPacket data(SMSG_GROUP_INVITE, 10); // guess size + data << uint8(1); // ok data << GetPlayer()->GetName(); player->GetSession()->SendPacket(&data); diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index cedfc6e6a..ec5c0a4c7 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -1195,18 +1195,19 @@ void Guild::LoadGuildBankFromDB() delete result; - // 0 1 2 3 - result = CharacterDatabase.PQuery("SELECT TabId, SlotId, item_guid, item_entry FROM guild_bank_item WHERE guildid='%u' ORDER BY TabId", Id); + // data needs to be at first place for Item::LoadFromDB + // 0 1 2 3 4 + result = CharacterDatabase.PQuery("SELECT data, TabId, SlotId, item_guid, item_entry FROM guild_bank_item JOIN item_instance ON item_guid = guid WHERE guildid='%u' ORDER BY TabId", Id); if(!result) return; do { Field *fields = result->Fetch(); - uint8 TabId = fields[0].GetUInt8(); - uint8 SlotId = fields[1].GetUInt8(); - uint32 ItemGuid = fields[2].GetUInt32(); - uint32 ItemEntry = fields[3].GetUInt32(); + uint8 TabId = fields[1].GetUInt8(); + uint8 SlotId = fields[2].GetUInt8(); + uint32 ItemGuid = fields[3].GetUInt32(); + uint32 ItemEntry = fields[4].GetUInt32(); if (TabId >= purchased_tabs || TabId >= GUILD_BANK_MAX_TABS) { @@ -1229,7 +1230,7 @@ void Guild::LoadGuildBankFromDB() } Item *pItem = NewItemOrBag(proto); - if(!pItem->LoadFromDB(ItemGuid, 0)) + if(!pItem->LoadFromDB(ItemGuid, 0, result)) { CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE guildid='%u' AND TabId='%u' AND SlotId='%u'", Id, uint32(TabId), uint32(SlotId)); sLog.outError("Item GUID %u not found in item_instance, deleting from Guild Bank!", ItemGuid); diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp index 8b093b808..1c7249362 100644 --- a/src/game/GuildHandler.cpp +++ b/src/game/GuildHandler.cpp @@ -380,7 +380,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket) data << (uint8)3; data << GetPlayer()->GetName(); data << plName; - data << guild->GetRankName(slot->RankId+1); + data << guild->GetRankName(slot->RankId); guild->BroadcastPacket(&data); } diff --git a/src/game/Language.h b/src/game/Language.h index d90596a58..666b8fa9c 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -168,7 +168,9 @@ enum MangosStrings LANG_SOUND_NOT_EXIST = 170, // 171, // not used LANG_CONSOLE_COMMAND = 172, - // Room for more level 1 173-199 not used + LANG_YOU_CHANGE_RUNIC_POWER = 173, + LANG_YOURS_RUNIC_POWER_CHANGED = 174, + // Room for more level 1 175-199 not used // level 2 chat LANG_NO_SELECTION = 200, diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 26d5b15fe..f86ada89a 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -827,6 +827,40 @@ bool ChatHandler::HandleModifyRageCommand(const char* args) return true; } +// Edit Player Runic Power +bool ChatHandler::HandleModifyRunicPowerCommand(const char* args) +{ + if(!*args) + return false; + + int32 rune = atoi((char*)args)*10; + int32 runem = atoi((char*)args)*10; + + if (rune <= 0 || runem <= 0 || runem < rune) + { + SendSysMessage(LANG_BAD_VALUE); + SetSentErrorMessage(true); + return false; + } + + Player *chr = getSelectedPlayer(); + if (chr == NULL) + { + SendSysMessage(LANG_NO_CHAR_SELECTED); + SetSentErrorMessage(true); + return false; + } + + PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, chr->GetName(), rune/10, runem/10); + if (needReportToTarget(chr)) + ChatHandler(chr).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, GetName(), rune/10, runem/10); + + chr->SetMaxPower(POWER_RUNIC_POWER,runem ); + chr->SetPower(POWER_RUNIC_POWER, rune ); + + return true; +} + //Edit Player Faction bool ChatHandler::HandleModifyFactionCommand(const char* args) { diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index cfd793f6a..5383ecfcb 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -52,14 +52,6 @@ #include "InstanceData.h" //reload commands -bool ChatHandler::HandleReloadCommand(const char* arg) -{ - // this is error catcher for wrong table name in .reload commands - PSendSysMessage("Db table with name starting from '%s' not found and can't be reloaded.",arg); - SetSentErrorMessage(true); - return false; -} - bool ChatHandler::HandleReloadAllCommand(const char*) { HandleReloadAreaTriggerTeleportCommand(""); diff --git a/src/game/Makefile.am b/src/game/Makefile.am index 5f5ce4542..44c7898a0 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -232,8 +232,6 @@ libmangosgame_a_SOURCES = \ TaxiHandler.cpp \ TemporarySummon.cpp \ TemporarySummon.h \ - tools.cpp \ - Tools.h \ TotemAI.cpp \ TotemAI.h \ Totem.cpp \ diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 885af56fc..3eed7737f 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -41,7 +41,6 @@ #include "SpellAuras.h" #include "Pet.h" #include "SocialMgr.h" -#include "Tools.h" void WorldSession::HandleRepopRequestOpcode( WorldPacket & /*recv_data*/ ) { @@ -1649,7 +1648,7 @@ void WorldSession::HandleInspectAchievements( WorldPacket & recv_data ) { CHECK_PACKET_SIZE(recv_data, 1); uint64 guid; - if(!readGUID(recv_data, guid)) + if(!recv_data.readPackGUID(guid)) return; Player *player = objmgr.GetPlayer(guid); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index f0332aa00..f492192e1 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1892,7 +1892,8 @@ void ObjectMgr::LoadItemPrototypes() void ObjectMgr::LoadAuctionItems() { - QueryResult *result = CharacterDatabase.Query( "SELECT itemguid,item_template FROM auctionhouse" ); + // data needs to be at first place for Item::LoadFromDB + QueryResult *result = CharacterDatabase.Query( "SELECT data,itemguid,item_template FROM auctionhouse JOIN item_instance ON itemguid = guid" ); if( !result ) return; @@ -1907,8 +1908,8 @@ void ObjectMgr::LoadAuctionItems() bar.step(); fields = result->Fetch(); - uint32 item_guid = fields[0].GetUInt32(); - uint32 item_template = fields[1].GetUInt32(); + uint32 item_guid = fields[1].GetUInt32(); + uint32 item_template = fields[2].GetUInt32(); ItemPrototype const *proto = GetItemPrototype(item_template); @@ -1920,7 +1921,7 @@ void ObjectMgr::LoadAuctionItems() Item *item = NewItemOrBag(proto); - if(!item->LoadFromDB(item_guid,0)) + if(!item->LoadFromDB(item_guid,0, result)) { delete item; continue; diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp index 37f1bd344..928b85ec9 100644 --- a/src/game/Opcodes.cpp +++ b/src/game/Opcodes.cpp @@ -1179,7 +1179,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x47E*/ { "CMSG_FORCE_SAY_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x47F*/ { "SMSG_HEALTH_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x480*/ { "SMSG_POWER_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, - /*0x481*/ { "CMSG_GAMEOBJ_REPORT_USE", STATUS_NEVER, &WorldSession::Handle_NULL }, + /*0x481*/ { "CMSG_GAMEOBJ_REPORT_USE", STATUS_LOGGEDIN, &WorldSession::HandleGameobjectReportUse }, /*0x482*/ { "SMSG_HIGHEST_THREAT_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x483*/ { "SMSG_THREAT_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x484*/ { "SMSG_THREAT_REMOVE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index be46cc21a..47edf16a6 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -101,7 +101,7 @@ void Pet::RemoveFromWorld() Unit::RemoveFromWorld(); } -bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool current ) +bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool current ) { m_loading = true; @@ -764,7 +764,6 @@ bool Pet::CreateBaseAtCreature(Creature* creature) SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0); SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32((MaNGOS::XP::xp_to_level(creature->getLevel()))/4)); - SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); SetUInt32Value(UNIT_NPC_FLAGS, 0); CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(creature->GetCreatureInfo()->family); diff --git a/src/game/Pet.h b/src/game/Pet.h index 29c96dcc1..174d49ad4 100644 --- a/src/game/Pet.h +++ b/src/game/Pet.h @@ -133,7 +133,7 @@ class Pet : public Creature bool Create (uint32 guidlow, Map *map, uint32 Entry, uint32 pet_number); bool CreateBaseAtCreature(Creature* creature); - bool LoadPetFromDB( Unit* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false ); + bool LoadPetFromDB( Player* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false ); void SavePetToDB(PetSaveMode mode); void Remove(PetSaveMode mode, bool returnreagent = false); static void DeleteFromDB(uint32 guidlow); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 75deff417..5457be6c6 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -3521,27 +3521,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC } // remove from arena teams - uint32 at_id = GetArenaTeamIdFromDB(playerguid,ARENA_TEAM_2v2); - if(at_id != 0) - { - ArenaTeam * at = objmgr.GetArenaTeamById(at_id); - if(at) - at->DelMember(playerguid); - } - at_id = GetArenaTeamIdFromDB(playerguid,ARENA_TEAM_3v3); - if(at_id != 0) - { - ArenaTeam * at = objmgr.GetArenaTeamById(at_id); - if(at) - at->DelMember(playerguid); - } - at_id = GetArenaTeamIdFromDB(playerguid,ARENA_TEAM_5v5); - if(at_id != 0) - { - ArenaTeam * at = objmgr.GetArenaTeamById(at_id); - if(at) - at->DelMember(playerguid); - } + LeaveAllArenaTeams(playerguid); // the player was uninvited already on logout so just remove from group QueryResult *resultGroup = CharacterDatabase.PQuery("SELECT leaderGuid FROM group_member WHERE memberGuid='%u'", guid); @@ -3582,15 +3562,16 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC MailItemsInfo mi; if(has_items) { - QueryResult *resultItems = CharacterDatabase.PQuery("SELECT item_guid,item_template FROM mail_items WHERE mail_id='%u'", mail_id); + // data needs to be at first place for Item::LoadFromDB + QueryResult *resultItems = CharacterDatabase.PQuery("SELECT data,item_guid,item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail_id); if(resultItems) { do { Field *fields2 = resultItems->Fetch(); - uint32 item_guidlow = fields2[0].GetUInt32(); - uint32 item_template = fields2[1].GetUInt32(); + uint32 item_guidlow = fields2[1].GetUInt32(); + uint32 item_template = fields2[2].GetUInt32(); ItemPrototype const* itemProto = objmgr.GetItemPrototype(item_template); if(!itemProto) @@ -3600,7 +3581,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC } Item *pItem = NewItemOrBag(itemProto); - if(!pItem->LoadFromDB(item_guidlow, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER))) + if(!pItem->LoadFromDB(item_guidlow, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER),resultItems)) { pItem->FSetState(ITEM_REMOVED); pItem->SaveToDB(); // it also deletes item object ! @@ -4858,6 +4839,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, MeleeHitOutcome outcome, bool defence) { +/* Not need, this checked on call this func from trigger system switch(outcome) { case MELEE_HIT_CRIT: @@ -4870,7 +4852,7 @@ void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, MeleeHi default: break; } - +*/ uint32 plevel = getLevel(); // if defense than pVictim == attacker uint32 greylevel = MaNGOS::XP::GetGrayLevel(plevel); uint32 moblevel = pVictim->getLevelForTarget(this); @@ -6053,12 +6035,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor) victim_guid = 0; // Don't show HK: message, only log. } - if(k_level <= 5) - k_grey = 0; - else if( k_level <= 39 ) - k_grey = k_level - 5 - k_level/10; - else - k_grey = k_level - 1 - k_level/5; + k_grey = MaNGOS::XP::GetGrayLevel(k_level); if(v_level<=k_grey) return false; @@ -6144,24 +6121,18 @@ void Player::ModifyArenaPoints( int32 value ) uint32 Player::GetGuildIdFromDB(uint64 guid) { - std::ostringstream ss; - ss<<"SELECT guildid FROM guild_member WHERE guid='"<Fetch()[0].GetUInt32(); - delete result; - return v; - } - else + QueryResult* result = CharacterDatabase.PQuery("SELECT guildid FROM guild_member WHERE guid='%u'", GUID_LOPART(guid)); + if(!result) return 0; + + uint32 id = result->Fetch()[0].GetUInt32(); + delete result; + return id; } uint32 Player::GetRankFromDB(uint64 guid) { - std::ostringstream ss; - ss<<"SELECT rank FROM guild_member WHERE guid='"<Fetch()[0].GetUInt32(); @@ -6185,10 +6156,8 @@ uint32 Player::GetArenaTeamIdFromDB(uint64 guid, uint8 type) uint32 Player::GetZoneIdFromDB(uint64 guid) { - std::ostringstream ss; - - ss<<"SELECT zone FROM characters WHERE guid='"<Fetch(); @@ -6198,22 +6167,18 @@ uint32 Player::GetZoneIdFromDB(uint64 guid) if (!zone) { // stored zone is zero, use generic and slow zone detection - ss.str(""); - ss<<"SELECT map,position_x,position_y FROM characters WHERE guid='"<Fetch(); - uint32 map = fields[0].GetUInt32(); + uint32 map = fields[0].GetUInt32(); float posx = fields[1].GetFloat(); float posy = fields[2].GetFloat(); delete result; zone = MapManager::Instance().GetZoneId(map,posx,posy); - ss.str(""); - ss << "UPDATE characters SET zone='"<flags & AREA_FLAG_SANCTUARY) // in sanctuary { - SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY); + SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY); if(sWorld.IsFFAPvPRealm()) RemoveFlag(PLAYER_FLAGS,PLAYER_FLAGS_FFA_PVP); } else { - RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY); + RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY); } if(zone->flags & AREA_FLAG_CAPITAL) // in capital city @@ -14615,15 +14580,16 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff) // load mailed item which should receive current player void Player::_LoadMailedItems(Mail *mail) { - QueryResult* result = CharacterDatabase.PQuery("SELECT item_guid, item_template FROM mail_items WHERE mail_id='%u'", mail->messageID); + // data needs to be at first place for Item::LoadFromDB + QueryResult* result = CharacterDatabase.PQuery("SELECT data, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail->messageID); if(!result) return; do { Field *fields = result->Fetch(); - uint32 item_guid_low = fields[0].GetUInt32(); - uint32 item_template = fields[1].GetUInt32(); + uint32 item_guid_low = fields[1].GetUInt32(); + uint32 item_template = fields[2].GetUInt32(); mail->AddItem(item_guid_low, item_template); @@ -14639,7 +14605,7 @@ void Player::_LoadMailedItems(Mail *mail) Item *item = NewItemOrBag(proto); - if(!item->LoadFromDB(item_guid_low, 0)) + if(!item->LoadFromDB(item_guid_low, 0, result)) { sLog.outError( "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, item_guid_low); CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", item_guid_low); @@ -16628,6 +16594,27 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type) CharacterDatabase.CommitTransaction(); } +void Player::LeaveAllArenaTeams(uint64 guid) +{ + QueryResult *result = CharacterDatabase.PQuery("SELECT arena_team_member.arenateamid FROM arena_team_member JOIN arena_team ON arena_team_member.arenateamid = arena_team.arenateamid WHERE guid='%u'", GUID_LOPART(guid)); + if(!result) + return; + + do + { + Field *fields = result->Fetch(); + uint32 at_id = fields[0].GetUInt32(); + if(at_id != 0) + { + ArenaTeam * at = objmgr.GetArenaTeamById(at_id); + if(at) + at->DelMember(guid); + } + } while (result->NextRow()); + + delete result; +} + void Player::SetRestBonus (float rest_bonus_new) { // Prevent resting on max level @@ -18471,6 +18458,26 @@ uint32 Player::GetResurrectionSpellId() return spell_id; } +// Used in triggers for check "Only to targets that grant experience or honor" req +bool Player::isHonorOrXPTarget(Unit* pVictim) +{ + uint32 v_level = pVictim->getLevel(); + uint32 k_grey = MaNGOS::XP::GetGrayLevel(getLevel()); + + // Victim level less gray level + if(v_level<=k_grey) + return false; + + if(pVictim->GetTypeId() == TYPEID_UNIT) + { + if (((Creature*)pVictim)->isTotem() || + ((Creature*)pVictim)->isPet() || + ((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL) + return false; + } + return true; +} + bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) { bool PvP = pVictim->isCharmedOwnedByPlayerOrPlayer(); diff --git a/src/game/Player.h b/src/game/Player.h index 0f15be30c..60200d892 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -425,8 +425,8 @@ enum PlayerFlags PLAYER_FLAGS_UNK1 = 0x00001000, // played long time PLAYER_FLAGS_UNK2 = 0x00002000, // played too long time PLAYER_FLAGS_UNK3 = 0x00008000, // strange visual effect (2.0.1), looks like PLAYER_FLAGS_GHOST flag - PLAYER_FLAGS_SANCTUARY = 0x00010000, // player entered sanctuary - PLAYER_FLAGS_UNK4 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1) + PLAYER_FLAGS_UNK4 = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary + PLAYER_FLAGS_UNK5 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1) PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually) }; @@ -1598,6 +1598,7 @@ class MANGOS_DLL_SPEC Player : public Unit static uint32 GetArenaTeamIdFromDB(uint64 guid, uint8 slot); void SetArenaTeamIdInvited(uint32 ArenaTeamId) { m_ArenaTeamIdInvited = ArenaTeamId; } uint32 GetArenaTeamIdInvited() { return m_ArenaTeamIdInvited; } + static void LeaveAllArenaTeams(uint64 guid); void SetDifficulty(uint32 dungeon_difficulty) { m_dungeonDifficulty = dungeon_difficulty; } uint8 GetDifficulty() { return m_dungeonDifficulty; } @@ -1759,6 +1760,7 @@ class MANGOS_DLL_SPEC Player : public Unit bool IsAtGroupRewardDistance(WorldObject const* pRewardSource) const; bool RewardPlayerAndGroupAtKill(Unit* pVictim); + bool isHonorOrXPTarget(Unit* pVictim); FactionStateList m_factions; ForcedReactions m_forcedReactions; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index d33c3010b..b0dec3481 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -41,7 +41,6 @@ #include "CellImpl.h" #include "Policies/SingletonImp.h" #include "SharedDefines.h" -#include "Tools.h" #include "LootMgr.h" #include "VMapFactory.h" #include "BattleGround.h" @@ -167,19 +166,19 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster ) // TARGET_FLAG_UNK2 is used for non-combat pets, maybe other? if( m_targetMask & ( TARGET_FLAG_UNIT | TARGET_FLAG_UNK2 )) - if(!readGUID(*data, m_unitTargetGUID)) + if(!data->readPackGUID(m_unitTargetGUID)) return false; if( m_targetMask & ( TARGET_FLAG_OBJECT )) - if(!readGUID(*data, m_GOTargetGUID)) + if(!data->readPackGUID(m_GOTargetGUID)) return false; if(( m_targetMask & ( TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM )) && caster->GetTypeId() == TYPEID_PLAYER) - if(!readGUID(*data, m_itemTargetGUID)) + if(!data->readPackGUID(m_itemTargetGUID)) return false; if( m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE ) ) - if(!readGUID(*data, m_CorpseTargetGUID)) + if(!data->readPackGUID(m_CorpseTargetGUID)) return false; if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION ) @@ -197,7 +196,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster ) if(data->rpos()+1+4+4+4 > data->size()) return false; - if(!readGUID(*data, m_unitTargetGUID)) + if(!data->readPackGUID(m_unitTargetGUID)) return false; *data >> m_destX >> m_destY >> m_destZ; @@ -317,6 +316,8 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage->DamageType); } } + // Set health leech amount to zero + m_healthLeech = 0; if(originalCasterGUID) m_originalCasterGUID = originalCasterGUID; @@ -680,6 +681,77 @@ void Spell::FillTargetMap() } } +void Spell::prepareDataForTriggerSystem() +{ + //========================================================================================== + // Now fill data for trigger system, need know: + // Ñan spell trigger another or not ( m_canTrigger ) + // Create base triggers flags for Attacker and Victim ( m_procAttacker and m_procVictim) + //========================================================================================== + + // Fill flag can spell trigger or not + if (!m_IsTriggeredSpell) + m_canTrigger = true; // Normal cast - can trigger + else if (!m_triggeredByAuraSpell) + m_canTrigger = true; // Triggered from SPELL_EFFECT_TRIGGER_SPELL - can trigger + else // Exceptions (some periodic triggers) + { + m_canTrigger = false; // Triggered spells can`t trigger another + switch (m_spellInfo->SpellFamilyName) + { + case SPELLFAMILY_MAGE: // Arcane Missles triggers need do it + if (m_spellInfo->SpellFamilyFlags & 0x0000000000200000LL) m_canTrigger = true; + break; + case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it + if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true; + break; + case SPELLFAMILY_HUNTER: // Hunter Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect + if (m_spellInfo->SpellFamilyFlags & 0x0000200000000014LL) m_canTrigger = true; + break; + case SPELLFAMILY_PALADIN: // For Holy Shock triggers need do it + if (m_spellInfo->SpellFamilyFlags & 0x0001000000200000LL) m_canTrigger = true; + break; + } + } + // Do not trigger from item cast spell + if (m_CastItem) + m_canTrigger = false; + + // Get data for type of attack and fill base info for trigger + switch (m_spellInfo->DmgClass) + { + case SPELL_DAMAGE_CLASS_MELEE: + m_procAttacker = PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT; + m_procVictim = PROC_FLAG_TAKEN_MELEE_SPELL_HIT; + break; + case SPELL_DAMAGE_CLASS_RANGED: + m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT; + m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT; + break; + default: + if (IsPositiveSpell(m_spellInfo->Id)) // Check for positive spell + { + m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL; + m_procVictim = PROC_FLAG_TAKEN_POSITIVE_SPELL; + } + else if (m_spellInfo->Id == 5019) // Wands + { + m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT; + m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT; + } + else + { + m_procAttacker = PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT; + m_procVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT; + } + break; + } + // Hunter traps spells (for Entrapment trigger) + // Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap .... + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x0000200000000014LL) + m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION; +} + void Spell::CleanupTargetList() { m_UniqueTargetInfo.clear(); @@ -836,83 +908,6 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex) m_UniqueItemInfo.push_back(target); } -void Spell::doTriggers(SpellMissInfo missInfo, uint32 damage, SpellSchoolMask damageSchoolMask, uint32 block, uint32 absorb, bool crit) -{ - // Do triggers depends from hit result (triggers on hit do in effects) - // Set aura states depends from hit result - if (missInfo!=SPELL_MISS_NONE) - { - // Miss/dodge/parry/block only for melee based spells - // Resist only for magic based spells - switch (missInfo) - { - case SPELL_MISS_MISS: - if(m_caster->GetTypeId()== TYPEID_PLAYER) - ((Player*)m_caster)->UpdateWeaponSkill(BASE_ATTACK); - - m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_MISS, m_spellInfo, m_IsTriggeredSpell); - break; - case SPELL_MISS_RESIST: - m_caster->ProcDamageAndSpell(unitTarget, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, damageSchoolMask, m_spellInfo, m_IsTriggeredSpell); - break; - case SPELL_MISS_DODGE: - if(unitTarget->GetTypeId() == TYPEID_PLAYER) - ((Player*)unitTarget)->UpdateDefense(); - - // Overpower - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_WARRIOR) - { - ((Player*) m_caster)->AddComboPoints(unitTarget, 1); - m_caster->StartReactiveTimer( REACTIVE_OVERPOWER ); - } - - // Riposte - if (unitTarget->getClass() != CLASS_ROGUE) - { - unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true); - unitTarget->StartReactiveTimer( REACTIVE_DEFENSE ); - } - - m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_DODGE, m_spellInfo, m_IsTriggeredSpell); - break; - case SPELL_MISS_PARRY: - // Update victim defense ? - if(unitTarget->GetTypeId() == TYPEID_PLAYER) - ((Player*)unitTarget)->UpdateDefense(); - // Mongoose bite - set only Counterattack here - if (unitTarget->getClass() == CLASS_HUNTER) - { - unitTarget->ModifyAuraState(AURA_STATE_HUNTER_PARRY,true); - unitTarget->StartReactiveTimer( REACTIVE_HUNTER_PARRY ); - } - else - { - unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true); - unitTarget->StartReactiveTimer( REACTIVE_DEFENSE ); - } - m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_PARRY, m_spellInfo, m_IsTriggeredSpell); - break; - case SPELL_MISS_BLOCK: - unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true); - unitTarget->StartReactiveTimer( REACTIVE_DEFENSE ); - - m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_BLOCK, m_spellInfo, m_IsTriggeredSpell); - break; - // Trigger from this events not supported - case SPELL_MISS_EVADE: - case SPELL_MISS_IMMUNE: - case SPELL_MISS_IMMUNE2: - case SPELL_MISS_DEFLECT: - case SPELL_MISS_ABSORB: - // Trigger from reflects need do after get reflect result - case SPELL_MISS_REFLECT: - break; - default: - break; - } - } -} - void Spell::DoAllEffectOnTarget(TargetInfo *target) { if (target->processed) // Check target @@ -928,11 +923,27 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) if (!unit) return; + // Get original caster (if exist) and calculate damage/healing from him data + Unit *caster = m_originalCasterGUID ? m_originalCaster : m_caster; + + // Skip if m_originalCaster not avaiable + if (!caster) + return; + SpellMissInfo missInfo = target->missCondition; // Need init unitTarget by default unit (can changed in code on reflect) // Or on missInfo!=SPELL_MISS_NONE unitTarget undefined (but need in trigger subsystem) unitTarget = unit; + // Reset damage/healing counter + m_damage = 0; + m_healing = 0; + + // Fill base trigger info + uint32 procAttacker = m_procAttacker; + uint32 procVictim = m_procVictim; + uint32 procEx = PROC_EX_NONE; + if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target DoSpellHitOnUnit(unit, mask); else if (missInfo == SPELL_MISS_REFLECT) // In case spell reflect from target, do all effect on caster (if hit) @@ -941,9 +952,103 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) DoSpellHitOnUnit(m_caster, mask); } - // Do triggers only on miss/resist/parry/dodge - if (missInfo!=SPELL_MISS_NONE) - doTriggers(missInfo); + // All calculated do it! + // Do healing and triggers + if (m_healing) + { + bool crit = caster->isSpellCrit(NULL, m_spellInfo, m_spellSchoolMask); + uint32 addhealth = m_healing; + if (crit) + { + procEx |= PROC_EX_CRITICAL_HIT; + addhealth = caster->SpellCriticalBonus(m_spellInfo, addhealth, NULL); + } + else + procEx |= PROC_EX_NORMAL_HIT; + + caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, crit); + + // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) + if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) + caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, addhealth, m_attackType, m_spellInfo); + + int32 gain = unitTarget->ModifyHealth( int32(addhealth) ); + + unitTarget->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, m_spellInfo); + if(caster->GetTypeId()==TYPEID_PLAYER) + if(BattleGround *bg = ((Player*)caster)->GetBattleGround()) + bg->UpdatePlayerScore(((Player*)caster), SCORE_HEALING_DONE, gain); + } + // Do damage and triggers + else if (m_damage) + { + // Fill base damage struct (unitTarget - is real spell target) + SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask); + + // Add bonuses and fill damageInfo struct + caster->CalculateSpellDamage(&damageInfo, m_damage, m_spellInfo); + + // Send log damage message to client + caster->SendSpellNonMeleeDamageLog(&damageInfo); + + procEx = createProcExtendMask(&damageInfo, missInfo); + procVictim |= PROC_FLAG_TAKEN_ANY_DAMAGE; + + // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) + if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) + caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); + + caster->DealSpellDamage(&damageInfo, true); + + // Shadow Word: Death - deals damage equal to damage done to caster if victim is not killed + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellInfo->SpellFamilyFlags&0x0000000200000000LL && + caster != unitTarget && unitTarget->isAlive()) + { + // Redirect damage to caster if victim Alive + damageInfo.target = caster; + damageInfo.absorb = 0; + damageInfo.resist = 0; + damageInfo.blocked = 0; + // Send log damage message to client + caster->SendSpellNonMeleeDamageLog(&damageInfo); + caster->DealSpellDamage(&damageInfo, true); + } + // Judgement of Blood + else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL && m_spellInfo->SpellIconID==153) + { + int32 damagePoint = damageInfo.damage * 33 / 100; + m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); + } + // Bloodthirst + else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellInfo->SpellFamilyFlags & 0x40000000000LL) + { + uint32 BTAura = 0; + switch(m_spellInfo->Id) + { + case 23881: BTAura = 23885; break; + case 23892: BTAura = 23886; break; + case 23893: BTAura = 23887; break; + case 23894: BTAura = 23888; break; + case 25251: BTAura = 25252; break; + case 30335: BTAura = 30339; break; + default: + sLog.outError("Spell::EffectSchoolDMG: Spell %u not handled in BTAura",m_spellInfo->Id); + break; + } + if (BTAura) + m_caster->CastSpell(m_caster,BTAura,true); + } + } + // Passive spell hits/misses or active spells only misses (only triggers) + else + { + // Fill base damage struct (unitTarget - is real spell target) + SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask); + procEx = createProcExtendMask(&damageInfo, missInfo); + // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) + if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) + caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo); + } // Call scripted function for AI if this spell is casted upon a creature (except pets) if(IS_CREATURE_GUID(target->targetGUID)) @@ -1984,6 +2089,9 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) return; } + // Prepare data for triggers + prepareDataForTriggerSystem(); + // calculate cast time (calculated after first CanCast check to prevent charge counting for first CanCast fail) m_casttime = GetSpellCastTime(m_spellInfo, this); @@ -2137,15 +2245,6 @@ void Spell::cast(bool skipCheck) SendCastResult(castResult); SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... - // Pass cast spell event to handler (not send triggered by aura spells) - if (m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE && m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_RANGED && !m_triggeredByAuraSpell) - { - m_caster->ProcDamageAndSpell(m_targets.getUnitTarget(), PROC_FLAG_CAST_SPELL, PROC_FLAG_NONE, 0, SPELL_SCHOOL_MASK_NONE, m_spellInfo, m_IsTriggeredSpell); - - // update pointers base at GUIDs to prevent access to non-existed already object - UpdatePointers(); // pointers can be invalidate at triggered spell casting - } - // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells if (m_spellInfo->speed > 0.0f) { @@ -2557,6 +2656,13 @@ void Spell::finish(bool ok) } } + // Heal caster for all health leech from all targets + if (m_healthLeech) + { + m_caster->ModifyHealth(m_healthLeech); + m_caster->SendHealSpellLog(m_caster, m_spellInfo->Id, uint32(m_healthLeech)); + } + if (IsMeleeAttackResetSpell()) { m_caster->resetAttackTimer(BASE_ATTACK); @@ -3529,8 +3635,12 @@ uint8 Spell::CanCast(bool strict) //Must be behind the target. if( m_spellInfo->AttributesEx2 == 0x100000 && (m_spellInfo->AttributesEx & 0x200) == 0x200 && target->HasInArc(M_PI, m_caster) ) { - SendInterrupted(2); - return SPELL_FAILED_NOT_BEHIND; + //Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags + if( m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || m_spellInfo->SpellFamilyFlags != 0x0000000000020000LL ) + { + SendInterrupted(2); + return SPELL_FAILED_NOT_BEHIND; + } } //Target must be facing you. @@ -3714,8 +3824,9 @@ uint8 Spell::CanCast(bool strict) } } - if(uint8 castResult = CheckRange(strict)) - return castResult; + if(!m_triggeredByAuraSpell) + if(uint8 castResult = CheckRange(strict)) + return castResult; { if(uint8 castResult = CheckPower()) diff --git a/src/game/Spell.h b/src/game/Spell.h index b6b2fbbc8..2d2367028 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -480,10 +480,18 @@ class Spell // ------------------------------------------- GameObject* focusObject; + // Damage and healing in effects need just calculate + int32 m_damage; // Damge in effects count here + int32 m_healing; // Healing in effects count here + int32 m_healthLeech; // Health leech in effects for all targets count here + //****************************************** // Spell trigger system //****************************************** - void doTriggers(SpellMissInfo missInfo, uint32 damage=0, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NONE, uint32 block=0, uint32 absorb=0, bool crit=false); + bool m_canTrigger; // Can start trigger (m_IsTriggeredSpell can`t use for this) + uint32 m_procAttacker; // Attacker trigger flags + uint32 m_procVictim; // Victim trigger flags + void prepareDataForTriggerSystem(); //***************************************** // Spell target subsystem diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 342987d57..18f354fc1 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -273,7 +273,7 @@ enum AuraType SPELL_AURA_DETECT_STEALTH = 228, SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE = 229, SPELL_AURA_230 = 230, - SPELL_AURA_231 = 231, + SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE = 231, SPELL_AURA_MECHANIC_DURATION_MOD = 232, SPELL_AURA_233 = 233, SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK = 234, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e8fb6ccd6..89ec19055 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -253,8 +253,8 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_XP_PCT implemented in Player::GiveXP &Aura::HandleAuraAllowFlight, //201 SPELL_AURA_FLY this aura enable flight mode... &Aura::HandleNoImmediateEffect, //202 SPELL_AURA_CANNOT_BE_DODGED implemented in Unit::RollPhysicalOutcomeAgainst - &Aura::HandleNoImmediateEffect, //203 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE implemented in Unit::DoAttackDamage - &Aura::HandleNoImmediateEffect, //204 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE implemented in Unit::DoAttackDamage + &Aura::HandleNoImmediateEffect, //203 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::CalculateSpellDamage + &Aura::HandleNoImmediateEffect, //204 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::CalculateSpellDamage &Aura::HandleNULL, //205 vulnerable to school dmg? &Aura::HandleNULL, //206 SPELL_AURA_MOD_SPEED_MOUNTED &Aura::HandleAuraModIncreaseFlightSpeed, //207 SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED @@ -281,7 +281,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //228 stealth detection &Aura::HandleNULL, //229 SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE &Aura::HandleAuraModIncreaseMaxHealth, //230 Commanding Shout - &Aura::HandleNULL, //231 + &Aura::HandleNoImmediateEffect, //231 SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE &Aura::HandleNoImmediateEffect, //232 SPELL_AURA_MECHANIC_DURATION_MOD implement in Unit::CalculateSpellDuration &Aura::HandleNULL, //233 set model id to the one of the creature with id m_modifier.m_miscvalue &Aura::HandleNoImmediateEffect, //234 SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK implement in Unit::CalculateSpellDuration @@ -1204,7 +1204,10 @@ void Aura::HandleAddModifier(bool apply, bool Real) { case 17941: // Shadow Trance case 22008: // Netherwind Focus + case 31834: // Light's Grace + case 34754: // Clearcasting case 34936: // Backlash + case 48108: // Hot Streak m_procCharges = 1; break; } @@ -5786,11 +5789,15 @@ void Aura::PeriodicTick() Unit* target = m_target; // aura can be deleted in DealDamage SpellEntry const* spellProto = GetSpellProto(); - pCaster->DealDamage(m_target, (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist), &cleanDamage, DOT, GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), true); + // Set trigger flag + uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT; + uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;// | PROC_FLAG_TAKEN_HARMFUL_SPELL_HIT; + pdamage = (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist); + if (pdamage) + procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE; + pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto); - // DO NOT ACCESS MEMBERS OF THE AURA FROM NOW ON (DealDamage can delete aura) - - pCaster->ProcDamageAndSpell(target, PROC_FLAG_NONE, PROC_FLAG_TAKE_DAMAGE, (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist), GetSpellSchoolMask(spellProto), spellProto); + pCaster->DealDamage(target, pdamage, &cleanDamage, DOT, GetSpellSchoolMask(spellProto), spellProto, true); break; } case SPELL_AURA_PERIODIC_LEECH: @@ -5899,11 +5906,15 @@ void Aura::PeriodicTick() SpellEntry const* spellProto = GetSpellProto(); float multiplier = spellProto->EffectMultipleValue[GetEffIndex()] > 0 ? spellProto->EffectMultipleValue[GetEffIndex()] : 1; - uint32 new_damage = pCaster->DealDamage(m_target, (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist), &cleanDamage, DOT, GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), false); + // Set trigger flag + uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT; + uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;// | PROC_FLAG_TAKEN_HARMFUL_SPELL_HIT; + pdamage = (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist); + if (pdamage) + procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE; + pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto); + int32 new_damage = pCaster->DealDamage(target, pdamage, &cleanDamage, DOT, GetSpellSchoolMask(spellProto), spellProto, false); - // DO NOT ACCESS MEMBERS OF THE AURA FROM NOW ON (DealDamage can delete aura) - - pCaster->ProcDamageAndSpell(target, PROC_FLAG_HEALED, PROC_FLAG_TAKE_DAMAGE, new_damage, GetSpellSchoolMask(spellProto), spellProto); if (!target->isAlive() && pCaster->IsNonMeleeSpellCasted(false)) { for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++) @@ -6005,9 +6016,11 @@ void Aura::PeriodicTick() } } + uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HEAL; + uint32 procVictim = 0;//ROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEAL; // ignore item heals - if(procSpell && !haveCastItem) - pCaster->ProcDamageAndSpell(target,PROC_FLAG_NONE, PROC_FLAG_HEALED, pdamage, SPELL_SCHOOL_MASK_NONE, spellProto); +// if(procSpell && !haveCastItem) +// pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto); break; } case SPELL_AURA_PERIODIC_MANA_LEECH: @@ -6166,8 +6179,22 @@ void Aura::PeriodicTick() gain = uint32(gain * GetSpellProto()->EffectMultipleValue[GetEffIndex()]); + SpellEntry const* spellProto = GetSpellProto(); //maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG - pCaster->SpellNonMeleeDamageLog(m_target, GetId(), gain); + SpellNonMeleeDamage damageInfo(pCaster, m_target, spellProto->Id, spellProto->SchoolMask); + pCaster->CalculateSpellDamage(&damageInfo, gain, spellProto); + pCaster->SendSpellNonMeleeDamageLog(&damageInfo); + + // Set trigger flag + uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT; + uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;// | PROC_FLAG_TAKEN_HARMFUL_SPELL_HIT; + uint32 procEx = createProcExtendMask(&damageInfo, SPELL_MISS_NONE); + if (damageInfo.damage) + procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE; + + pCaster->ProcDamageAndSpell(damageInfo.target, procAttacker, procVictim, procEx, damageInfo.damage, BASE_ATTACK, spellProto); + + pCaster->DealSpellDamage(&damageInfo, true); break; } // Here tick dummy auras diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 56d86dc87..91a88851f 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -616,61 +616,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) } if(damage >= 0) - { - uint32 finalDamage; - if(m_originalCaster) // m_caster only passive source of cast - finalDamage = m_originalCaster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage, m_IsTriggeredSpell, true); - else - finalDamage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage, m_IsTriggeredSpell, true); - - // post effects - switch(m_spellInfo->SpellFamilyName) - { - case SPELLFAMILY_WARRIOR: - { - // Bloodthirst - if(m_spellInfo->SpellFamilyFlags & 0x40000000000LL) - { - uint32 BTAura = 0; - switch(m_spellInfo->Id) - { - case 23881: BTAura = 23885; break; - case 23892: BTAura = 23886; break; - case 23893: BTAura = 23887; break; - case 23894: BTAura = 23888; break; - case 25251: BTAura = 25252; break; - case 30335: BTAura = 30339; break; - default: - sLog.outError("Spell::EffectSchoolDMG: Spell %u not handled in BTAura",m_spellInfo->Id); - break; - } - - if (BTAura) - m_caster->CastSpell(m_caster,BTAura,true); - } - break; - } - case SPELLFAMILY_PRIEST: - { - // Shadow Word: Death - if(finalDamage > 0 && (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL) && unitTarget->isAlive()) - // deals damage equal to damage done to caster if victim is not killed - m_caster->SpellNonMeleeDamageLog( m_caster, m_spellInfo->Id, finalDamage, m_IsTriggeredSpell, false); - - break; - } - case SPELLFAMILY_PALADIN: - { - // Judgement of Blood - if(finalDamage > 0 && (m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL) && m_spellInfo->SpellIconID==153) - { - int32 damagePoint = finalDamage * 33 / 100; - m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); - } - break; - } - } - } + m_damage+= damage; } } @@ -1486,7 +1432,7 @@ void Spell::EffectDummy(uint32 i) } if(found) - m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage, m_IsTriggeredSpell, true); + m_damage+= damage; return; } // Kill command @@ -2437,7 +2383,7 @@ void Spell::EffectPowerBurn(uint32 i) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, multiplier); new_damage = int32(new_damage*multiplier); - m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, new_damage, m_IsTriggeredSpell, true); + m_damage+=new_damage; } void Spell::EffectHeal( uint32 /*i*/ ) @@ -2505,27 +2451,7 @@ void Spell::EffectHeal( uint32 /*i*/ ) else addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget); - bool crit = caster->isSpellCrit(unitTarget, m_spellInfo, m_spellSchoolMask, m_attackType); - if (crit) - addhealth = caster->SpellCriticalBonus(m_spellInfo, addhealth, unitTarget); - caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, crit); - - int32 gain = unitTarget->ModifyHealth( int32(addhealth) ); - unitTarget->getHostilRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo); - - if(caster->GetTypeId()==TYPEID_PLAYER) - if(BattleGround *bg = ((Player*)caster)->GetBattleGround()) - bg->UpdatePlayerScore(((Player*)caster), SCORE_HEALING_DONE, gain); - - // ignore item heals - if(m_CastItem) - return; - - uint32 procHealer = PROC_FLAG_HEAL; - if (crit) - procHealer |= PROC_FLAG_CRIT_HEAL; - - m_caster->ProcDamageAndSpell(unitTarget,procHealer,PROC_FLAG_HEALED,addhealth,SPELL_SCHOOL_MASK_NONE,m_spellInfo,m_IsTriggeredSpell); + m_healing+=addhealth; } } @@ -2602,6 +2528,8 @@ void Spell::EffectHealthLeech(uint32 i) if(m_caster->GetTypeId() == TYPEID_PLAYER) m_caster->SendHealSpellLog(m_caster, m_spellInfo->Id, uint32(new_damage)); } +// m_healthLeech+=tmpvalue; +// m_damage+=new_damage; } void Spell::DoCreateItem(uint32 i, uint32 itemtype) @@ -3283,7 +3211,7 @@ void Spell::EffectSummon(uint32 i) uint32 level = m_caster->getLevel(); Pet* spawnCreature = new Pet(SUMMON_PET); - if(spawnCreature->LoadPetFromDB(m_caster,pet_entry)) + if(m_caster->GetTypeId()==TYPEID_PLAYER && spawnCreature->LoadPetFromDB((Player*)m_caster,pet_entry)) { // set timer for unsummon int32 duration = GetSpellDuration(m_spellInfo); @@ -4099,7 +4027,7 @@ void Spell::EffectSummonPet(uint32 i) Pet* NewSummon = new Pet; // petentry==0 for hunter "call pet" (current pet summoned if any) - if(NewSummon->LoadPetFromDB(m_caster,petentry)) + if(m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster,petentry)) { if(NewSummon->getPetType()==SUMMON_PET) { @@ -4184,7 +4112,8 @@ void Spell::EffectSummonPet(uint32 i) // this enables pet details window (Shift+P) // this enables popup window (pet dismiss, cancel), hunter pet additional flags set later - NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + if(m_caster->GetTypeId() == TYPEID_PLAYER) + NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); NewSummon->InitStatsForLevel(petlevel); NewSummon->InitPetCreateSpells(); @@ -4451,35 +4380,9 @@ void Spell::EffectWeaponDmg(uint32 i) // prevent negative damage uint32 eff_damage = uint32(bonus > 0 ? bonus : 0); - const uint32 nohitMask = HITINFO_ABSORB | HITINFO_RESIST | HITINFO_MISS; - - uint32 hitInfo = 0; - VictimState victimState = VICTIMSTATE_NORMAL; - uint32 blocked_dmg = 0; - uint32 absorbed_dmg = 0; - uint32 resisted_dmg = 0; - CleanDamage cleanDamage = CleanDamage(0, BASE_ATTACK, MELEE_HIT_NORMAL ); - - m_caster->DoAttackDamage(unitTarget, &eff_damage, &cleanDamage, &blocked_dmg, m_spellSchoolMask, &hitInfo, &victimState, &absorbed_dmg, &resisted_dmg, m_attackType, m_spellInfo, m_IsTriggeredSpell); - - if ((hitInfo & nohitMask) && m_attackType != RANGED_ATTACK) // not send ranged miss/etc - m_caster->SendAttackStateUpdate(hitInfo & nohitMask, unitTarget, 1, m_spellSchoolMask, eff_damage, absorbed_dmg, resisted_dmg, VICTIMSTATE_NORMAL, blocked_dmg); - - bool criticalhit = (hitInfo & HITINFO_CRITICALHIT); - m_caster->SendSpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, eff_damage, m_spellSchoolMask, absorbed_dmg, resisted_dmg, false, blocked_dmg, criticalhit); - - if (eff_damage > (absorbed_dmg + resisted_dmg + blocked_dmg)) - { - eff_damage -= (absorbed_dmg + resisted_dmg + blocked_dmg); - } - else - { - cleanDamage.damage += eff_damage; - eff_damage = 0; - } - - // SPELL_SCHOOL_NORMAL use for weapon-like threat and rage calculation - m_caster->DealDamage(unitTarget, eff_damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true); + // Add melee damage bonuses (also check for negative) + m_caster->MeleeDamageBonus(unitTarget, &eff_damage, m_attackType, m_spellInfo); + m_damage+= eff_damage; // Hemorrhage if(m_spellInfo->SpellFamilyName==SPELLFAMILY_ROGUE && (m_spellInfo->SpellFamilyFlags & 0x2000000)) @@ -4543,10 +4446,7 @@ void Spell::EffectHealMaxHealth(uint32 /*i*/) uint32 heal = m_caster->GetMaxHealth(); - int32 gain = unitTarget->ModifyHealth(heal); - unitTarget->getHostilRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo); - - m_caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, heal); + m_healing+=heal; } void Spell::EffectInterruptCast(uint32 /*i*/) @@ -5337,8 +5237,6 @@ void Spell::EffectApplyGlyph(uint32 i) player->CastSpell(m_caster, gp->SpellId, true); player->SetGlyph(m_glyphIndex, glyph); - if(m_CastItem) - player->DestroyItemCount(m_CastItem->GetEntry(), 1, true); } } } @@ -5411,7 +5309,9 @@ void Spell::EffectSummonTotem(uint32 i) } pTotem->SetUInt32Value(UNIT_CREATED_BY_SPELL,m_spellInfo->Id); - pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + + if(m_caster->GetTypeId() == TYPEID_PLAYER) + pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_MOD_FEAR,true); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_TRANSFORM,true); diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 8a4a2f60a..5e3d660b0 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -282,6 +282,16 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data ) obj->Use(_player); } +void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) +{ + CHECK_PACKET_SIZE(recvPacket,8); + + uint64 guid; + recvPacket >> guid; + + sLog.outDebug( "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid)); +} + void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) { CHECK_PACKET_SIZE(recvPacket,1+4+1); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index b39a33d27..5ae1bc199 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -176,7 +176,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (IsSealSpell(spellInfo)) return SPELL_SEAL; - if (spellInfo->SpellFamilyFlags & 0x10000100LL) + if (spellInfo->SpellFamilyFlags & 0x0000000011010002LL) return SPELL_BLESSING; if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200)) @@ -530,6 +530,17 @@ bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellI return false; } +bool IsAuraAddedBySpell(uint32 auraType, uint32 spellId) +{ + SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId); + if (!spellproto) return false; + + for (int i = 0; i < 3; i++) + if (spellproto->EffectApplyAuraName[i] == auraType) + return true; + return false; +} + uint8 GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 form) { // talents that learn spells can have stance requirements that need ignore @@ -805,8 +816,8 @@ void SpellMgr::LoadSpellProcEvents() uint32 count = 0; - // 0 1 2 3 4 5 6 7 8 - QueryResult *result = WorldDatabase.Query("SELECT entry, SchoolMask, Category, SkillID, SpellFamilyName, SpellFamilyMask, procFlags, ppmRate, cooldown FROM spell_proc_event"); + // 0 1 2 3 4 5 6 7 8 + QueryResult *result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event"); if( !result ) { @@ -820,7 +831,7 @@ void SpellMgr::LoadSpellProcEvents() } barGoLink bar( result->GetRowCount() ); - + uint32 customProc = 0; do { Field *fields = result->Fetch(); @@ -829,7 +840,8 @@ void SpellMgr::LoadSpellProcEvents() uint16 entry = fields[0].GetUInt16(); - if (!sSpellStore.LookupEntry(entry)) + const SpellEntry *spell = sSpellStore.LookupEntry(entry); + if (!spell) { sLog.outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); continue; @@ -838,91 +850,101 @@ void SpellMgr::LoadSpellProcEvents() SpellProcEventEntry spe; spe.schoolMask = fields[1].GetUInt32(); - spe.category = fields[2].GetUInt32(); - spe.skillId = fields[3].GetUInt32(); - spe.spellFamilyName = fields[4].GetUInt32(); - spe.spellFamilyMask = fields[5].GetUInt64(); - spe.procFlags = fields[6].GetUInt32(); - spe.ppmRate = fields[7].GetFloat(); + spe.spellFamilyName = fields[2].GetUInt32(); + spe.spellFamilyMask = fields[3].GetUInt64(); + spe.procFlags = fields[4].GetUInt32(); + spe.procEx = fields[5].GetUInt32(); + spe.ppmRate = fields[6].GetFloat(); + spe.customChance = fields[7].GetFloat(); spe.cooldown = fields[8].GetUInt32(); mSpellProcEventMap[entry] = spe; + if (spell->procFlags==0) + { + if (spe.procFlags == 0) + { + sLog.outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); + continue; + } + customProc++; + } ++count; } while( result->NextRow() ); delete result; sLog.outString(); - sLog.outString( ">> Loaded %u spell proc event conditions", count ); - - /* - // Commented for now, as it still produces many errors (still quite many spells miss spell_proc_event) - for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id) - { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(id); - if (!spellInfo) - continue; - - bool found = false; - for (int effectId = 0; effectId < 3; ++effectId) - { - // at this moment check only SPELL_AURA_PROC_TRIGGER_SPELL - if( spellInfo->EffectApplyAuraName[effectId] == SPELL_AURA_PROC_TRIGGER_SPELL ) - { - found = true; - break; - } - } - - if(!found) - continue; - - if(GetSpellProcEvent(id)) - continue; - - sLog.outErrorDb("Spell %u (%s) misses spell_proc_event",id,spellInfo->SpellName[sWorld.GetDBClang()]); - } - */ + if (customProc) + sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc ); + else + sLog.outString( ">> Loaded %u extra spell proc event conditions", count ); } -bool SpellMgr::IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, SpellEntry const * procSpell, uint32 procFlags ) +bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active) { - if((procFlags & spellProcEvent->procFlags) == 0) + // No extra req need + uint32 procEvent_procEx = PROC_EX_NONE; + + // check prockFlags for condition + if((procFlags & EventProcFlag) == 0) return false; - // Additional checks in case spell cast/hit/crit is the event - // Check (if set) school, category, skill line, spell talent mask - if(spellProcEvent->schoolMask && (!procSpell || (GetSpellSchoolMask(procSpell) & spellProcEvent->schoolMask) == 0)) - return false; - if(spellProcEvent->category && (!procSpell || procSpell->Category != spellProcEvent->category)) - return false; - if(spellProcEvent->skillId) + // Always trigger for this + if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL_AND_GET_XP)) + return true; + + if (spellProcEvent) // Exist event data { - if (!procSpell) - return false; + // Store extra req + procEvent_procEx = spellProcEvent->procEx; - SkillLineAbilityMap::const_iterator lower = spellmgr.GetBeginSkillLineAbilityMap(procSpell->Id); - SkillLineAbilityMap::const_iterator upper = spellmgr.GetEndSkillLineAbilityMap(procSpell->Id); - - bool found = false; - for(SkillLineAbilityMap::const_iterator _spell_idx = lower; _spell_idx != upper; ++_spell_idx) + // For melee triggers + if (procSpell == NULL) { - if(_spell_idx->second->skillId == spellProcEvent->skillId) + // Check (if set) for school (melee attack have Normal school) + if(spellProcEvent->schoolMask && (spellProcEvent->schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0) + return false; + } + else // For spells need check school/spell family/family mask + { + // Check (if set) for school + if(spellProcEvent->schoolMask && (spellProcEvent->schoolMask & procSpell->SchoolMask) == 0) + return false; + + // Check (if set) for spellFamilyName + if(spellProcEvent->spellFamilyName && (spellProcEvent->spellFamilyName != procSpell->SpellFamilyName)) + return false; + + // spellFamilyName is Ok need check for spellFamilyMask if present + if(spellProcEvent->spellFamilyMask) { - found = true; - break; + if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags) == 0) + return false; + active = true; // Spell added manualy -> so its active spell } } - if (!found) - return false; } - if(spellProcEvent->spellFamilyName && (!procSpell || spellProcEvent->spellFamilyName != procSpell->SpellFamilyName)) - return false; - if(spellProcEvent->spellFamilyMask && (!procSpell || (spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags) == 0)) - return false; - - return true; + // Check for extra req (if none) and hit/crit + if (procEvent_procEx == PROC_EX_NONE) + { + // No extra req, so can trigger only for active (damage/healing present) and hit/crit + if((procExtra & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) && active) + return true; + } + else // Passive spells hits here only if resist/reflect/immune/evade + { + // Exist req for PROC_EX_EX_TRIGGER_ALWAYS + if (procEvent_procEx & PROC_EX_EX_TRIGGER_ALWAYS) + return true; + // Passive spells can`t trigger if need hit + if ((procEvent_procEx & PROC_EX_NORMAL_HIT) && !active) + return false; + // Check Extra Requirement like (hit/crit/miss/resist/parry/dodge/block/immune/reflect/absorb and other) + if (procEvent_procEx & procExtra) + return true; + } + return false; } void SpellMgr::LoadSpellElixirs() @@ -1728,8 +1750,10 @@ void SpellMgr::LoadSpellLearnSpells() if(!sSpellStore.LookupEntry(dbc_node.spell)) continue; - // talent or passive spells or skill-step spells auto-casted, other required explicit dependent learning - dbc_node.autoLearned = GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP); + // talent or passive spells or skill-step spells auto-casted and not need dependent learning, + // pet teaching spells don't must be dependent learning (casted) + // other required explicit dependent learning + dbc_node.autoLearned = entry->EffectImplicitTargetA[i]==TARGET_PET || GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP); SpellLearnSpellMap::const_iterator db_node_begin = GetBeginSpellLearnSpell(spell); SpellLearnSpellMap::const_iterator db_node_end = GetEndSpellLearnSpell(spell); diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 9db1b1ee7..d7870cccc 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -301,7 +301,7 @@ inline bool IsSealSpell(SpellEntry const *spellInfo) { //Collection of all the seal family flags. No other paladin spell has any of those. return spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && - ( spellInfo->SpellFamilyFlags & 0x4000A000200LL ); + ( spellInfo->SpellFamilyFlags & 0x26000C000A000000LL ); } inline bool IsElementalShield(SpellEntry const *spellInfo) @@ -339,6 +339,8 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB); bool IsSingleTargetSpell(SpellEntry const *spellInfo); bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellInfo2); +bool IsAuraAddedBySpell(uint32 auraType, uint32 spellId); + bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 zone_id,uint32 area_id); inline bool IsAreaEffectTarget( Targets target ) @@ -462,50 +464,86 @@ typedef UNORDERED_MAP SpellAffectMap; // Spell proc event related declarations (accessed using SpellMgr functions) enum ProcFlags { - PROC_FLAG_NONE = 0x00000000, // None - PROC_FLAG_HIT_MELEE = 0x00000001, // On melee hit - PROC_FLAG_STRUCK_MELEE = 0x00000002, // On being struck melee - PROC_FLAG_KILL_XP_GIVER = 0x00000004, // On kill target giving XP or honor - PROC_FLAG_SPECIAL_DROP = 0x00000008, // - PROC_FLAG_DODGE = 0x00000010, // On dodge melee attack - PROC_FLAG_PARRY = 0x00000020, // On parry melee attack - PROC_FLAG_BLOCK = 0x00000040, // On block attack - PROC_FLAG_TOUCH = 0x00000080, // On being touched (for bombs, probably?) - PROC_FLAG_TARGET_LOW_HEALTH = 0x00000100, // On deal damage to enemy with 20% or less health - PROC_FLAG_LOW_HEALTH = 0x00000200, // On health dropped below 20% - PROC_FLAG_STRUCK_RANGED = 0x00000400, // On being struck ranged - PROC_FLAG_HIT_SPECIAL = 0x00000800, // (!)Removed, may be reassigned in future - PROC_FLAG_CRIT_MELEE = 0x00001000, // On crit melee - PROC_FLAG_STRUCK_CRIT_MELEE = 0x00002000, // On being critically struck in melee - PROC_FLAG_CAST_SPELL = 0x00004000, // On cast spell - PROC_FLAG_TAKE_DAMAGE = 0x00008000, // On take damage - PROC_FLAG_CRIT_SPELL = 0x00010000, // On crit spell - PROC_FLAG_HIT_SPELL = 0x00020000, // On hit spell - PROC_FLAG_STRUCK_CRIT_SPELL = 0x00040000, // On being critically struck by a spell - PROC_FLAG_HIT_RANGED = 0x00080000, // On getting ranged hit - PROC_FLAG_STRUCK_SPELL = 0x00100000, // On being struck by a spell - PROC_FLAG_TRAP = 0x00200000, // On trap activation (?) - PROC_FLAG_CRIT_RANGED = 0x00400000, // On getting ranged crit - PROC_FLAG_STRUCK_CRIT_RANGED = 0x00800000, // On being critically struck by a ranged attack - PROC_FLAG_RESIST_SPELL = 0x01000000, // On resist enemy spell - PROC_FLAG_TARGET_RESISTS = 0x02000000, // On enemy resisted spell - PROC_FLAG_TARGET_DODGE_OR_PARRY = 0x04000000, // On enemy dodges/parries - PROC_FLAG_HEAL = 0x08000000, // On heal - PROC_FLAG_CRIT_HEAL = 0x10000000, // On critical healing effect - PROC_FLAG_HEALED = 0x20000000, // On healing - PROC_FLAG_TARGET_BLOCK = 0x40000000, // On enemy blocks - PROC_FLAG_MISS = 0x80000000 // On miss melee attack + PROC_FLAG_NONE = 0x00000000, + + PROC_FLAG_KILLED = 0x00000001, // 00 Killed by agressor + PROC_FLAG_KILL_AND_GET_XP = 0x00000002, // 01 Kill that yields experience or honor + + PROC_FLAG_SUCCESSFUL_MILEE_HIT = 0x00000004, // 02 Successful melee auto attack + PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee auto attack hit + + PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT = 0x00000010, // 04 Successful attack by Spell that use melee weapon + PROC_FLAG_TAKEN_MELEE_SPELL_HIT = 0x00000020, // 05 Taken damage by Spell that use melee weapon + + PROC_FLAG_SUCCESSFUL_RANGED_HIT = 0x00000040, // 06 Successful Ranged auto attack + PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged auto attack + + PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT = 0x00000100, // 08 Successful Ranged attack by Spell that use ranged weapon + PROC_FLAG_TAKEN_RANGED_SPELL_HIT = 0x00000200, // 09 Taken damage by Spell that use ranged weapon + + PROC_FLAG_SUCCESSFUL_POSITIVE_AOE_HIT = 0x00000400, // 10 Successful AoE (not 100% shure unused) + PROC_FLAG_TAKEN_POSITIVE_AOE = 0x00000800, // 11 Taken AoE (not 100% shure unused) + + PROC_FLAG_SUCCESSFUL_AOE_SPELL_HIT = 0x00001000, // 12 Successful AoE damage spell hit (not 100% shure unused) + PROC_FLAG_TAKEN_AOE_SPELL_HIT = 0x00002000, // 13 Taken AoE damage spell hit (not 100% shure unused) + + PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL = 0x00004000, // 14 Successful cast positive spell (by default only on healing) + PROC_FLAG_TAKEN_POSITIVE_SPELL = 0x00008000, // 15 Taken positive spell hit (by default only on healing) + + PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT = 0x00010000, // 16 Successful negative spell cast (by default only on damage) + PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT = 0x00020000, // 17 Taken negative spell (by default only on damage) + + PROC_FLAG_ON_DO_PERIODIC = 0x00040000, // 18 Successful do periodic (damage / healing, determined from 14-17 flags) + PROC_FLAG_ON_TAKE_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage / healing, determined from 14-17 flags) + + PROC_FLAG_TAKEN_ANY_DAMAGE = 0x00100000, // 20 Taken any damage + PROC_FLAG_ON_TRAP_ACTIVATION = 0x00200000, // 21 On trap activation + + PROC_FLAG_TAKEN_OFFHAND_HIT = 0x00400000, // 22 Taken off-hand melee attacks(not used) + PROC_FLAG_SUCCESSFUL_OFFHAND_HIT = 0x00800000 // 23 Successful off-hand melee attacks +}; + +#define MELEE_BASED_TRIGGER_MASK (PROC_FLAG_SUCCESSFUL_MILEE_HIT | \ + PROC_FLAG_TAKEN_MELEE_HIT | \ + PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT | \ + PROC_FLAG_TAKEN_MELEE_SPELL_HIT | \ + PROC_FLAG_SUCCESSFUL_RANGED_HIT | \ + PROC_FLAG_TAKEN_RANGED_HIT | \ + PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT | \ + PROC_FLAG_TAKEN_RANGED_SPELL_HIT) + +enum ProcFlagsEx +{ + PROC_EX_NONE = 0x0000000, // If none can tigger on Hit/Crit only (passive spells MUST defined by SpellFamily flag) + PROC_EX_NORMAL_HIT = 0x0000001, // If set only from normal hit (only damage spells) + PROC_EX_CRITICAL_HIT = 0x0000002, + PROC_EX_MISS = 0x0000004, + PROC_EX_RESIST = 0x0000008, + PROC_EX_DODGE = 0x0000010, + PROC_EX_PARRY = 0x0000020, + PROC_EX_BLOCK = 0x0000040, + PROC_EX_EVADE = 0x0000080, + PROC_EX_IMMUNE = 0x0000100, + PROC_EX_DEFLECT = 0x0000200, + PROC_EX_ABSORB = 0x0000400, + PROC_EX_REFLECT = 0x0000800, + PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used) + PROC_EX_RESERVED1 = 0x0002000, + PROC_EX_RESERVED2 = 0x0004000, + PROC_EX_RESERVED3 = 0x0008000, + PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges + PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time (not used) }; struct SpellProcEventEntry { uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2 - uint32 category; // if nonzero - match proc condition based on candidate spell's category - uint32 skillId; // if nonzero - for matching proc condition based on candidate spell's skillId from SkillLineAbility.dbc (Shadow Bolt = Destruction) uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value uint64 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) uint32 procFlags; // bitmask for matching proc event + uint32 procEx; // proc Extend info (see ProcFlagsEx) float ppmRate; // for melee (ranged?) damage spells - proc rate per minute. if zero, falls back to flat chance from Spell.dbc + float customChance; // Owerride chance (in most cases for debug only) uint32 cooldown; // hidden cooldown used for some spell proc events, applied to _triggered_spell_ }; @@ -707,7 +745,7 @@ class SpellMgr return NULL; } - static bool IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, SpellEntry const * procSpell, uint32 procFlags ); + static bool IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active); // Spell target coordinates SpellTargetPosition const* GetSpellTargetPosition(uint32 spell_id) const diff --git a/src/game/Tools.h b/src/game/Tools.h deleted file mode 100644 index e8ad44a22..000000000 --- a/src/game/Tools.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2005-2008 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 MANGOS_TOOLS_H -#define MANGOS_TOOLS_H - -#include "Common.h" -#include "WorldPacket.h" - -bool readGUID(WorldPacket & data, uint64& guid); -void writeGUID(WorldPacket & data, uint64 & guid); -#endif diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 29fd84654..a339e1baa 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -59,68 +59,14 @@ float baseMoveSpeed[MAX_MOVE_TYPE] = 3.14f // MOVE_PITCH_RATE }; -// auraTypes contains attacker auras capable of proc'ing cast auras -static Unit::AuraTypeSet GenerateAttakerProcCastAuraTypes() -{ - static Unit::AuraTypeSet auraTypes; - auraTypes.insert(SPELL_AURA_DUMMY); - auraTypes.insert(SPELL_AURA_PROC_TRIGGER_SPELL); - auraTypes.insert(SPELL_AURA_MOD_HASTE); - auraTypes.insert(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); - return auraTypes; -} - -// auraTypes contains victim auras capable of proc'ing cast auras -static Unit::AuraTypeSet GenerateVictimProcCastAuraTypes() -{ - static Unit::AuraTypeSet auraTypes; - auraTypes.insert(SPELL_AURA_DUMMY); - auraTypes.insert(SPELL_AURA_PRAYER_OF_MENDING); - auraTypes.insert(SPELL_AURA_PROC_TRIGGER_SPELL); - return auraTypes; -} - -// auraTypes contains auras capable of proc effect/damage (but not cast) for attacker -static Unit::AuraTypeSet GenerateAttakerProcEffectAuraTypes() -{ - static Unit::AuraTypeSet auraTypes; - auraTypes.insert(SPELL_AURA_MOD_DAMAGE_DONE); - auraTypes.insert(SPELL_AURA_PROC_TRIGGER_DAMAGE); - auraTypes.insert(SPELL_AURA_MOD_CASTING_SPEED); - auraTypes.insert(SPELL_AURA_MOD_RATING); - return auraTypes; -} - -// auraTypes contains auras capable of proc effect/damage (but not cast) for victim -static Unit::AuraTypeSet GenerateVictimProcEffectAuraTypes() -{ - static Unit::AuraTypeSet auraTypes; - auraTypes.insert(SPELL_AURA_MOD_RESISTANCE); - auraTypes.insert(SPELL_AURA_PROC_TRIGGER_DAMAGE); - auraTypes.insert(SPELL_AURA_MOD_PARRY_PERCENT); - auraTypes.insert(SPELL_AURA_MOD_BLOCK_PERCENT); - auraTypes.insert(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN); - return auraTypes; -} - -static Unit::AuraTypeSet attackerProcCastAuraTypes = GenerateAttakerProcCastAuraTypes(); -static Unit::AuraTypeSet attackerProcEffectAuraTypes = GenerateAttakerProcEffectAuraTypes(); - -static Unit::AuraTypeSet victimProcCastAuraTypes = GenerateVictimProcCastAuraTypes(); -static Unit::AuraTypeSet victimProcEffectAuraTypes = GenerateVictimProcEffectAuraTypes(); - -// auraTypes contains auras capable of proc'ing for attacker and victim -static Unit::AuraTypeSet GenerateProcAuraTypes() -{ - Unit::AuraTypeSet auraTypes; - auraTypes.insert(attackerProcCastAuraTypes.begin(),attackerProcCastAuraTypes.end()); - auraTypes.insert(attackerProcEffectAuraTypes.begin(),attackerProcEffectAuraTypes.end()); - auraTypes.insert(victimProcCastAuraTypes.begin(),victimProcCastAuraTypes.end()); - auraTypes.insert(victimProcEffectAuraTypes.begin(),victimProcEffectAuraTypes.end()); - return auraTypes; -} - -static Unit::AuraTypeSet procAuraTypes = GenerateProcAuraTypes(); +// Used for prepare can/can`t triggr aura +static bool InitTriggerAuraData(); +// Define can trigger auras +static bool isTriggerAura[TOTAL_AURAS]; +// Define can`t trigger auras (need for disable second trigger) +static bool isNonTriggerAura[TOTAL_AURAS]; +// Prepare lists +static bool procPrepared = InitTriggerAuraData(); bool IsPassiveStackableSpell( uint32 spellId ) { @@ -130,12 +76,8 @@ bool IsPassiveStackableSpell( uint32 spellId ) SpellEntry const* spellProto = sSpellStore.LookupEntry(spellId); if(!spellProto) return false; - - for(int j = 0; j < 3; ++j) - { - if(std::find(procAuraTypes.begin(),procAuraTypes.end(),spellProto->EffectApplyAuraName[j])!=procAuraTypes.end()) - return false; - } + if (spellProto->procFlags) + return false; return true; } @@ -502,10 +444,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa return 0; } - - pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_FEAR, damage); + if (!spellProto || !IsAuraAddedBySpell(SPELL_AURA_MOD_FEAR, spellProto->Id)) + pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_FEAR, damage); // root type spells do not dispel the root effect - if(!spellProto || spellProto->Mechanic != MECHANIC_ROOT) + if (!spellProto || !(spellProto->Mechanic == MECHANIC_ROOT || IsAuraAddedBySpell(SPELL_AURA_MOD_ROOT, spellProto->Id))) pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_ROOT, damage); if(pVictim->GetTypeId() != TYPEID_PLAYER) @@ -616,8 +558,12 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa // Reward player, his pets, and group/raid members // call kill spell proc event (before real die and combat stop to triggering auras removed at death/combat stop) if(player && player!=pVictim) + { if(player->RewardPlayerAndGroupAtKill(pVictim)) - player->ProcDamageAndSpell(pVictim,PROC_FLAG_KILL_XP_GIVER,PROC_FLAG_NONE); + player->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL_AND_GET_XP, PROC_FLAG_KILLED, PROC_EX_NONE, 0); + else + player->ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED,PROC_EX_NONE, 0); + } DEBUG_LOG("DealDamageAttackStop"); @@ -773,18 +719,6 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa pVictim->ModifyHealth(- (int32)damage); - // Check if health is below 20% (apply damage before to prevent case when after ProcDamageAndSpell health < damage - if(pVictim->GetHealth()*5 < pVictim->GetMaxHealth()) - { - uint32 procVictim = PROC_FLAG_NONE; - - // if just dropped below 20% (for CheatDeath) - if((pVictim->GetHealth()+damage)*5 > pVictim->GetMaxHealth()) - procVictim = PROC_FLAG_LOW_HEALTH; - - ProcDamageAndSpell(pVictim,PROC_FLAG_TARGET_LOW_HEALTH,procVictim); - } - if(damagetype != DOT) { if(getVictim()) @@ -805,9 +739,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa if(pVictim->getTransForm() && pVictim->hasUnitState(UNIT_STAT_CONFUSED)) pVictim->RemoveAurasDueToSpell(pVictim->getTransForm()); - if(damagetype == DIRECT_DAMAGE|| damagetype == SPELL_DIRECT_DAMAGE) - pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE); - + if(damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE) + { + if (!spellProto || !(spellProto->AuraInterruptFlags&AURA_INTERRUPT_FLAG_DIRECT_DAMAGE)) + pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE); + } if (pVictim->GetTypeId() != TYPEID_PLAYER) { if(spellProto && IsDamageToThreatSpell(spellProto)) @@ -848,6 +784,8 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa { const SpellEntry *se = i->second->GetSpellProto(); next = i; ++next; + if (spellProto && spellProto->Id == se->Id) // Not drop auras added by self + continue; if( se->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DAMAGE ) { bool remove = true; @@ -1052,417 +990,579 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const *spellInfo, boo spell->prepare(&targets, triggeredByAura); } -void Unit::DealFlatDamage(Unit *pVictim, SpellEntry const *spellInfo, uint32 *damage, CleanDamage *cleanDamage, bool *crit, bool isTriggeredSpell) +// Obsolete func need remove, here only for comotability vs another patches +uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage, bool isTriggeredSpell, bool useSpellDamage) { - // TODO this in only generic way, check for exceptions - DEBUG_LOG("DealFlatDamage (BEFORE) >> DMG:%u", *damage); + SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID); + SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, spellInfo->SchoolMask); + CalculateSpellDamage(&damageInfo, damage, spellInfo); + SendSpellNonMeleeDamageLog(&damageInfo); + DealSpellDamage(&damageInfo, true); + return damageInfo.damage; +} - // Per-damage class calculation +void Unit::CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType) +{ + SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask); + Unit *pVictim = damageInfo->target; + + if (damage < 0) + return; + + if(!this || !pVictim) + return; + if(!this->isAlive() || !pVictim->isAlive()) + return; + + uint32 crTypeMask = pVictim->GetCreatureTypeMask(); + // Check spell crit chance + bool crit = isSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType); + bool blocked = false; + // Per-school calc switch (spellInfo->DmgClass) { // Melee and Ranged Spells case SPELL_DAMAGE_CLASS_RANGED: case SPELL_DAMAGE_CLASS_MELEE: { - // Calculate physical outcome - MeleeHitOutcome outcome = RollPhysicalOutcomeAgainst(pVictim, BASE_ATTACK, spellInfo); - - //Used to store the Hit Outcome - cleanDamage->hitOutCome = outcome; - - // Return miss/evade first (sends miss message) - switch(outcome) - { - case MELEE_HIT_EVADE: - { - SendAttackStateUpdate(HITINFO_MISS, pVictim, 1, GetSpellSchoolMask(spellInfo), 0, 0,0,VICTIMSTATE_EVADES,0); - *damage = 0; - return; - } - case MELEE_HIT_MISS: - { - SendAttackStateUpdate(HITINFO_MISS, pVictim, 1, GetSpellSchoolMask(spellInfo), 0, 0,0,VICTIMSTATE_NORMAL,0); - *damage = 0; - - if(GetTypeId()== TYPEID_PLAYER) - ((Player*)this)->UpdateWeaponSkill(BASE_ATTACK); - - CastMeleeProcDamageAndSpell(pVictim,0,GetSpellSchoolMask(spellInfo),BASE_ATTACK,MELEE_HIT_MISS,spellInfo,isTriggeredSpell); - return; - } - } - - // Hitinfo, Victimstate - uint32 hitInfo = HITINFO_NORMALSWING; - VictimState victimState = VICTIMSTATE_NORMAL; - // Physical Damage - if ( GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_NORMAL ) + if ( damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL ) { - // apply spellmod to Done damage - if(Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_DAMAGE, *damage); - //Calculate armor mitigation - uint32 damageAfterArmor = CalcArmorReducedDamage(pVictim, *damage); - - // random durability for main hand weapon (ABSORB) - if(damageAfterArmor < *damage) - if(pVictim->GetTypeId() == TYPEID_PLAYER) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_ABSORB))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EquipmentSlots(urand(EQUIPMENT_SLOT_START,EQUIPMENT_SLOT_BACK))); - - cleanDamage->damage += *damage - damageAfterArmor; - *damage = damageAfterArmor; + damage = CalcArmorReducedDamage(pVictim, damage); + // Get blocked status + blocked = isSpellBlocked(pVictim, spellInfo, attackType); } // Magical Damage else { // Calculate damage bonus - *damage = SpellDamageBonus(pVictim, spellInfo, *damage, SPELL_DIRECT_DAMAGE); + damage = SpellDamageBonus(pVictim, spellInfo, damage, SPELL_DIRECT_DAMAGE); } - - // Classify outcome - switch (outcome) + if (crit) { - case MELEE_HIT_BLOCK_CRIT: - case MELEE_HIT_CRIT: + damageInfo->HitInfo|= SPELL_HIT_TYPE_CRIT; + + // Calculate crit bonus + uint32 crit_bonus = damage; + // Apply crit_damage bonus for melee spells + if(Player* modOwner = GetSpellModOwner()) + modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus); + damage += crit_bonus; + + // Apply SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE or SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE + int32 critPctDamageMod=0; + if(attackType == RANGED_ATTACK) + critPctDamageMod += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE); + else { - uint32 bonusDmg = *damage; - - // Apply crit_damage bonus - if(Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CRIT_DAMAGE_BONUS, bonusDmg); - - uint32 creatureTypeMask = pVictim->GetCreatureTypeMask(); - AuraList const& mDamageDoneVersus = GetAurasByType(SPELL_AURA_MOD_CRIT_PERCENT_VERSUS); - for(AuraList::const_iterator i = mDamageDoneVersus.begin();i != mDamageDoneVersus.end(); ++i) - if(creatureTypeMask & uint32((*i)->GetModifier()->m_miscvalue)) - bonusDmg = uint32(bonusDmg * ((*i)->GetModifier()->m_amount+100.0f)/100.0f); - - *damage += bonusDmg; - - // Resilience - reduce crit damage - if (pVictim->GetTypeId()==TYPEID_PLAYER) - { - uint32 resilienceReduction = ((Player*)pVictim)->GetMeleeCritDamageReduction(*damage); - cleanDamage->damage += resilienceReduction; - *damage -= resilienceReduction; - } - - *crit = true; - hitInfo |= HITINFO_CRITICALHIT; - - ModifyAuraState(AURA_STATE_CRIT, true); - StartReactiveTimer( REACTIVE_CRIT ); - - if(getClass()==CLASS_HUNTER) - { - ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, true); - StartReactiveTimer( REACTIVE_HUNTER_CRIT ); - } - - if ( outcome == MELEE_HIT_BLOCK_CRIT ) - { - uint32 blocked_amount = uint32(pVictim->GetShieldBlockValue()); - if (blocked_amount >= *damage) - { - hitInfo |= HITINFO_SWINGNOHITSOUND; - victimState = VICTIMSTATE_BLOCKS; - cleanDamage->damage += *damage; // To Help Calculate Rage - *damage = 0; - } - else - { - // To Help Calculate Rage - cleanDamage->damage += blocked_amount; - *damage = *damage - blocked_amount; - } - - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update defense - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (BLOCK) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_BLOCK))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_OFFHAND); - } - } - break; + critPctDamageMod += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE); + critPctDamageMod += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE); } - case MELEE_HIT_PARRY: - { - cleanDamage->damage += *damage; // To Help Calculate Rage - *damage = 0; - victimState = VICTIMSTATE_PARRY; + // Increase crit damage from SPELL_AURA_MOD_CRIT_PERCENT_VERSUS + critPctDamageMod += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_CRIT_PERCENT_VERSUS, crTypeMask); - // Counter-attack ( explained in Unit::DoAttackDamage() ) - if(pVictim->GetTypeId()==TYPEID_PLAYER || !(((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN) ) - { - // Get attack timers - float offtime = float(pVictim->getAttackTimer(OFF_ATTACK)); - float basetime = float(pVictim->getAttackTimer(BASE_ATTACK)); + if (critPctDamageMod!=0) + damage = int32((damage) * float((100.0f + critPctDamageMod)/100.0f)); - // Reduce attack time - if (pVictim->haveOffhandWeapon() && offtime < basetime) - { - float percent20 = pVictim->GetAttackTime(OFF_ATTACK) * 0.20; - float percent60 = 3 * percent20; - if(offtime > percent20 && offtime <= percent60) - { - pVictim->setAttackTimer(OFF_ATTACK, uint32(percent20)); - } - else if(offtime > percent60) - { - offtime -= 2 * percent20; - pVictim->setAttackTimer(OFF_ATTACK, uint32(offtime)); - } - } - else - { - float percent20 = pVictim->GetAttackTime(BASE_ATTACK) * 0.20; - float percent60 = 3 * percent20; - if(basetime > percent20 && basetime <= percent60) - { - pVictim->setAttackTimer(BASE_ATTACK, uint32(percent20)); - } - else if(basetime > percent60) - { - basetime -= 2 * percent20; - pVictim->setAttackTimer(BASE_ATTACK, uint32(basetime)); - } - } - } - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update victim defense ? - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (PARRY) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_PARRY))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_MAINHAND); - } - - // Set parry flags - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - // Mongoose bite - set only Counterattack here - if (pVictim->getClass() == CLASS_HUNTER) - { - pVictim->ModifyAuraState(AURA_STATE_HUNTER_PARRY,true); - pVictim->StartReactiveTimer( REACTIVE_HUNTER_PARRY ); - } - else - { - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - } - break; - } - case MELEE_HIT_DODGE: - { - if(pVictim->GetTypeId() == TYPEID_PLAYER) - ((Player*)pVictim)->UpdateDefense(); - - cleanDamage->damage += *damage; // To Help Calculate Rage - *damage = 0; - hitInfo |= HITINFO_SWINGNOHITSOUND; - victimState = VICTIMSTATE_DODGE; - - // Set dodge flags - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - // Overpower - if (GetTypeId() == TYPEID_PLAYER && getClass() == CLASS_WARRIOR) - { - ((Player*)this)->AddComboPoints(pVictim, 1); - StartReactiveTimer( REACTIVE_OVERPOWER ); - } - - // Riposte - if (pVictim->getClass() != CLASS_ROGUE) - { - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - } - break; - } - case MELEE_HIT_BLOCK: - { - uint32 blocked_amount = uint32(pVictim->GetShieldBlockValue()); - if (blocked_amount >= *damage) - { - hitInfo |= HITINFO_SWINGNOHITSOUND; - victimState = VICTIMSTATE_BLOCKS; - cleanDamage->damage += *damage; // To Help Calculate Rage - *damage = 0; - } - else - { - // To Help Calculate Rage - cleanDamage->damage += blocked_amount; - *damage = *damage - blocked_amount; - } - - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update defense - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (BLOCK) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_BLOCK))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_OFFHAND); - } - break; - } - case MELEE_HIT_EVADE: // already processed early - case MELEE_HIT_MISS: // already processed early - case MELEE_HIT_GLANCING: - case MELEE_HIT_CRUSHING: - case MELEE_HIT_NORMAL: - break; + // Resilience - reduce crit damage + if (pVictim->GetTypeId()==TYPEID_PLAYER) + damage -= ((Player*)pVictim)->GetMeleeCritDamageReduction(damage); + } + // Spell weapon based damage CAN BE crit & blocked at same time + if (blocked) + { + damageInfo->blocked = uint32(pVictim->GetShieldBlockValue()); + if (damage < damageInfo->blocked) + damageInfo->blocked = damage; + damage-=damageInfo->blocked; } - - // do all damage=0 cases here - if(*damage == 0) - CastMeleeProcDamageAndSpell(pVictim,0,GetSpellSchoolMask(spellInfo),BASE_ATTACK,outcome,spellInfo,isTriggeredSpell); - - break; } + break; // Magical Attacks case SPELL_DAMAGE_CLASS_NONE: case SPELL_DAMAGE_CLASS_MAGIC: { // Calculate damage bonus - *damage = SpellDamageBonus(pVictim, spellInfo, *damage, SPELL_DIRECT_DAMAGE); - - *crit = isSpellCrit(pVictim, spellInfo, GetSpellSchoolMask(spellInfo), BASE_ATTACK); - if (*crit) + damage = SpellDamageBonus(pVictim, spellInfo, damage, SPELL_DIRECT_DAMAGE); + // If crit add critical bonus + if (crit) { - *damage = SpellCriticalBonus(spellInfo, *damage, pVictim); - + damageInfo->HitInfo|= SPELL_HIT_TYPE_CRIT; + damage = SpellCriticalBonus(spellInfo, damage, pVictim); // Resilience - reduce crit damage - if (pVictim && pVictim->GetTypeId()==TYPEID_PLAYER) - { - uint32 damage_reduction = ((Player *)pVictim)->GetSpellCritDamageReduction(*damage); - if(*damage > damage_reduction) - *damage -= damage_reduction; - else - *damage = 0; - } - - cleanDamage->hitOutCome = MELEE_HIT_CRIT; + if (pVictim->GetTypeId()==TYPEID_PLAYER) + damage -= ((Player*)pVictim)->GetSpellCritDamageReduction(damage); } - // spell proc all magic damage==0 case in this function - if(*damage == 0) - { - // Procflags - uint32 procAttacker = PROC_FLAG_HIT_SPELL; - uint32 procVictim = (PROC_FLAG_STRUCK_SPELL|PROC_FLAG_TAKE_DAMAGE); - - ProcDamageAndSpell(pVictim, procAttacker, procVictim, 0, GetSpellSchoolMask(spellInfo), spellInfo, isTriggeredSpell); - } - - break; } + break; } - // TODO this in only generic way, check for exceptions - DEBUG_LOG("DealFlatDamage (AFTER) >> DMG:%u", *damage); -} - -uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage, bool isTriggeredSpell, bool useSpellDamage) -{ - if(!this || !pVictim) - return 0; - if(!isAlive() || !pVictim->isAlive()) - return 0; - - SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID); - if(!spellInfo) - return 0; - - CleanDamage cleanDamage = CleanDamage(0, BASE_ATTACK, MELEE_HIT_NORMAL); - bool crit = false; - - if (useSpellDamage) - DealFlatDamage(pVictim, spellInfo, &damage, &cleanDamage, &crit, isTriggeredSpell); - - // If we actually dealt some damage (spell proc's for 0 damage (normal and magic) called in DealFlatDamage) + // Calculate absorb resist if(damage > 0) { - // Calculate absorb & resists - uint32 absorb = 0; - uint32 resist = 0; - - CalcAbsorbResist(pVictim,GetSpellSchoolMask(spellInfo), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist); - - //No more damage left, target absorbed and/or resisted all damage - if (damage > absorb + resist) - damage -= absorb + resist; //Remove Absorbed and Resisted from damage actually dealt - else - { - uint32 HitInfo = HITINFO_SWINGNOHITSOUND; - - if (absorb) - HitInfo |= HITINFO_ABSORB; - if (resist) - { - HitInfo |= HITINFO_RESIST; - ProcDamageAndSpell(pVictim, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, GetSpellSchoolMask(spellInfo), spellInfo,isTriggeredSpell); - } - - //Send resist - SendAttackStateUpdate(HitInfo, pVictim, 1, GetSpellSchoolMask(spellInfo), damage, absorb,resist,VICTIMSTATE_NORMAL,0); - return 0; - } - - // Deal damage done - damage = DealDamage(pVictim, damage, &cleanDamage, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(spellInfo), spellInfo, true); - - // Send damage log - sLog.outDetail("SpellNonMeleeDamageLog: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u,absorb is %u,resist is %u", - GetGUIDLow(), GetTypeId(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damage, spellID, absorb,resist); - - // Actual log sent to client - SendSpellNonMeleeDamageLog(pVictim, spellID, damage, GetSpellSchoolMask(spellInfo), absorb, resist, false, 0, crit); - - // Procflags - uint32 procAttacker = PROC_FLAG_HIT_SPELL; - uint32 procVictim = (PROC_FLAG_STRUCK_SPELL|PROC_FLAG_TAKE_DAMAGE); - - if (crit) - { - procAttacker |= PROC_FLAG_CRIT_SPELL; - procVictim |= PROC_FLAG_STRUCK_CRIT_SPELL; - } - - ProcDamageAndSpell(pVictim, procAttacker, procVictim, damage, GetSpellSchoolMask(spellInfo), spellInfo, isTriggeredSpell); - - return damage; + CalcAbsorbResist(pVictim, damageSchoolMask, SPELL_DIRECT_DAMAGE, damage, &damageInfo->absorb, &damageInfo->resist); + damage-= damageInfo->absorb + damageInfo->resist; } else + damage = 0; + damageInfo->damage = damage; +} + +void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss) +{ + if (damageInfo==0) + return; + + Unit *pVictim = damageInfo->target; + + if(!this || !pVictim) + return; + + if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode()) + return; + + SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID); + if (spellProto == NULL) { - // all spell proc for 0 normal and magic damage called in DealFlatDamage + sLog.outDebug("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID); + return; + } - //Check for rage - if(cleanDamage.damage) - // Rage from damage received. - if(pVictim->GetTypeId() == TYPEID_PLAYER && (pVictim->getPowerType() == POWER_RAGE)) - ((Player*)pVictim)->RewardRage(cleanDamage.damage, 0, false); + //You don't lose health from damage taken from another player while in a sanctuary + //You still see it in the combat log though + if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER) + { + const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId()); + if(area && area->flags & 0x800) //sanctuary + return; + } - return 0; + // update at damage Judgement aura duration that applied by attacker at victim + if(damageInfo->damage && spellProto->Id == 35395) + { + AuraMap& vAuras = pVictim->GetAuras(); + for(AuraMap::iterator itr = vAuras.begin(); itr != vAuras.end(); ++itr) + { + SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); + if( spellInfo->AttributesEx3 & 0x40000 && spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && ((*itr).second->GetCasterGUID() == GetGUID())) + { + (*itr).second->SetAuraDuration((*itr).second->GetAuraMaxDuration()); + (*itr).second->SendAuraUpdate(false); + } + } + } + // Call default DealDamage + CleanDamage cleanDamage(damageInfo->cleanDamage, BASE_ATTACK, MELEE_HIT_NORMAL); + DealDamage(pVictim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss); +} + +//TODO for melee need create structure as in +void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType) +{ + damageInfo->attacker = this; + damageInfo->target = pVictim; + damageInfo->damageSchoolMask = GetMeleeDamageSchoolMask(); + damageInfo->attackType = attackType; + damageInfo->damage = 0; + damageInfo->cleanDamage = 0; + damageInfo->absorb = 0; + damageInfo->resist = 0; + damageInfo->blocked_amount = 0; + + damageInfo->TargetState = 0; + damageInfo->HitInfo = 0; + damageInfo->procAttacker = PROC_FLAG_NONE; + damageInfo->procVictim = PROC_FLAG_NONE; + damageInfo->procEx = PROC_EX_NONE; + damageInfo->hitOutCome = MELEE_HIT_EVADE; + + if(!this || !pVictim) + return; + if(!this->isAlive() || !pVictim->isAlive()) + return; + + // Select HitInfo/procAttacker/procVictim flag based on attack type + switch (attackType) + { + case BASE_ATTACK: + damageInfo->procAttacker = PROC_FLAG_SUCCESSFUL_MILEE_HIT; + damageInfo->procVictim = PROC_FLAG_TAKEN_MELEE_HIT; + damageInfo->HitInfo = HITINFO_NORMALSWING2; + break; + case OFF_ATTACK: + damageInfo->procAttacker = PROC_FLAG_SUCCESSFUL_MILEE_HIT | PROC_FLAG_SUCCESSFUL_OFFHAND_HIT; + damageInfo->procVictim = PROC_FLAG_TAKEN_MELEE_HIT;//|PROC_FLAG_TAKEN_OFFHAND_HIT // not used + damageInfo->HitInfo = HITINFO_LEFTSWING; + break; + case RANGED_ATTACK: + damageInfo->procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_HIT; + damageInfo->procVictim = PROC_FLAG_TAKEN_RANGED_HIT; + damageInfo->HitInfo = 0x08;// test + break; + default: + break; + } + + // Physical Immune check + if(damageInfo->target->IsImmunedToDamage(SpellSchoolMask(damageInfo->damageSchoolMask),true)) + { + damageInfo->HitInfo |= HITINFO_NORMALSWING; + damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE; + + damageInfo->procEx |=PROC_EX_IMMUNE; + damageInfo->damage = 0; + damageInfo->cleanDamage = 0; + return; + } + damage += CalculateDamage (damageInfo->attackType, false); + // Add melee damage bonus + MeleeDamageBonus(damageInfo->target, &damage, damageInfo->attackType); + // Calculate armor reduction + damageInfo->damage = CalcArmorReducedDamage(damageInfo->target, damage); + damageInfo->cleanDamage += damage - damageInfo->damage; + + damageInfo->hitOutCome = RollMeleeOutcomeAgainst(damageInfo->target, damageInfo->attackType); + + // Disable parry or dodge for ranged attack + if(damageInfo->attackType == RANGED_ATTACK) + { + if (damageInfo->hitOutCome == MELEE_HIT_PARRY) damageInfo->hitOutCome = MELEE_HIT_NORMAL; + if (damageInfo->hitOutCome == MELEE_HIT_DODGE) damageInfo->hitOutCome = MELEE_HIT_MISS; + } + + switch(damageInfo->hitOutCome) + { + case MELEE_HIT_EVADE: + { + damageInfo->HitInfo |= HITINFO_MISS|HITINFO_SWINGNOHITSOUND; + damageInfo->TargetState = VICTIMSTATE_EVADES; + + damageInfo->procEx|=PROC_EX_EVADE; + damageInfo->damage = 0; + damageInfo->cleanDamage = 0; + return; + } + case MELEE_HIT_MISS: + { + damageInfo->HitInfo |= HITINFO_MISS; + damageInfo->TargetState = VICTIMSTATE_NORMAL; + + damageInfo->procEx|=PROC_EX_MISS; + damageInfo->damage = 0; + damageInfo->cleanDamage = 0; + break; + } + case MELEE_HIT_NORMAL: + damageInfo->TargetState = VICTIMSTATE_NORMAL; + damageInfo->procEx|=PROC_EX_NORMAL_HIT; + break; + case MELEE_HIT_CRIT: + { + damageInfo->HitInfo |= HITINFO_CRITICALHIT; + damageInfo->TargetState = VICTIMSTATE_NORMAL; + + damageInfo->procEx|=PROC_EX_CRITICAL_HIT; + // Crit bonus calc + damageInfo->damage += damageInfo->damage; + int32 mod=0; + // Apply SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE or SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE + if(damageInfo->attackType == RANGED_ATTACK) + mod += damageInfo->target->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE); + else + { + mod += damageInfo->target->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE); + mod += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE); + } + + uint32 crTypeMask = damageInfo->target->GetCreatureTypeMask(); + + // Increase crit damage from SPELL_AURA_MOD_CRIT_PERCENT_VERSUS + mod += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_CRIT_PERCENT_VERSUS, crTypeMask); + if (mod!=0) + damageInfo->damage = int32((damageInfo->damage) * float((100.0f + mod)/100.0f)); + + // Resilience - reduce crit damage + if (pVictim->GetTypeId()==TYPEID_PLAYER) + { + uint32 resilienceReduction = ((Player*)pVictim)->GetMeleeCritDamageReduction(damageInfo->damage); + damageInfo->damage -= resilienceReduction; + damageInfo->cleanDamage += resilienceReduction; + } + break; + } + case MELEE_HIT_PARRY: + damageInfo->TargetState = VICTIMSTATE_PARRY; + damageInfo->procEx|=PROC_EX_PARRY; + damageInfo->cleanDamage += damageInfo->damage; + damageInfo->damage = 0; + break; + + case MELEE_HIT_DODGE: + damageInfo->TargetState = VICTIMSTATE_DODGE; + damageInfo->procEx|=PROC_EX_DODGE; + damageInfo->cleanDamage += damageInfo->damage; + damageInfo->damage = 0; + break; + case MELEE_HIT_BLOCK: + { + damageInfo->TargetState = VICTIMSTATE_NORMAL; + damageInfo->HitInfo |= HITINFO_BLOCK; + damageInfo->procEx|=PROC_EX_BLOCK; + damageInfo->blocked_amount = damageInfo->target->GetShieldBlockValue(); + if (damageInfo->blocked_amount >= damageInfo->damage) + { + damageInfo->TargetState = VICTIMSTATE_BLOCKS; + damageInfo->blocked_amount = damageInfo->damage; + } + damageInfo->damage -= damageInfo->blocked_amount; + damageInfo->cleanDamage += damageInfo->blocked_amount; + break; + } + case MELEE_HIT_GLANCING: + { + damageInfo->HitInfo |= HITINFO_GLANCING; + damageInfo->TargetState = VICTIMSTATE_NORMAL; + damageInfo->procEx|=PROC_EX_NORMAL_HIT; + float reducePercent = 1.0f; //damage factor + // calculate base values and mods + float baseLowEnd = 1.3; + float baseHighEnd = 1.2; + switch(getClass()) // lowering base values for casters + { + case CLASS_SHAMAN: + case CLASS_PRIEST: + case CLASS_MAGE: + case CLASS_WARLOCK: + case CLASS_DRUID: + baseLowEnd -= 0.7; + baseHighEnd -= 0.3; + break; + } + + float maxLowEnd = 0.6; + switch(getClass()) // upper for melee classes + { + case CLASS_WARRIOR: + case CLASS_ROGUE: + maxLowEnd = 0.91; //If the attacker is a melee class then instead the lower value of 0.91 + } + + // calculate values + int32 diff = damageInfo->target->GetDefenseSkillValue() - GetWeaponSkillValue(damageInfo->attackType); + float lowEnd = baseLowEnd - ( 0.05f * diff ); + float highEnd = baseHighEnd - ( 0.03f * diff ); + + // apply max/min bounds + if ( lowEnd < 0.01f ) //the low end must not go bellow 0.01f + lowEnd = 0.01f; + else if ( lowEnd > maxLowEnd ) //the smaller value of this and 0.6 is kept as the low end + lowEnd = maxLowEnd; + + if ( highEnd < 0.2f ) //high end limits + highEnd = 0.2f; + if ( highEnd > 0.99f ) + highEnd = 0.99f; + + if(lowEnd > highEnd) // prevent negative range size + lowEnd = highEnd; + + reducePercent = lowEnd + rand_norm() * ( highEnd - lowEnd ); + + damageInfo->cleanDamage += damageInfo->damage-uint32(reducePercent * damageInfo->damage); + damageInfo->damage = uint32(reducePercent * damageInfo->damage); + break; + } + case MELEE_HIT_CRUSHING: + { + damageInfo->HitInfo |= HITINFO_CRUSHING; + damageInfo->TargetState = VICTIMSTATE_NORMAL; + damageInfo->procEx|=PROC_EX_NORMAL_HIT; + // 150% normal damage + damageInfo->damage += (damageInfo->damage / 2); + break; + } + default: + + break; + } + + // Calculate absorb resist + if(int32(damageInfo->damage) > 0) + { + damageInfo->procVictim |= PROC_FLAG_TAKEN_ANY_DAMAGE; + // Calculate absorb & resists + CalcAbsorbResist(damageInfo->target, SpellSchoolMask(damageInfo->damageSchoolMask), DIRECT_DAMAGE, damageInfo->damage, &damageInfo->absorb, &damageInfo->resist); + damageInfo->damage-=damageInfo->absorb + damageInfo->resist; + if (damageInfo->absorb) + { + damageInfo->HitInfo|=HITINFO_ABSORB; + damageInfo->procEx|=PROC_EX_ABSORB; + } + if (damageInfo->resist) + damageInfo->HitInfo|=HITINFO_RESIST; + + } + else // Umpossible get negative result but.... + damageInfo->damage = 0; +} + +void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) +{ + if (damageInfo==0) return; + Unit *pVictim = damageInfo->target; + + if(!this || !pVictim) + return; + + if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode()) + return; + + //You don't lose health from damage taken from another player while in a sanctuary + //You still see it in the combat log though + if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER) + { + const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId()); + if(area && area->flags & 0x800) //sanctuary + return; + } + + // Hmmmm dont like this emotes cloent must by self do all animations + if (damageInfo->HitInfo&HITINFO_CRITICALHIT) + pVictim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL); + if(damageInfo->blocked_amount && damageInfo->TargetState!=VICTIMSTATE_BLOCKS) + pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYSHIELD); + + if(damageInfo->TargetState == VICTIMSTATE_PARRY) + { + // Get attack timers + float offtime = float(pVictim->getAttackTimer(OFF_ATTACK)); + float basetime = float(pVictim->getAttackTimer(BASE_ATTACK)); + // Reduce attack time + if (pVictim->haveOffhandWeapon() && offtime < basetime) + { + float percent20 = pVictim->GetAttackTime(OFF_ATTACK) * 0.20; + float percent60 = 3 * percent20; + if(offtime > percent20 && offtime <= percent60) + { + pVictim->setAttackTimer(OFF_ATTACK, uint32(percent20)); + } + else if(offtime > percent60) + { + offtime -= 2 * percent20; + pVictim->setAttackTimer(OFF_ATTACK, uint32(offtime)); + } + } + else + { + float percent20 = pVictim->GetAttackTime(BASE_ATTACK) * 0.20; + float percent60 = 3 * percent20; + if(basetime > percent20 && basetime <= percent60) + { + pVictim->setAttackTimer(BASE_ATTACK, uint32(percent20)); + } + else if(basetime > percent60) + { + basetime -= 2 * percent20; + pVictim->setAttackTimer(BASE_ATTACK, uint32(basetime)); + } + } + } + + // Call default DealDamage + CleanDamage cleanDamage(damageInfo->cleanDamage,damageInfo->attackType,damageInfo->hitOutCome); + DealDamage(pVictim, damageInfo->damage, &cleanDamage, DIRECT_DAMAGE, SpellSchoolMask(damageInfo->damageSchoolMask), NULL, durabilityLoss); + + // If this is a creature and it attacks from behind it has a probability to daze it's victim + if( (damageInfo->hitOutCome==MELEE_HIT_CRIT || damageInfo->hitOutCome==MELEE_HIT_CRUSHING || damageInfo->hitOutCome==MELEE_HIT_NORMAL || damageInfo->hitOutCome==MELEE_HIT_GLANCING) && + GetTypeId() != TYPEID_PLAYER && !((Creature*)this)->GetCharmerOrOwnerGUID() && !pVictim->HasInArc(M_PI, this) ) + { + // -probability is between 0% and 40% + // 20% base chance + float Probability = 20; + + //there is a newbie protection, at level 10 just 7% base chance; assuming linear function + if( pVictim->getLevel() < 30 ) + Probability = 0.65f*pVictim->getLevel()+0.5; + + uint32 VictimDefense=pVictim->GetDefenseSkillValue(); + uint32 AttackerMeleeSkill=GetUnitMeleeSkill(); + + Probability *= AttackerMeleeSkill/(float)VictimDefense; + + if(Probability > 40) + Probability = 40; + + if(roll_chance_f(Probability)) + CastSpell(pVictim, 1604, true); + } + + // update at damage Judgement aura duration that applied by attacker at victim + if(damageInfo->damage) + { + AuraMap& vAuras = pVictim->GetAuras(); + for(AuraMap::iterator itr = vAuras.begin(); itr != vAuras.end(); ++itr) + { + SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); + if( spellInfo->AttributesEx3 & 0x40000 && spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && ((*itr).second->GetCasterGUID() == GetGUID())) + { + (*itr).second->SetAuraDuration((*itr).second->GetAuraMaxDuration()); + (*itr).second->SendAuraUpdate(false); + } + } + } + + // If not miss + if (!(damageInfo->HitInfo & HITINFO_MISS)) + { + if(GetTypeId() == TYPEID_PLAYER && pVictim->isAlive()) + { + for(int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++) + ((Player*)this)->CastItemCombatSpell(((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0,i), pVictim, damageInfo->attackType); + } + + // victim's damage shield + std::set alreadyDone; + uint32 removedAuras = pVictim->m_removedAuras; + AuraList const& vDamageShields = pVictim->GetAurasByType(SPELL_AURA_DAMAGE_SHIELD); + for(AuraList::const_iterator i = vDamageShields.begin(), next = vDamageShields.begin(); i != vDamageShields.end(); i = next) + { + next++; + if (alreadyDone.find(*i) == alreadyDone.end()) + { + alreadyDone.insert(*i); + uint32 damage=(*i)->GetModifier()->m_amount; + SpellEntry const *spellProto = sSpellStore.LookupEntry((*i)->GetId()); + if(!spellProto) + continue; + //Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist? + //uint32 absorb; + //uint32 resist; + //CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist); + //damage-=absorb + resist; + + WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4)); + data << uint64(pVictim->GetGUID()); + data << uint64(GetGUID()); + data << uint32(spellProto->Id); + data << uint32(damage); // Damage + data << uint32(0); // Overkill + data << uint32(spellProto->SchoolMask); + pVictim->SendMessageToSet(&data, true ); + + pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(spellProto), spellProto, true); + + if (pVictim->m_removedAuras > removedAuras) + { + removedAuras = pVictim->m_removedAuras; + next = vDamageShields.begin(); + } + } + } } } + void Unit::HandleEmoteCommand(uint32 anim_id) { WorldPacket data( SMSG_EMOTE, 12 ); @@ -1576,7 +1676,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe int32 currentAbsorb; - //Reflective Shield + // Reflective Shield if ((pVictim != this) && (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST && (*i)->GetSpellProto()->SpellFamilyFlags == 0x1) { if(Unit* caster = (*i)->GetCaster()) @@ -1722,450 +1822,6 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe *absorb = damage - RemainingDamage - *resist; } -void Unit::DoAttackDamage (Unit *pVictim, uint32 *damage, CleanDamage *cleanDamage, uint32 *blocked_amount, SpellSchoolMask damageSchoolMask, uint32 *hitInfo, VictimState *victimState, uint32 *absorbDamage, uint32 *resistDamage, WeaponAttackType attType, SpellEntry const *spellCasted, bool isTriggeredSpell) -{ - MeleeHitOutcome outcome; - - // If is casted Melee spell, calculate like physical - if(!spellCasted) - outcome = RollMeleeOutcomeAgainst (pVictim, attType); - else - outcome = RollPhysicalOutcomeAgainst (pVictim, attType, spellCasted); - - if(outcome == MELEE_HIT_MISS ||outcome == MELEE_HIT_DODGE ||outcome == MELEE_HIT_BLOCK ||outcome == MELEE_HIT_PARRY) - pVictim->AddThreat(this, 0.0f); - switch(outcome) - { - case MELEE_HIT_EVADE: - { - *hitInfo |= HITINFO_MISS; - *damage = 0; - cleanDamage->damage = 0; - return; - } - case MELEE_HIT_MISS: - { - *hitInfo |= HITINFO_MISS; - *damage = 0; - cleanDamage->damage = 0; - if(GetTypeId()== TYPEID_PLAYER) - ((Player*)this)->UpdateWeaponSkill(attType); - return; - } - } - - /// If this is a creature and it attacks from behind it has a probability to daze it's victim - if( (outcome==MELEE_HIT_CRIT || outcome==MELEE_HIT_CRUSHING || outcome==MELEE_HIT_NORMAL || outcome==MELEE_HIT_GLANCING) && - GetTypeId() != TYPEID_PLAYER && !((Creature*)this)->GetCharmerOrOwnerGUID() && !pVictim->HasInArc(M_PI, this) ) - { - // -probability is between 0% and 40% - // 20% base chance - float Probability = 20; - - //there is a newbie protection, at level 10 just 7% base chance; assuming linear function - if( pVictim->getLevel() < 30 ) - Probability = 0.65f*pVictim->getLevel()+0.5; - - uint32 VictimDefense=pVictim->GetDefenseSkillValue(this); - uint32 AttackerMeleeSkill=GetUnitMeleeSkill(pVictim); - - Probability *= AttackerMeleeSkill/(float)VictimDefense; - - if(Probability > 40.0f) - Probability = 40.0f; - - if(roll_chance_f(Probability)) - CastSpell(pVictim, 1604, true); - } - - //Calculate the damage after armor mitigation if SPELL_SCHOOL_NORMAL - if (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL) - { - uint32 damageAfterArmor = CalcArmorReducedDamage(pVictim, *damage); - - // random durability for main hand weapon (ABSORB) - if(damageAfterArmor < *damage) - if(pVictim->GetTypeId() == TYPEID_PLAYER) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_ABSORB))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EquipmentSlots(urand(EQUIPMENT_SLOT_START,EQUIPMENT_SLOT_BACK))); - - cleanDamage->damage += *damage - damageAfterArmor; - *damage = damageAfterArmor; - } - - if(GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() != TYPEID_PLAYER && pVictim->GetCreatureType() != CREATURE_TYPE_CRITTER ) - ((Player*)this)->UpdateCombatSkills(pVictim, attType, outcome, false); - - if(GetTypeId() != TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER) - ((Player*)pVictim)->UpdateCombatSkills(this, attType, outcome, true); - - switch (outcome) - { - case MELEE_HIT_BLOCK_CRIT: - case MELEE_HIT_CRIT: - { - *hitInfo = HITINFO_CRITICALHIT | HITINFO_NORMALSWING2 | HITINFO_UNK2; - - // Crit bonus calc - uint32 crit_bonus; - crit_bonus = *damage; - - // Apply crit_damage bonus for melee spells - if (spellCasted) - { - if(Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellCasted->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus); - - uint32 creatureTypeMask = pVictim->GetCreatureTypeMask(); - AuraList const& mDamageDoneVersus = GetAurasByType(SPELL_AURA_MOD_CRIT_PERCENT_VERSUS); - for(AuraList::const_iterator i = mDamageDoneVersus.begin();i != mDamageDoneVersus.end(); ++i) - if(creatureTypeMask & uint32((*i)->GetModifier()->m_miscvalue)) - crit_bonus = uint32(crit_bonus * ((*i)->GetModifier()->m_amount+100.0f)/100.0f); - } - - *damage += crit_bonus; - - uint32 resilienceReduction = 0; - - if(attType == RANGED_ATTACK) - { - int32 mod = pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE); - *damage = int32((*damage) * float((100.0f + mod)/100.0f)); - // Resilience - reduce crit damage - if (pVictim->GetTypeId()==TYPEID_PLAYER) - resilienceReduction = ((Player*)pVictim)->GetRangedCritDamageReduction(*damage); - } - else - { - int32 mod = pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE); - mod += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE); - *damage = int32((*damage) * float((100.0f + mod)/100.0f)); - // Resilience - reduce crit damage - if (pVictim->GetTypeId()==TYPEID_PLAYER) - resilienceReduction = ((Player*)pVictim)->GetMeleeCritDamageReduction(*damage); - } - - *damage -= resilienceReduction; - cleanDamage->damage += resilienceReduction; - - if(GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() != TYPEID_PLAYER && pVictim->GetCreatureType() != CREATURE_TYPE_CRITTER ) - ((Player*)this)->UpdateWeaponSkill(attType); - - ModifyAuraState(AURA_STATE_CRIT, true); - StartReactiveTimer( REACTIVE_CRIT ); - - if(getClass()==CLASS_HUNTER) - { - ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, true); - StartReactiveTimer( REACTIVE_HUNTER_CRIT ); - } - - if ( outcome == MELEE_HIT_BLOCK_CRIT ) - { - *blocked_amount = pVictim->GetShieldBlockValue(); - - if (pVictim->GetUnitBlockChance()) - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYSHIELD); - else - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - //Only set VICTIMSTATE_BLOCK on a full block - if (*blocked_amount >= uint32(*damage)) - { - *victimState = VICTIMSTATE_BLOCKS; - *blocked_amount = uint32(*damage); - } - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update defense - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (BLOCK) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_BLOCK))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_OFFHAND); - } - - pVictim->ModifyAuraState(AURA_STATE_DEFENSE,true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - break; - } - - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL); - break; - } - case MELEE_HIT_PARRY: - { - if(attType == RANGED_ATTACK) //range attack - no parry - { - outcome = MELEE_HIT_NORMAL; - break; - } - - cleanDamage->damage += *damage; - *damage = 0; - *victimState = VICTIMSTATE_PARRY; - - // instant (maybe with small delay) counter attack - { - float offtime = float(pVictim->getAttackTimer(OFF_ATTACK)); - float basetime = float(pVictim->getAttackTimer(BASE_ATTACK)); - - // after parry nearest next attack time will reduced at %40 from full attack time. - // The delay cannot be reduced to less than 20% of your weapon base swing delay. - if (pVictim->haveOffhandWeapon() && offtime < basetime) - { - float percent20 = pVictim->GetAttackTime(OFF_ATTACK)*0.20; - float percent60 = 3*percent20; - // set to 20% if in range 20%...20+40% of full time - if(offtime > percent20 && offtime <= percent60) - { - pVictim->setAttackTimer(OFF_ATTACK,uint32(percent20)); - } - // decrease at %40 from full time - else if(offtime > percent60) - { - offtime -= 2*percent20; - pVictim->setAttackTimer(OFF_ATTACK,uint32(offtime)); - } - // ELSE not changed - } - else - { - float percent20 = pVictim->GetAttackTime(BASE_ATTACK)*0.20; - float percent60 = 3*percent20; - // set to 20% if in range 20%...20+40% of full time - if(basetime > percent20 && basetime <= percent60) - { - pVictim->setAttackTimer(BASE_ATTACK,uint32(percent20)); - } - // decrease at %40 from full time - else if(basetime > percent60) - { - basetime -= 2*percent20; - pVictim->setAttackTimer(BASE_ATTACK,uint32(basetime)); - } - // ELSE not changed - } - } - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update victim defense ? - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (PARRY) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_PARRY))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_MAINHAND); - } - - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - if (pVictim->getClass() == CLASS_HUNTER) - { - pVictim->ModifyAuraState(AURA_STATE_HUNTER_PARRY,true); - pVictim->StartReactiveTimer( REACTIVE_HUNTER_PARRY ); - } - else - { - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - } - - CastMeleeProcDamageAndSpell(pVictim, 0, damageSchoolMask, attType, outcome, spellCasted, isTriggeredSpell); - return; - } - case MELEE_HIT_DODGE: - { - if(attType == RANGED_ATTACK) //range attack - no dodge - { - outcome = MELEE_HIT_NORMAL; - break; - } - - cleanDamage->damage += *damage; - *damage = 0; - *victimState = VICTIMSTATE_DODGE; - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - ((Player*)pVictim)->UpdateDefense(); - - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - if (pVictim->getClass() != CLASS_ROGUE) // Riposte - { - pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - } - - // Overpower - if (GetTypeId() == TYPEID_PLAYER && getClass() == CLASS_WARRIOR) - { - ((Player*)this)->AddComboPoints(pVictim, 1); - StartReactiveTimer( REACTIVE_OVERPOWER ); - } - - CastMeleeProcDamageAndSpell(pVictim, 0, damageSchoolMask, attType, outcome, spellCasted, isTriggeredSpell); - return; - } - case MELEE_HIT_BLOCK: - { - *blocked_amount = pVictim->GetShieldBlockValue(); - - if (pVictim->GetUnitBlockChance()) - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYSHIELD); - else - pVictim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYUNARMED); - - //Only set VICTIMSTATE_BLOCK on a full block - if (*blocked_amount >= uint32(*damage)) - { - *victimState = VICTIMSTATE_BLOCKS; - *blocked_amount = uint32(*damage); - } - - if(pVictim->GetTypeId() == TYPEID_PLAYER) - { - // Update defense - ((Player*)pVictim)->UpdateDefense(); - - // random durability for main hand weapon (BLOCK) - if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_BLOCK))) - ((Player*)pVictim)->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_OFFHAND); - } - - pVictim->ModifyAuraState(AURA_STATE_DEFENSE,true); - pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); - - break; - } - case MELEE_HIT_GLANCING: - { - float reducePercent = 1.0f; //damage factor - - // calculate base values and mods - float baseLowEnd = 1.3; - float baseHighEnd = 1.2; - switch(getClass()) // lowering base values for casters - { - case CLASS_SHAMAN: - case CLASS_PRIEST: - case CLASS_MAGE: - case CLASS_WARLOCK: - case CLASS_DRUID: - baseLowEnd -= 0.7; - baseHighEnd -= 0.3; - break; - } - - float maxLowEnd = 0.6; - switch(getClass()) // upper for melee classes - { - case CLASS_WARRIOR: - case CLASS_ROGUE: - case CLASS_DEATH_KNIGHT: - maxLowEnd = 0.91; //If the attacker is a melee class then instead the lower value of 0.91 - } - - // calculate values - int32 diff = int32(pVictim->GetDefenseSkillValue(this)) - int32(GetWeaponSkillValue(attType,pVictim)); - float lowEnd = baseLowEnd - ( 0.05f * diff ); - float highEnd = baseHighEnd - ( 0.03f * diff ); - - // apply max/min bounds - if ( lowEnd < 0.01f ) //the low end must not go bellow 0.01f - lowEnd = 0.01f; - else if ( lowEnd > maxLowEnd ) //the smaller value of this and 0.6 is kept as the low end - lowEnd = maxLowEnd; - - if ( highEnd < 0.2f ) //high end limits - highEnd = 0.2f; - if ( highEnd > 0.99f ) - highEnd = 0.99f; - - if(lowEnd > highEnd) // prevent negative range size - lowEnd = highEnd; - - reducePercent = lowEnd + rand_norm() * ( highEnd - lowEnd ); - - *damage = uint32(reducePercent * *damage); - cleanDamage->damage += *damage; - *hitInfo |= HITINFO_GLANCING; - break; - } - case MELEE_HIT_CRUSHING: - { - // 150% normal damage - *damage += (*damage / 2); - cleanDamage->damage = *damage; - *hitInfo |= HITINFO_CRUSHING; - // TODO: victimState, victim animation? - break; - } - default: - break; - } - - // apply melee damage bonus and absorb only if base damage not fully blocked to prevent negative damage or damage with full block - if(*victimState != VICTIMSTATE_BLOCKS) - { - MeleeDamageBonus(pVictim, damage,attType,spellCasted); - CalcAbsorbResist(pVictim, damageSchoolMask, DIRECT_DAMAGE, *damage-*blocked_amount, absorbDamage, resistDamage); - } - - if (*absorbDamage) *hitInfo |= HITINFO_ABSORB; - if (*resistDamage) *hitInfo |= HITINFO_RESIST; - - cleanDamage->damage += *blocked_amount; - - if (*damage <= *absorbDamage + *resistDamage + *blocked_amount) - { - //*hitInfo = 0x00010020; - //*hitInfo |= HITINFO_SWINGNOHITSOUND; - //*damageType = 0; - CastMeleeProcDamageAndSpell(pVictim, 0, damageSchoolMask, attType, outcome, spellCasted, isTriggeredSpell); - return; - } - - // update at damage Judgement aura duration that applied by attacker at victim - if(*damage) - { - AuraMap const& vAuras = pVictim->GetAuras(); - for(AuraMap::const_iterator itr = vAuras.begin(); itr != vAuras.end(); ++itr) - { - SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); - if( (spellInfo->AttributesEx3 & 0x40000) && spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && - ((*itr).second->GetCasterGUID() == GetGUID() && (!spellCasted || spellCasted->Id == 35395)) ) - { - (*itr).second->SetAuraDuration((*itr).second->GetAuraMaxDuration()); - (*itr).second->SendAuraUpdate(false); - } - } - } - - CastMeleeProcDamageAndSpell(pVictim, (*damage - *absorbDamage - *resistDamage - *blocked_amount), damageSchoolMask, attType, outcome, spellCasted, isTriggeredSpell); - - // victim's damage shield - // yet another hack to fix crashes related to the aura getting removed during iteration - std::set alreadyDone; - uint32 removedAuras = pVictim->m_removedAuras; - AuraList const& vDamageShields = pVictim->GetAurasByType(SPELL_AURA_DAMAGE_SHIELD); - for(AuraList::const_iterator i = vDamageShields.begin(), next = vDamageShields.begin(); i != vDamageShields.end(); i = next) - { - ++next; - if (alreadyDone.find(*i) == alreadyDone.end()) - { - alreadyDone.insert(*i); - pVictim->SpellNonMeleeDamageLog(this, (*i)->GetId(), (*i)->GetModifier()->m_amount, false, false); - if (pVictim->m_removedAuras > removedAuras) - { - removedAuras = pVictim->m_removedAuras; - next = vDamageShields.begin(); - } - } - } -} - void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool extra ) { if(hasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED) ) @@ -2206,65 +1862,19 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex return; } - VictimState victimState = VICTIMSTATE_NORMAL; - - CleanDamage cleanDamage = CleanDamage(0, BASE_ATTACK, MELEE_HIT_NORMAL ); - uint32 blocked_dmg = 0; - uint32 absorbed_dmg = 0; - uint32 resisted_dmg = 0; - - SpellSchoolMask meleeSchoolMask = GetMeleeDamageSchoolMask(); - - if(pVictim->IsImmunedToDamage(meleeSchoolMask,true)) // use charges - { - SendAttackStateUpdate (HITINFO_NORMALSWING, pVictim, 1, meleeSchoolMask, 0, 0, 0, VICTIMSTATE_IS_IMMUNE, 0); - - // not recent extra attack only at any non extra attack (miss case) - if(!extra && extraAttacks) - { - while(m_extraAttacks) - { - AttackerStateUpdate(pVictim, BASE_ATTACK, true); - if(m_extraAttacks > 0) - --m_extraAttacks; - } - } - - return; - } - - uint32 damage = CalculateDamage (attType, false); - - DoAttackDamage (pVictim, &damage, &cleanDamage, &blocked_dmg, meleeSchoolMask, &hitInfo, &victimState, &absorbed_dmg, &resisted_dmg, attType); - - if (hitInfo & HITINFO_MISS) - //send miss - SendAttackStateUpdate (hitInfo, pVictim, 1, meleeSchoolMask, damage, absorbed_dmg, resisted_dmg, victimState, blocked_dmg); - else - { - //do animation - SendAttackStateUpdate (hitInfo, pVictim, 1, meleeSchoolMask, damage, absorbed_dmg, resisted_dmg, victimState, blocked_dmg); - - if (damage > (absorbed_dmg + resisted_dmg + blocked_dmg)) - damage -= (absorbed_dmg + resisted_dmg + blocked_dmg); - else - damage = 0; - - DealDamage (pVictim, damage, &cleanDamage, DIRECT_DAMAGE, meleeSchoolMask, NULL, true); - - if(GetTypeId() == TYPEID_PLAYER && pVictim->isAlive()) - { - for(int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++) - ((Player*)this)->CastItemCombatSpell(((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0,i),pVictim,attType); - } - } + CalcDamageInfo damageInfo; + CalculateMeleeDamage(pVictim, 0, &damageInfo, attType); + // Send log damage message to client + SendAttackStateUpdate(&damageInfo); + ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType); + DealMeleeDamage(&damageInfo,true); if (GetTypeId() == TYPEID_PLAYER) DEBUG_LOG("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", - GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damage, absorbed_dmg, blocked_dmg, resisted_dmg); + GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist); else DEBUG_LOG("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", - GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damage, absorbed_dmg, blocked_dmg, resisted_dmg); + GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist); // extra attack only at any non extra attack (normal case) if(!extra && extraAttacks) @@ -2278,65 +1888,6 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex } } -MeleeHitOutcome Unit::RollPhysicalOutcomeAgainst (Unit const *pVictim, WeaponAttackType attType, SpellEntry const *spellInfo) -{ - // Miss chance based on melee - float miss_chance = MeleeMissChanceCalc(pVictim, attType); - - // Critical hit chance - float crit_chance = GetUnitCriticalChance(attType, pVictim); - // this is to avoid compiler issue when declaring variables inside if - float block_chance, parry_chance, dodge_chance; - - // cannot be dodged/parried/blocked - if(spellInfo->Attributes & SPELL_ATTR_IMPOSSIBLE_DODGE_PARRY_BLOCK) - { - block_chance = 0.0f; - parry_chance = 0.0f; - dodge_chance = 0.0f; - } - else - { - // parry can be avoided only by some abilities - parry_chance = pVictim->GetUnitParryChance(); - // block might be bypassed by it as well - block_chance = pVictim->GetUnitBlockChance(); - // stunned target cannot dodge and this is check in GetUnitDodgeChance() - dodge_chance = pVictim->GetUnitDodgeChance(); - } - - // Only players can have Talent&Spell bonuses - if (GetTypeId() == TYPEID_PLAYER) - { - // Increase from SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL aura - crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, spellInfo->SchoolMask); - // Ignore combat result aura - AuraList const& ignore = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT); - for(AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i) - { - if (!(*i)->isAffectedOnSpell(spellInfo)) - continue; - switch((*i)->GetModifier()->m_miscvalue) - { - case MELEE_HIT_DODGE: dodge_chance = 0.0f; break; - case MELEE_HIT_BLOCK: block_chance = 0.0f; break; - case MELEE_HIT_PARRY: parry_chance = 0.0f; break; - default: - DEBUG_LOG("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT have unhandled state %d", (*i)->GetId(), (*i)->GetModifier()->m_miscvalue); - break; - } - } - } - - // Spellmods - if(Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance); - - DEBUG_LOG("PHYSICAL OUTCOME: miss %f crit %f dodge %f parry %f block %f",miss_chance,crit_chance,dodge_chance,parry_chance, block_chance); - - return RollMeleeOutcomeAgainst(pVictim, attType, int32(crit_chance*100), int32(miss_chance*100),int32(dodge_chance*100),int32(parry_chance*100),int32(block_chance*100), true); -} - MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit *pVictim, WeaponAttackType attType) const { // This is only wrapper @@ -2606,7 +2157,27 @@ void Unit::SendAttackStop(Unit* victim) ((Creature*)victim)->AI().EnterEvadeMode(this);*/ } -/* +bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAttackType attackType) +{ + if (pVictim->HasInArc(M_PI,this)) + { + // Ignore combat result aura (parry/dodge check on prepare) + AuraList const& ignore = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT); + for(AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i) + { + if (!(*i)->isAffectedOnSpell(spellProto)) + continue; + if ((*i)->GetModifier()->m_miscvalue == MELEE_HIT_BLOCK) + return false; + } + float blockChance = GetUnitBlockChance(); + blockChance += (GetWeaponSkillValue(attackType) - pVictim->GetMaxSkillValueForLevel() )*0.04; + if (roll_chance_f(blockChance)) + return true; + } + return false; +} + // Melee based spells can be miss, parry or dodge on this step // Crit or block - determined on damage calculation phase! (and can be both in some time) float Unit::MeleeSpellMissChance(Unit *pVictim, WeaponAttackType attType, int32 skillDiff, SpellEntry const *spell) @@ -2666,71 +2237,85 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) int32 fullSkillDiff = attackerWeaponSkill - int32(pVictim->GetDefenseSkillValue(this)); uint32 roll = urand (0, 10000); - uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f); + uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f); // Roll miss uint32 tmp = missChance; if (roll < tmp) return SPELL_MISS_MISS; + bool canDodge = true; + bool canParry = true; + // Same spells cannot be parry/dodge if (spell->Attributes & SPELL_ATTR_IMPOSSIBLE_DODGE_PARRY_BLOCK) return SPELL_MISS_NONE; - // Ranged attack can`t miss too + // Ranged attack cannot be parry/dodge if (attType == RANGED_ATTACK) return SPELL_MISS_NONE; - bool attackFromBehind = !pVictim->HasInArc(M_PI,this); - - // Roll dodge - int32 dodgeChance = int32(pVictim->GetUnitDodgeChance()*100.0f) - skillDiff * 4; - // Reduce enemy dodge chance by SPELL_AURA_MOD_COMBAT_RESULT_CHANCE - dodgeChance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE); - - // Reduce dodge chance by attacker expertise rating - if (GetTypeId() == TYPEID_PLAYER) - dodgeChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); - if (dodgeChance < 0) - dodgeChance = 0; - - // Can`t dodge from behind in PvP (but its possible in PvE) - if (GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER && attackFromBehind) - dodgeChance = 0; - - // Rogue talent`s cant be dodged - AuraList const& mCanNotBeDodge = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT); - for(AuraList::const_iterator i = mCanNotBeDodge.begin(); i != mCanNotBeDodge.end(); ++i) + // Check for attack from behind + if (!pVictim->HasInArc(M_PI,this)) { - if((*i)->GetModifier()->m_miscvalue == VICTIMSTATE_DODGE) // can't be dodged rogue finishing move + // Can`t dodge from behind in PvP (but its possible in PvE) + if (GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER) + canDodge = false; + // Can`t parry + canParry = false; + } + + // Ignore combat result aura + AuraList const& ignore = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT); + for(AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i) + { + if (!(*i)->isAffectedOnSpell(spell)) + continue; + switch((*i)->GetModifier()->m_miscvalue) { - if(spell->SpellFamilyName==SPELLFAMILY_ROGUE && (spell->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE)) - { - dodgeChance = 0; + case MELEE_HIT_DODGE: canDodge = false; break; + case MELEE_HIT_BLOCK: break; // Block check in hit step + case MELEE_HIT_PARRY: canParry = false; break; + default: + DEBUG_LOG("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT have unhandled state %d", (*i)->GetId(), (*i)->GetModifier()->m_miscvalue); break; - } } } - tmp += dodgeChance; - if (roll < tmp) - return SPELL_MISS_DODGE; + if (canDodge) + { + // Roll dodge + int32 dodgeChance = int32(pVictim->GetUnitDodgeChance()*100.0f) - skillDiff * 4; + // Reduce enemy dodge chance by SPELL_AURA_MOD_COMBAT_RESULT_CHANCE + dodgeChance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE); + // Reduce dodge chance by attacker expertise rating + if (GetTypeId() == TYPEID_PLAYER) + dodgeChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + if (dodgeChance < 0) + dodgeChance = 0; - // Roll parry - int32 parryChance = int32(pVictim->GetUnitParryChance()*100.0f) - skillDiff * 4; - // Reduce parry chance by attacker expertise rating - if (GetTypeId() == TYPEID_PLAYER) - parryChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); - // Can`t parry from behind - if (parryChance < 0 || attackFromBehind) - parryChance = 0; + tmp += dodgeChance; + if (roll < tmp) + return SPELL_MISS_DODGE; + } - tmp += parryChance; - if (roll < tmp) - return SPELL_MISS_PARRY; + if (canParry) + { + // Roll parry + int32 parryChance = int32(pVictim->GetUnitParryChance()*100.0f) - skillDiff * 4; + // Reduce parry chance by attacker expertise rating + if (GetTypeId() == TYPEID_PLAYER) + parryChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f); + if (parryChance < 0) + parryChance = 0; + + tmp += parryChance; + if (roll < tmp) + return SPELL_MISS_PARRY; + } return SPELL_MISS_NONE; -}*/ +} // TODO need use unit spell resistances in calculations SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell) @@ -2800,6 +2385,14 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell) return SPELL_MISS_NONE; } +// Calculate spell hit result can be: +// Every spell can: Evade/Immune/Reflect/Sucesful hit +// For melee based spells: +// Miss +// Dodge +// Parry +// For spells +// Resist SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool CanReflect) { // Return evade for units in evade mode @@ -2822,62 +2415,24 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool // Try victim reflect spell if (CanReflect) { - // specialized first + int32 reflectchance = pVictim->GetTotalAuraModifier(SPELL_AURA_REFLECT_SPELLS); Unit::AuraList const& mReflectSpellsSchool = pVictim->GetAurasByType(SPELL_AURA_REFLECT_SPELLS_SCHOOL); for(Unit::AuraList::const_iterator i = mReflectSpellsSchool.begin(); i != mReflectSpellsSchool.end(); ++i) - { if((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spell)) - { - int32 reflectchance = (*i)->GetModifier()->m_amount; - if (reflectchance > 0 && roll_chance_i(reflectchance)) - { - if((*i)->m_procCharges > 0) - { - --(*i)->m_procCharges; - if((*i)->m_procCharges==0) - pVictim->RemoveAurasDueToSpell((*i)->GetId()); - } - return SPELL_MISS_REFLECT; - } - } - } - - // generic reflection - Unit::AuraList const& mReflectSpells = pVictim->GetAurasByType(SPELL_AURA_REFLECT_SPELLS); - for(Unit::AuraList::const_iterator i = mReflectSpells.begin(); i != mReflectSpells.end(); ++i) + reflectchance += (*i)->GetModifier()->m_amount; + if (reflectchance > 0 && roll_chance_i(reflectchance)) { - int32 reflectchance = (*i)->GetModifier()->m_amount; - if (reflectchance > 0 && roll_chance_i(reflectchance)) - { - if((*i)->m_procCharges > 0) - { - --(*i)->m_procCharges; - if((*i)->m_procCharges==0) - pVictim->RemoveAurasDueToSpell((*i)->GetId()); - } - return SPELL_MISS_REFLECT; - } + // Start triggers for remove charges if need (trigger only for victim, and mark as active spell) + ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT, PROC_EX_REFLECT, 1, BASE_ATTACK, spell); + return SPELL_MISS_REFLECT; } } - // Temporary solution for melee based spells and spells vs SPELL_SCHOOL_NORMAL (hit result calculated after) - for (int i=0;i<3;i++) - { - if (spell->Effect[i] == SPELL_EFFECT_WEAPON_DAMAGE || - spell->Effect[i] == SPELL_EFFECT_WEAPON_PERCENT_DAMAGE || - spell->Effect[i] == SPELL_EFFECT_NORMALIZED_WEAPON_DMG || - spell->Effect[i] == SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL) - return SPELL_MISS_NONE; - } - - // TODO need use this code for spell hit result calculation - // now code commented for computability switch (spell->DmgClass) { case SPELL_DAMAGE_CLASS_RANGED: case SPELL_DAMAGE_CLASS_MELEE: -// return MeleeSpellHitResult(pVictim, spell); - return SPELL_MISS_NONE; + return MeleeSpellHitResult(pVictim, spell); case SPELL_DAMAGE_CLASS_NONE: case SPELL_DAMAGE_CLASS_MAGIC: return MagicSpellHitResult(pVictim, spell); @@ -4382,6 +3937,25 @@ void Unit::RemoveAllGameObjects() } } +void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log) +{ + WorldPacket data(SMSG_SPELLNONMELEEDAMAGELOG, (16+4+4+1+4+4+1+1+4+4+1)); // we guess size + data.append(log->target->GetPackGUID()); + data.append(log->attacker->GetPackGUID()); + data << uint32(log->SpellID); + data << uint32(log->damage); //damage amount + data << uint32(0); + data << uint8 (log->schoolMask); //damage school + data << uint32(log->absorb); //AbsorbedDamage + data << uint32(log->resist); //resist + data << uint8 (log->phusicalLog); // damsge type? flag + data << uint8 (log->unused); //unused + data << uint32(log->blocked); //blocked + data << uint32(log->HitInfo); + data << uint8 (0); // flag to use extend data + SendMessageToSet( &data, true ); +} + void Unit::SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SpellSchoolMask damageSchoolMask,uint32 AbsorbedDamage, uint32 Resist,bool PhysicalDamage, uint32 Blocked, bool CriticalHit) { sLog.outDebug("Sending: SMSG_SPELLNONMELEEDAMAGELOG"); @@ -4402,6 +3976,17 @@ void Unit::SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SendMessageToSet( &data, true ); } +void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procExtra, uint32 amount, WeaponAttackType attType, SpellEntry const *procSpell) +{ + // Not much to do if no flags are set. + if (procAttacker) + ProcDamageAndSpellFor(false,pVictim,procAttacker, procExtra,attType, procSpell, amount); + // Now go on with a victim's events'n'auras + // Not much to do if no flags are set or there is no victim + if(pVictim && pVictim->isAlive() && procVictim) + pVictim->ProcDamageAndSpellFor(true,this,procVictim, procExtra, attType, procSpell, amount); +} + void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo) { WorldPacket data(SMSG_SPELLLOGMISS, (4+8+1+4+8+1)); @@ -4416,6 +4001,69 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo) SendMessageToSet(&data, true); } +void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo) +{ + uint32 count = 1; + WorldPacket data(SMSG_ATTACKERSTATEUPDATE, (16+45)); // we guess size + data << (uint32)damageInfo->HitInfo; + data.append(GetPackGUID()); + data.append(damageInfo->target->GetPackGUID()); + data << (uint32)(damageInfo->damage); // Full damage + data << uint32(0); // overkill value + + data << (uint8)count; // Sub damage count + + for(int i = 0; i < count; ++i) + { + data << (uint32)(damageInfo->damageSchoolMask); // School of sub damage + data << (float)damageInfo->damage; // sub damage + data << (uint32)damageInfo->damage; // Sub Damage + } + + if(damageInfo->HitInfo & (HITINFO_ABSORB | HITINFO_ABSORB2)) + { + for(int i = 0; i < count; ++i) + data << (uint32)damageInfo->absorb; // Absorb + } + + if(damageInfo->HitInfo & (HITINFO_RESIST | HITINFO_RESIST2)) + { + for(int i = 0; i < count; ++i) + data << (uint32)damageInfo->resist; // Resist + } + + data << (uint32)damageInfo->TargetState; + data << (uint32)0; + data << (uint32)0; + + if(damageInfo->HitInfo & HITINFO_BLOCK) + data << (uint32)damageInfo->blocked_amount; + + if(damageInfo->HitInfo & HITINFO_UNK3) + data << uint32(0); + + if(damageInfo->HitInfo & HITINFO_UNK1) + { + data << uint32(0); + data << float(0); + data << float(0); + data << float(0); + data << float(0); + data << float(0); + data << float(0); + data << float(0); + data << float(0); + for(uint8 i = 0; i < 5; ++i) + { + data << float(0); + data << float(0); + } + data << uint32(0); + } + + SendMessageToSet( &data, true ); +} + void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount) { sLog.outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE"); @@ -4485,142 +4133,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SendMessageToSet( &data, true ); } -void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 damage, SpellSchoolMask damageSchoolMask, SpellEntry const *procSpell, bool isTriggeredSpell, WeaponAttackType attType) -{ - sLog.outDebug("ProcDamageAndSpell: attacker flags are 0x%x, victim flags 0x%x", procAttacker, procVictim); - if(procSpell) - sLog.outDebug("ProcDamageAndSpell: invoked due to spell id %u %s", procSpell->Id, (isTriggeredSpell?"(triggered)":"")); - - // Assign melee/ranged proc flags for magic attacks, that are actually melee/ranged abilities - // not assign for spell proc triggered spell to prevent infinity (or unexpected 2-3 times) melee damage spell proc call with melee damage effect - // That is the question though if it's fully correct - if(procSpell && !isTriggeredSpell) - { - if(procSpell->DmgClass == SPELL_DAMAGE_CLASS_MELEE) - { - if(procAttacker & PROC_FLAG_HIT_SPELL) procAttacker |= PROC_FLAG_HIT_MELEE; - if(procAttacker & PROC_FLAG_CRIT_SPELL) procAttacker |= PROC_FLAG_CRIT_MELEE; - if(procVictim & PROC_FLAG_STRUCK_SPELL) procVictim |= PROC_FLAG_STRUCK_MELEE; - if(procVictim & PROC_FLAG_STRUCK_CRIT_SPELL) procVictim |= PROC_FLAG_STRUCK_CRIT_MELEE; - attType = BASE_ATTACK; // Melee abilities are assumed to be dealt with mainhand weapon - } - else if (procSpell->DmgClass == SPELL_DAMAGE_CLASS_RANGED) - { - if(procAttacker & PROC_FLAG_HIT_SPELL) procAttacker |= PROC_FLAG_HIT_RANGED; - if(procAttacker & PROC_FLAG_CRIT_SPELL) procAttacker |= PROC_FLAG_CRIT_RANGED; - if(procVictim & PROC_FLAG_STRUCK_SPELL) procVictim |= PROC_FLAG_STRUCK_RANGED; - if(procVictim & PROC_FLAG_STRUCK_CRIT_SPELL) procVictim |= PROC_FLAG_STRUCK_CRIT_RANGED; - attType = RANGED_ATTACK; - } - } - if(damage && (procVictim & (PROC_FLAG_STRUCK_MELEE|PROC_FLAG_STRUCK_RANGED|PROC_FLAG_STRUCK_SPELL))) - procVictim |= (PROC_FLAG_TAKE_DAMAGE|PROC_FLAG_TOUCH); - - // Not much to do if no flags are set. - if (procAttacker) - { - // processing auras that not generate casts at proc event before auras that generate casts to prevent proc aura added at prev. proc aura execute in set - ProcDamageAndSpellFor(false,pVictim,procAttacker,attackerProcEffectAuraTypes,attType, procSpell, damage, damageSchoolMask); - ProcDamageAndSpellFor(false,pVictim,procAttacker,attackerProcCastAuraTypes,attType, procSpell, damage, damageSchoolMask); - } - - // Now go on with a victim's events'n'auras - // Not much to do if no flags are set or there is no victim - if(pVictim && pVictim->isAlive() && procVictim) - { - // processing auras that not generate casts at proc event before auras that generate casts to prevent proc aura added at prev. proc aura execute in set - pVictim->ProcDamageAndSpellFor(true,this,procVictim,victimProcEffectAuraTypes,attType,procSpell, damage, damageSchoolMask); - pVictim->ProcDamageAndSpellFor(true,this,procVictim,victimProcCastAuraTypes,attType,procSpell, damage, damageSchoolMask); - } -} - -void Unit::CastMeleeProcDamageAndSpell(Unit* pVictim, uint32 damage, SpellSchoolMask damageSchoolMask, WeaponAttackType attType, MeleeHitOutcome outcome, SpellEntry const *spellCasted, bool isTriggeredSpell) -{ - if(!pVictim) - return; - - uint32 procAttacker = PROC_FLAG_NONE; - uint32 procVictim = PROC_FLAG_NONE; - - switch(outcome) - { - case MELEE_HIT_EVADE: - return; - case MELEE_HIT_MISS: - if(attType == BASE_ATTACK || attType == OFF_ATTACK) - { - procAttacker = PROC_FLAG_MISS; - } - break; - case MELEE_HIT_BLOCK_CRIT: - case MELEE_HIT_CRIT: - if(spellCasted && attType == BASE_ATTACK) - { - procAttacker |= PROC_FLAG_CRIT_SPELL; - procVictim |= PROC_FLAG_STRUCK_CRIT_SPELL; - if ( outcome == MELEE_HIT_BLOCK_CRIT ) - { - procVictim |= PROC_FLAG_BLOCK; - procAttacker |= PROC_FLAG_TARGET_BLOCK; - } - } - else if(attType == BASE_ATTACK || attType == OFF_ATTACK) - { - procAttacker = PROC_FLAG_HIT_MELEE | PROC_FLAG_CRIT_MELEE; - procVictim = PROC_FLAG_STRUCK_MELEE | PROC_FLAG_STRUCK_CRIT_MELEE; - } - else - { - procAttacker = PROC_FLAG_HIT_RANGED | PROC_FLAG_CRIT_RANGED; - procVictim = PROC_FLAG_STRUCK_RANGED | PROC_FLAG_STRUCK_CRIT_RANGED; - } - break; - case MELEE_HIT_PARRY: - procAttacker = PROC_FLAG_TARGET_DODGE_OR_PARRY; - procVictim = PROC_FLAG_PARRY; - break; - case MELEE_HIT_BLOCK: - procAttacker = PROC_FLAG_TARGET_BLOCK; - procVictim = PROC_FLAG_BLOCK; - break; - case MELEE_HIT_DODGE: - procAttacker = PROC_FLAG_TARGET_DODGE_OR_PARRY; - procVictim = PROC_FLAG_DODGE; - break; - case MELEE_HIT_CRUSHING: - if(attType == BASE_ATTACK || attType == OFF_ATTACK) - { - procAttacker = PROC_FLAG_HIT_MELEE | PROC_FLAG_CRIT_MELEE; - procVictim = PROC_FLAG_STRUCK_MELEE | PROC_FLAG_STRUCK_CRIT_MELEE; - } - else - { - procAttacker = PROC_FLAG_HIT_RANGED | PROC_FLAG_CRIT_RANGED; - procVictim = PROC_FLAG_STRUCK_RANGED | PROC_FLAG_STRUCK_CRIT_RANGED; - } - break; - default: - if(attType == BASE_ATTACK || attType == OFF_ATTACK) - { - procAttacker = PROC_FLAG_HIT_MELEE; - procVictim = PROC_FLAG_STRUCK_MELEE; - } - else - { - procAttacker = PROC_FLAG_HIT_RANGED; - procVictim = PROC_FLAG_STRUCK_RANGED; - } - break; - } - - if(damage > 0) - procVictim |= PROC_FLAG_TAKE_DAMAGE; - - if(procAttacker != PROC_FLAG_NONE || procVictim != PROC_FLAG_NONE) - ProcDamageAndSpell(pVictim, procAttacker, procVictim, damage, damageSchoolMask, spellCasted, isTriggeredSpell, attType); -} - -bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 cooldown) +bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown) { SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto(); @@ -4683,7 +4196,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return true; } -bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 cooldown) +bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown) { SpellEntry const *dummySpell = triggeredByAura->GetSpellProto (); uint32 effIndex = triggeredByAura->GetEffIndex (); @@ -4796,19 +4309,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if(!procSpell) return false; - // not from DoT - bool found = false; - for(int j = 0; j < 3; ++j) - { - if(procSpell->EffectApplyAuraName[j]==SPELL_AURA_PERIODIC_DAMAGE||procSpell->EffectApplyAuraName[j]==SPELL_AURA_PERIODIC_DAMAGE_PERCENT) - { - found = true; - break; - } - } - if(found) - return false; - switch(GetFirstSchoolInMask(GetSpellSchoolMask(procSpell))) { case SPELL_SCHOOL_NORMAL: @@ -5074,6 +4574,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 29077; break; } + // Incanter's Regalia set (add trigger chance to Mana Shield) + if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL) + { + if(GetTypeId() != TYPEID_PLAYER) + return false; + + target = this; + triggered_spell_id = 37436; + break; + } switch(dummySpell->Id) { // Ignite @@ -5102,14 +4612,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu case 11129: { //last charge and crit - if( triggeredByAura->m_procCharges <= 1 && (procFlag & PROC_FLAG_CRIT_SPELL) ) + if (triggeredByAura->m_procCharges <= 1 && (procEx & PROC_EX_CRITICAL_HIT) ) { RemoveAurasDueToSpell(28682); //-> remove Combustion auras return true; // charge counting (will removed) } CastSpell(this, 28682, true, castItem, triggeredByAura); - return(procFlag & PROC_FLAG_CRIT_SPELL);// charge update only at crit hits, no hidden cooldowns + return (procEx & PROC_EX_CRITICAL_HIT);// charge update only at crit hits, no hidden cooldowns } } break; @@ -5126,6 +4636,34 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 22858; break; } + else if (dummySpell->SpellIconID == 1697) // Second Wind + { + // only for spells and hit/crit (trigger start always) and not start from self casted spells (5530 Mace Stun Effect for example) + if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == pVictim) + return false; + // Need stun or root mechanic + if (procSpell->Mechanic != MECHANIC_ROOT && procSpell->Mechanic != MECHANIC_STUN) + { + int32 i; + for (i=0; i<3; i++) + if (procSpell->EffectMechanic[i] == MECHANIC_ROOT || procSpell->EffectMechanic[i] == MECHANIC_STUN) + break; + if (i == 3) + return false; + } + + switch (dummySpell->Id) + { + case 29838: triggered_spell_id=29842; break; + case 29834: triggered_spell_id=29841; break; + default: + sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (SW)",dummySpell->Id); + return false; + } + + target = this; + break; + } break; } case SPELLFAMILY_WARLOCK: @@ -5135,7 +4673,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu { Modifier* mod = triggeredByAura->GetModifier(); // if damage is more than need or target die from damage deal finish spell - // FIX ME: not triggered currently at death if( mod->m_amount <= damage || GetHealth() <= damage ) { // remember guid before aura delete @@ -5478,16 +5015,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu switch(triggeredByAura->GetEffIndex()) { case 0: - // prevent chain triggering - if(procSpell && procSpell->Id==31893 ) - return false; - triggered_spell_id = 31893; break; case 1: { // damage - basepoints0 = triggeredByAura->GetModifier()->m_amount * damage / 100; + damage += CalculateDamage(BASE_ATTACK, false) * 35 / 100; // add spell damage from prev effect (35%) + basepoints0 = triggeredByAura->GetModifier()->m_amount * damage / 100; + target = this; triggered_spell_id = 32221; break; @@ -5834,665 +5369,657 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return true; } -bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlags,WeaponAttackType attackType, uint32 cooldown) +bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlags, uint32 procEx, uint32 cooldown) { + // Get triggered aura spell info SpellEntry const* auraSpellInfo = triggeredByAura->GetSpellProto(); + // Basepoints of trigger aura + int32 triggerAmount = triggeredByAura->GetModifier()->m_amount; + + // Set trigger spell id, target, custom basepoints + uint32 trigger_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()]; + Unit* target = NULL; + int32 basepoints0 = 0; + + if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE) + basepoints0 = triggerAmount; + Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL; - uint32 triggered_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()]; - Unit* target = !(procFlags & PROC_FLAG_HEAL) && IsPositiveSpell(triggered_spell_id) ? this : pVictim; - int32 basepoints0 = 0; - - switch(auraSpellInfo->SpellFamilyName) + // Try handle uncnown trigger spells + if (sSpellStore.LookupEntry(trigger_spell_id)==NULL) { - case SPELLFAMILY_GENERIC: + switch (auraSpellInfo->SpellFamilyName) { - switch(auraSpellInfo->Id) - { - // Aegis of Preservation - case 23780: - //Aegis Heal (instead non-existed triggered spell) - triggered_spell_id = 23781; - target = this; - break; - // Elune's Touch (moonkin mana restore) - case 24905: + case SPELLFAMILY_GENERIC: + //if (auraSpellInfo->Id==59532) // Abandon Passengers on Poly + //if (auraSpellInfo->Id==54775) // Abandon Vehicle on Poly + //if (auraSpellInfo->Id==34082) // Advantaged State (DND) + if (auraSpellInfo->Id == 23780) // Aegis of Preservation (Aegis of Preservation trinket) + trigger_spell_id = 23781; + //else if (auraSpellInfo->Id==43504) // Alterac Valley OnKill Proc Aura + //else if (auraSpellInfo->Id == 48876) // Beast's Mark + //{ + // trigger_spell_id = 48877; + //} + //else if (auraSpellInfo->Id == 59237) // Beast's Mark + //{ + // trigger_spell_id = 59233; + //} + //else if (auraSpellInfo->Id==46939) // Black Bow of the Betrayer + //{ + // trigger_spell_id = 29471; // gain mana + // 27526; // drain mana if possible + //} + //else if (auraSpellInfo->Id==50844) // Blood Mirror + //else if (auraSpellInfo->Id==54476) // Blood Presence + //else if (auraSpellInfo->Id==50689) // Blood Presence (Rank 1) + //else if (auraSpellInfo->Id==37030) // Chaotic Temperament + //else if (auraSpellInfo->Id==52856) // Charge + else if (auraSpellInfo->Id==43820) // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket) { - // Elune's Touch (instead non-existed triggered spell) - triggered_spell_id = 33926; - basepoints0 = int32(0.3f * GetTotalAttackPowerValue(BASE_ATTACK)); - target = this; - break; - } - // Enlightenment - case 29601: - { - // only for cast with mana price - if(!procSpell || procSpell->powerType!=POWER_MANA || procSpell->manaCost==0 && procSpell->ManaCostPercentage==0 && procSpell->manaCostPerlevel==0) - return false; - break; // fall through to normal cast - } - // Health Restore - case 33510: - { - // at melee hit call std triggered spell - if(procFlags & PROC_FLAG_HIT_MELEE) - break; // fall through to normal cast - - // Mark of Conquest - else (at range hit) called custom case - triggered_spell_id = 39557; - target = this; - break; - } - // Shaleskin - case 36576: - return true; // nothing to do - // Forgotten Knowledge (Blade of Wizardry) - case 38319: - // only for harmful enemy targeted spell - if(!pVictim || pVictim==this || !procSpell || IsPositiveSpell(procSpell->Id)) - return false; - break; // fall through to normal cast - // Aura of Wrath (Darkmoon Card: Wrath trinket bonus) - case 39442: - { - // proc only at non-crit hits - if(procFlags & (PROC_FLAG_CRIT_MELEE|PROC_FLAG_CRIT_RANGED|PROC_FLAG_CRIT_SPELL)) - return false; - break; // fall through to normal cast - } - // Augment Pain (Timbal's Focusing Crystal trinket bonus) - case 45054: - { - if(!procSpell) - return false; - - //only periodic damage can trigger spell - bool found = false; - for(int j = 0; j < 3; ++j) - { - if( procSpell->EffectApplyAuraName[j]==SPELL_AURA_PERIODIC_DAMAGE || - procSpell->EffectApplyAuraName[j]==SPELL_AURA_PERIODIC_DAMAGE_PERCENT || - procSpell->EffectApplyAuraName[j]==SPELL_AURA_PERIODIC_LEECH ) - { - found = true; - break; - } - } - if(!found) - return false; - - break; // fall through to normal cast - } - // Evasive Maneuvers (Commendation of Kael'thas) - case 45057: - { - // damage taken that reduces below 35% health - // does NOT mean you must have been >= 35% before - if (int32(GetHealth())-int32(damage) >= int32(GetMaxHealth()*0.35f)) - return false; - break; // fall through to normal cast - } - } - - switch(triggered_spell_id) - { - // Setup - case 15250: - { - // applied only for main target - if(!pVictim || pVictim != getVictim()) - return false; - - // continue normal case - break; - } - // Shamanistic Rage triggered spell - case 30824: - basepoints0 = int32(GetTotalAttackPowerValue(BASE_ATTACK)*triggeredByAura->GetModifier()->m_amount/100); - break; - } - break; - } - case SPELLFAMILY_MAGE: - { - switch(auraSpellInfo->SpellIconID) - { - // Blazing Speed - case 2127: - //Blazing Speed (instead non-existed triggered spell) - triggered_spell_id = 31643; - target = this; - break; - } - switch(auraSpellInfo->Id) - { - // Persistent Shield (Scarab Brooch) - case 26467: - basepoints0 = int32(damage * 0.15f); - break; - } - break; - } - case SPELLFAMILY_WARRIOR: - { - //Rampage - if((auraSpellInfo->SpellFamilyFlags & 0x100000) && auraSpellInfo->SpellIconID==2006) - { - //all ranks have effect[0]==AURA (Proc Trigger Spell, non-existed) - //and effect[1]==TriggerSpell - if(auraSpellInfo->Effect[1]!=SPELL_EFFECT_TRIGGER_SPELL) - { - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have wrong effect in RM",triggeredByAura->GetSpellProto()->Id); - return false; - } - triggered_spell_id = auraSpellInfo->EffectTriggerSpell[1]; - break; // fall through to normal cast - } - break; - } - case SPELLFAMILY_WARLOCK: - { - // Pyroclasm - if(auraSpellInfo->SpellFamilyFlags == 0x0000000000000000 && auraSpellInfo->SpellIconID==1137) - { - // last case for Hellfire that damage caster also but don't must stun caster - if( pVictim == this ) - return false; - - // custom chance - float chance = 0; - switch (triggeredByAura->GetId()) - { - case 18096: chance = 13.0f; break; - case 18073: chance = 26.0f; break; - } - if (!roll_chance_f(chance)) - return false; - - // Pyroclasm (instead non-existed triggered spell) - triggered_spell_id = 18093; - target = pVictim; - break; - } - // Drain Soul - if(auraSpellInfo->SpellFamilyFlags & 0x0000000000004000) - { - bool found = false; - Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER); - for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i) - { - //Improved Drain Soul - if ((*i)->GetModifier()->m_miscvalue == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113) - { - int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this); - basepoints0 = value2 * GetMaxPower(POWER_MANA) / 100; - // Drain Soul - CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura); - break; - } - } - // Not remove charge (aura removed on death in any cases) - // Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura - return false; - } - break; - } - case SPELLFAMILY_PRIEST: - { - //Blessed Recovery - if(auraSpellInfo->SpellFamilyFlags == 0x00000000LL && auraSpellInfo->SpellIconID==1875) - { - switch (triggeredByAura->GetSpellProto()->Id) - { - case 27811: triggered_spell_id = 27813; break; - case 27815: triggered_spell_id = 27817; break; - case 27816: triggered_spell_id = 27818; break; - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR",triggeredByAura->GetSpellProto()->Id); - return false; - } - - int32 heal_amount = damage * triggeredByAura->GetModifier()->m_amount / 100; - basepoints0 = heal_amount/3; - target = this; - break; - } - // Shadowguard - if((auraSpellInfo->SpellFamilyFlags & 0x80000000LL) && auraSpellInfo->SpellVisual[0]==7958) - { - switch(triggeredByAura->GetSpellProto()->Id) - { - case 18137: - triggered_spell_id = 28377; break; // Rank 1 - case 19308: - triggered_spell_id = 28378; break; // Rank 2 - case 19309: - triggered_spell_id = 28379; break; // Rank 3 - case 19310: - triggered_spell_id = 28380; break; // Rank 4 - case 19311: - triggered_spell_id = 28381; break; // Rank 5 - case 19312: - triggered_spell_id = 28382; break; // Rank 6 - case 25477: - triggered_spell_id = 28385; break; // Rank 7 - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in SG",triggeredByAura->GetSpellProto()->Id); - return false; - } - target = pVictim; - break; - } - break; - } - case SPELLFAMILY_DRUID: - { - switch(auraSpellInfo->Id) - { - // Leader of the Pack (triggering Improved Leader of the Pack heal) - case 24932: - { - if (triggeredByAura->GetModifier()->m_amount == 0) - return false; - basepoints0 = triggeredByAura->GetModifier()->m_amount * GetMaxHealth() / 100; - triggered_spell_id = 34299; - break; - }; - // Druid Forms Trinket (Druid Tier5 Trinket, triggers different spells per Form) - case 37336: - { - switch(m_form) - { - case FORM_BEAR: - case FORM_DIREBEAR: - triggered_spell_id=37340; break;// Ursine Blessing - case FORM_CAT: - triggered_spell_id=37341; break;// Feline Blessing - case FORM_TREE: - triggered_spell_id=37342; break;// Slyvan Blessing - case FORM_MOONKIN: - triggered_spell_id=37343; break;// Lunar Blessing - case FORM_NONE: - triggered_spell_id=37344; break;// Cenarion Blessing (for caster form, except FORM_MOONKIN) - default: - return false; - } - - target = this; - break; - } - } - break; - } - case SPELLFAMILY_ROGUE: - { - if(auraSpellInfo->SpellFamilyFlags == 0x0000000000000000LL) - { - switch(auraSpellInfo->SpellIconID) - { - // Combat Potency - case 2260: - { - // skip non offhand attacks - if(attackType!=OFF_ATTACK) - return false; - break; // fall through to normal cast - } - } - } - break; - } - case SPELLFAMILY_PALADIN: - { - if(auraSpellInfo->SpellFamilyFlags == 0x00000000LL) - { - switch(auraSpellInfo->Id) - { - // Lightning Capacitor - case 37657: - { - // trinket ProcTriggerSpell but for safe checks for player - if(!castItem || !pVictim || !pVictim->isAlive() || GetTypeId()!=TYPEID_PLAYER) - return false; - - if(((Player*)this)->HasSpellCooldown(37657)) - return false; - - // stacking - CastSpell(this, 37658, true, castItem, triggeredByAura); - // 2.5s cooldown before it can stack again, current system allow 1 sec step in cooldown - ((Player*)this)->AddSpellCooldown(37657,0,time(NULL)+(roll_chance_i(50) ? 2 : 3)); - - // counting - uint32 count = 0; - AuraList const& dummyAura = GetAurasByType(SPELL_AURA_DUMMY); - for(AuraList::const_iterator itr = dummyAura.begin(); itr != dummyAura.end(); ++itr) - if((*itr)->GetId()==37658) - ++count; - - // release at 3 aura in stack - if(count <= 2) - return true; // main triggered spell casted anyway - - RemoveAurasDueToSpell(37658); - CastSpell(pVictim, 37661, true, castItem, triggeredByAura); - return true; - } - // Healing Discount - case 37705: - // Healing Trance (instead non-existed triggered spell) - triggered_spell_id = 37706; - target = this; - break; - // HoTs on Heals (Fel Reaver's Piston trinket) - case 38299: - { - // at direct heal effect - if(!procSpell || !IsSpellHaveEffect(procSpell,SPELL_EFFECT_HEAL)) - return false; - - // single proc at time - AuraList const& scAuras = GetSingleCastAuras(); - for(AuraList::const_iterator itr = scAuras.begin(); itr != scAuras.end(); ++itr) - if((*itr)->GetId()==triggered_spell_id) - return false; - - // positive cast at victim instead self - target = pVictim; - break; - } - } - switch(auraSpellInfo->SpellIconID) - { - case 241: - { - switch(auraSpellInfo->EffectTriggerSpell[0]) - { - //Illumination - case 18350: - { - if(!procSpell) - return false; - - // procspell is triggered spell but we need mana cost of original casted spell - uint32 originalSpellId = procSpell->Id; - - // Holy Shock - if(procSpell->SpellFamilyName == SPELLFAMILY_PALADIN) - { - if(procSpell->SpellFamilyFlags & 0x0001000000000000LL) - { - switch(procSpell->Id) - { - case 25914: originalSpellId = 20473; break; - case 25913: originalSpellId = 20929; break; - case 25903: originalSpellId = 20930; break; - case 27175: originalSpellId = 27174; break; - case 33074: originalSpellId = 33072; break; - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock",procSpell->Id); - return false; - } - } - } - - SpellEntry const *originalSpell = sSpellStore.LookupEntry(originalSpellId); - if(!originalSpell) - { - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu",originalSpellId); - return false; - } - - // percent stored in effect 1 (class scripts) base points - int32 percent = auraSpellInfo->EffectBasePoints[1]+1; - - basepoints0 = originalSpell->manaCost*percent/100; - triggered_spell_id = 20272; - target = this; - break; - } - } - break; - } - } - } - if(auraSpellInfo->SpellFamilyFlags & 0x00080000) - { - switch(auraSpellInfo->SpellIconID) - { - //Judgement of Wisdom (overwrite non existing triggered spell call in spell.dbc - case 206: - { - if(!pVictim || !pVictim->isAlive()) - return false; - - switch(triggeredByAura->GetSpellProto()->Id) - { - case 20186: - triggered_spell_id = 20268; // Rank 1 - break; - case 20354: - triggered_spell_id = 20352; // Rank 2 - break; - case 20355: - triggered_spell_id = 20353; // Rank 3 - break; - case 27164: - triggered_spell_id = 27165; // Rank 4 - break; - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in JoW",triggeredByAura->GetSpellProto()->Id); - return false; - } - - pVictim->CastSpell(pVictim,triggered_spell_id,true,castItem,triggeredByAura,GetGUID()); - return true; // no hidden cooldown - } - //Judgement of Light - case 299: - { - if(!pVictim || !pVictim->isAlive()) - return false; - - // overwrite non existing triggered spell call in spell.dbc - switch(triggeredByAura->GetSpellProto()->Id) - { - case 20185: - triggered_spell_id = 20267; // Rank 1 - break; - case 20344: - triggered_spell_id = 20341; // Rank 2 - break; - case 20345: - triggered_spell_id = 20342; // Rank 3 - break; - case 20346: - triggered_spell_id = 20343; // Rank 4 - break; - case 27162: - triggered_spell_id = 27163; // Rank 5 - break; - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in JoL",triggeredByAura->GetSpellProto()->Id); - return false; - } - pVictim->CastSpell(pVictim,triggered_spell_id,true,castItem,triggeredByAura,GetGUID()); - return true; // no hidden cooldown - } - } - } - // custom check for proc spell - switch(auraSpellInfo->Id) - { - // Bonus Healing (item spell) - case 40971: - { - if(!pVictim || !pVictim->isAlive()) - return false; - - // bonus if health < 50% - if(pVictim->GetHealth() >= pVictim->GetMaxHealth()*triggeredByAura->GetModifier()->m_amount/100) - return false; - - // cast at target positive spell + // Pct value stored in dummy + basepoints0 = pVictim->GetCreateHealth() * auraSpellInfo->EffectBasePoints[1] / 100; target = pVictim; break; } - } - switch(triggered_spell_id) - { - // Seal of Command - case 20424: - // prevent chain of triggered spell from same triggered spell - if(procSpell && procSpell->Id==20424) - return false; - break; - } - break; - } - case SPELLFAMILY_SHAMAN: - { - if(auraSpellInfo->SpellFamilyFlags == 0x0000000000000000) - { - switch(auraSpellInfo->SpellIconID) + //else if (auraSpellInfo->Id==41248) // Consuming Strikes + // trigger_spell_id = 41249; + //else if (auraSpellInfo->Id==45205) // Copy Offhand Weapon + //else if (auraSpellInfo->Id==57594) // Copy Ranged Weapon + //else if (auraSpellInfo->Id==41054) // Copy Weapon + // trigger_spell_id = 41055; + //else if (auraSpellInfo->Id==45343) // Dark Flame Aura + //else if (auraSpellInfo->Id==47300) // Dark Flame Aura + else if (auraSpellInfo->Id==57345) // Darkmoon Card: Greatness { - case 19: + uint32 stat = 0; + // strength + if (GetStat(STAT_STRENGTH) > stat) { trigger_spell_id = 60229;stat = GetStat(STAT_STRENGTH); } + // agility + if (GetStat(STAT_AGILITY) > stat) { trigger_spell_id = 60233;stat = GetStat(STAT_AGILITY); } + // intellect + if (GetStat(STAT_INTELLECT)> stat) { trigger_spell_id = 60234;stat = GetStat(STAT_INTELLECT);} + // spirit + if (GetStat(STAT_SPIRIT) > stat) { trigger_spell_id = 60235;stat = GetStat(STAT_SPIRIT); } + } + //else if (auraSpellInfo->Id==31255) // Deadly Swiftness (Rank 1) + //else if (auraSpellInfo->Id==5301) // Defensive State (DND) + //else if (auraSpellInfo->Id==13358) // Defensive State (DND) + //else if (auraSpellInfo->Id==16092) // Defensive State (DND) + //else if (auraSpellInfo->Id==24949) // Defensive State 2 (DND) + //else if (auraSpellInfo->Id==40329) // Demo Shout Sensor + else if (auraSpellInfo->Id == 33896) // Desperate Defense (Stonescythe Whelp, Stonescythe Alpha, Stonescythe Ambusher) + trigger_spell_id = 33898; + //else if (auraSpellInfo->Id==18943) // Double Attack + //else if (auraSpellInfo->Id==19194) // Double Attack + //else if (auraSpellInfo->Id==19817) // Double Attack + //else if (auraSpellInfo->Id==19818) // Double Attack + //else if (auraSpellInfo->Id==22835) // Drunken Rage + // trigger_spell_id = 14822; + /* + else if (auraSpellInfo->SpellIconID==191) // Elemental Response + { + switch (auraSpellInfo->Id && auraSpellInfo->AttributesEx==0) { - switch(auraSpellInfo->Id) + case 34191: + case 34329: + case 34524: + case 34582: + case 36733: + break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Elemental Response",auraSpellInfo->Id); + return false; + } + //This generic aura self-triggers a different spell for each school of magic that lands on the wearer: + switch (procSpell->School) + { + case SPELL_SCHOOL_FIRE: trigger_spell_id = 34192; break; + case SPELL_SCHOOL_FROST: trigger_spell_id = 34193; break; + case SPELL_SCHOOL_ARCANE:trigger_spell_id = 34194; break; + case SPELL_SCHOOL_NATURE:trigger_spell_id = 34195; break; + case SPELL_SCHOOL_SHADOW:trigger_spell_id = 34196; break; + case SPELL_SCHOOL_HOLY: trigger_spell_id = 34197; break; + case SPELL_SCHOOL_NORMAL:trigger_spell_id = 34198; break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u Elemental Response wrong school",auraSpellInfo->Id); + return false; + } + } + */ + //else if (auraSpellInfo->Id==40364) // Entangling Roots Sensor + //else if (auraSpellInfo->Id==33207) // Gossip NPC Periodic - Fidget + //else if (auraSpellInfo->Id==50051) // Ethereal Pet Aura + //else if (auraSpellInfo->Id==35321) // Gushing Wound + //else if (auraSpellInfo->Id==38363) // Gushing Wound + //else if (auraSpellInfo->Id==39215) // Gushing Wound + //else if (auraSpellInfo->Id==44527) // Hate Monster (Spar Buddy) (30 sec) + //else if (auraSpellInfo->Id==44819) // Hate Monster (Spar Buddy) (>30% Health) + //else if (auraSpellInfo->Id==44526) // Hate Monster (Spar) (30 sec) + //else if (auraSpellInfo->Id==44820) // Hate Monster (Spar) (<30%) + //else if (auraSpellInfo->Id==49059) // Horde, Hate Monster (Spar Buddy) (>30% Health) + //else if (auraSpellInfo->Id==40250) // Improved Duration + //else if (auraSpellInfo->Id==59288) // Infra-Green Shield + //else if (auraSpellInfo->Id==54072) // Knockback Ball Passive + else if (auraSpellInfo->Id==27522 || auraSpellInfo->Id==40336) + // Mana Drain Trigger + { + // On successful melee or ranged attack gain $29471s1 mana and if possible drain $27526s1 mana from the target. + if (this && this->isAlive()) + CastSpell(this, 29471, true, castItem, triggeredByAura); + if (pVictim && pVictim->isAlive()) + CastSpell(pVictim, 27526, true, castItem, triggeredByAura); + return true; + } + //else if (auraSpellInfo->Id==55580) // Mana Link + //else if (auraSpellInfo->Id==45903) // Offensive State + //else if (auraSpellInfo->Id==44326) // Pure Energy Passive + //else if (auraSpellInfo->Id==43453) // Rune Ward + //else if (auraSpellInfo->Id== 7137) // Shadow Charge (Rank 1) + //else if (auraSpellInfo->Id==36576) // Shaleskin (Shaleskin Flayer, Shaleskin Ripper) 30023 trigger + //else if (auraSpellInfo->Id==34783) // Spell Reflection + //else if (auraSpellInfo->Id==36096) // Spell Reflection + //else if (auraSpellInfo->Id==57587) // Steal Ranged () + //else if (auraSpellInfo->Id==36207) // Steal Weapon + //else if (auraSpellInfo->Id== 7377) // Take Immune Periodic Damage + //else if (auraSpellInfo->Id==35205) // Vanish + //else if (auraSpellInfo->Id==42730) // Woe Strike + //else if (auraSpellInfo->Id==59735) // Woe Strike + //else if (auraSpellInfo->Id==46146) // [PH] Ahune Spanky Hands + break; + case SPELLFAMILY_MAGE: + if (auraSpellInfo->SpellIconID == 2127) // Blazing Speed + { + switch (auraSpellInfo->Id) + { + case 31641: // Rank 1 + case 31642: // Rank 2 + trigger_spell_id = 31643; + break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed",auraSpellInfo->Id); + return false; + } + } + break; + case SPELLFAMILY_WARRIOR: + if (auraSpellInfo->Id == 50421) // Scent of Blood + trigger_spell_id = 50422; + break; + case SPELLFAMILY_WARLOCK: + { + // Pyroclasm + if (auraSpellInfo->SpellIconID == 1137) + { + if(!pVictim || !pVictim->isAlive() || pVictim == this || procSpell == NULL) + return false; + // Calculate spell tick count for spells + uint32 tick = 1; // Default tick = 1 + + // Hellfire have 15 tick + if (procSpell->SpellFamilyFlags&0x0000000000000040LL) + tick = 15; + // Rain of Fire have 4 tick + else if (procSpell->SpellFamilyFlags&0x0000000000000020LL) + tick = 4; + else + return false; + + // Calculate chance = baseChance / tick + float chance = 0; + switch (auraSpellInfo->Id) + { + case 18096: chance = 13.0f / tick; break; + case 18073: chance = 26.0f / tick; break; + } + // Roll chance + if (!roll_chance_f(chance)) + return false; + + trigger_spell_id = 18093; + } + // Drain Soul + else if (auraSpellInfo->SpellFamilyFlags & 0x0000000000004000LL) + { + Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER); + for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i) + { + if ((*i)->GetModifier()->m_miscvalue == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113) { - case 23551: // Lightning Shield - Tier2: 8 pieces proc shield - { - // Lightning Shield (overwrite non existing triggered spell call in spell.dbc) - triggered_spell_id = 23552; - target = pVictim; - break; - } - case 23552: // Lightning Shield - trigger shield damage - { - // Lightning Shield (overwrite non existing triggered spell call in spell.dbc) - triggered_spell_id = 27635; - target = pVictim; - break; - } + int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this); + // Drain Soul + CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura); + break; } - break; - } - // Mana Surge (Shaman T1 bonus) - case 87: - { - if(!procSpell) - return false; - - basepoints0 = procSpell->manaCost * 35/100; - triggered_spell_id = 23571; - target = this; - break; - } - //Nature's Guardian - case 2013: - { - if(GetTypeId()!=TYPEID_PLAYER) - return false; - - // damage taken that reduces below 30% health - // does NOT mean you must have been >= 30% before - if (10*(int32(GetHealth())-int32(damage)) >= 3*GetMaxHealth()) - return false; - - triggered_spell_id = 31616; - - // need check cooldown now - if( cooldown && ((Player*)this)->HasSpellCooldown(triggered_spell_id)) - return false; - - basepoints0 = triggeredByAura->GetModifier()->m_amount * GetMaxHealth() / 100; - target = this; - if(pVictim && pVictim->isAlive()) - pVictim->getThreatManager().modifyThreatPercent(this,-10); - break; } + // Not remove charge (aura removed on death in any cases) + // Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura + return false; } - } - - // Water Shield (we can't set cooldown for main spell - it's player casted spell - if((auraSpellInfo->SpellFamilyFlags & 0x0000002000000000LL) && auraSpellInfo->SpellVisual[0]==7358) - { - target = this; - break; - } - - // Lightning Shield - if((auraSpellInfo->SpellFamilyFlags & 0x00000400) && auraSpellInfo->SpellVisual[0]==37) - { - // overwrite non existing triggered spell call in spell.dbc - switch(triggeredByAura->GetSpellProto()->Id) + // Nether Protection + else if (auraSpellInfo->SpellIconID == 1985) { - case 324: - triggered_spell_id = 26364; break; // Rank 1 - case 325: - triggered_spell_id = 26365; break; // Rank 2 - case 905: - triggered_spell_id = 26366; break; // Rank 3 - case 945: - triggered_spell_id = 26367; break; // Rank 4 - case 8134: - triggered_spell_id = 26369; break; // Rank 5 - case 10431: - triggered_spell_id = 26370; break; // Rank 6 - case 10432: - triggered_spell_id = 26363; break; // Rank 7 - case 25469: - triggered_spell_id = 26371; break; // Rank 8 - case 25472: - triggered_spell_id = 26372; break; // Rank 9 - default: - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in LShield",triggeredByAura->GetSpellProto()->Id); + if (!procSpell) return false; + switch(GetFirstSchoolInMask(GetSpellSchoolMask(procSpell))) + { + case SPELL_SCHOOL_NORMAL: + case SPELL_SCHOOL_HOLY: + return false; // ignore + case SPELL_SCHOOL_FIRE: trigger_spell_id = 54371; break; + case SPELL_SCHOOL_NATURE: trigger_spell_id = 54375; break; + case SPELL_SCHOOL_FROST: trigger_spell_id = 54372; break; + case SPELL_SCHOOL_SHADOW: trigger_spell_id = 54374; break; + case SPELL_SCHOOL_ARCANE: trigger_spell_id = 54373; break; + default: + return false; + } } - - target = pVictim; break; } - break; + case SPELLFAMILY_PRIEST: + { + // Greater Heal Refund + if (auraSpellInfo->Id==37594) + trigger_spell_id = 37595; + // Blessed Recovery + else if (auraSpellInfo->SpellIconID == 1875) + { + switch (auraSpellInfo->Id) + { + case 27811: trigger_spell_id = 27813; break; + case 27815: trigger_spell_id = 27817; break; + case 27816: trigger_spell_id = 27818; break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id); + return false; + } + basepoints0 = damage * triggerAmount / 100 / 3; + target = this; + } + break; + } + case SPELLFAMILY_DRUID: + { + // Druid Forms Trinket + if (auraSpellInfo->Id==37336) + { + switch(m_form) + { + case FORM_NONE: trigger_spell_id = 37344;break; + case FORM_CAT: trigger_spell_id = 37341;break; + case FORM_BEAR: + case FORM_DIREBEAR: trigger_spell_id = 37340;break; + case FORM_TREE: trigger_spell_id = 37342;break; + case FORM_MOONKIN: trigger_spell_id = 37343;break; + default: + return false; + } + } + //else if (auraSpellInfo->Id==40363)// Entangling Roots () + // trigger_spell_id = ????; + // Leader of the Pack + else if (auraSpellInfo->Id == 24932) + { + if (triggerAmount == 0) + return false; + basepoints0 = triggerAmount * GetMaxHealth() / 100; + trigger_spell_id = 34299; + } + break; + } + case SPELLFAMILY_HUNTER: + break; + case SPELLFAMILY_PALADIN: + { + /* + // Blessed Life + if (auraSpellInfo->SpellIconID == 2137) + { + switch (auraSpellInfo->Id) + { + case 31828: // Rank 1 + case 31829: // Rank 2 + case 31830: // Rank 3 + break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Blessed Life", auraSpellInfo->Id); + return false; + } + } + */ + // Healing Discount + if (auraSpellInfo->Id==37705) + { + trigger_spell_id = 37706; + target = this; + } + // Soul Preserver + if (auraSpellInfo->Id==60510) + { + trigger_spell_id = 60515; + target = this; + } + // Illumination + else if (auraSpellInfo->SpellIconID==241) + { + if(!procSpell) + return false; + // procspell is triggered spell but we need mana cost of original casted spell + uint32 originalSpellId = procSpell->Id; + // Holy Shock + if(procSpell->SpellFamilyFlags & 0x00200000) + { + switch(procSpell->Id) + { + case 25914: originalSpellId = 20473; break; + case 25913: originalSpellId = 20929; break; + case 25903: originalSpellId = 20930; break; + case 27175: originalSpellId = 27174; break; + case 33074: originalSpellId = 33072; break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock",procSpell->Id); + return false; + } + } + SpellEntry const *originalSpell = sSpellStore.LookupEntry(originalSpellId); + if(!originalSpell) + { + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu",originalSpellId); + return false; + } + // percent stored in effect 1 (class scripts) base points + basepoints0 = originalSpell->manaCost*(auraSpellInfo->EffectBasePoints[1]+1)/100; + trigger_spell_id = 20272; + target = this; + } + // Lightning Capacitor + else if (auraSpellInfo->Id==37657) + { + if(!pVictim || !pVictim->isAlive()) + return false; + // stacking + CastSpell(this, 37658, true, NULL, triggeredByAura); + // counting + uint32 count = 0; + AuraList const& dummyAura = GetAurasByType(SPELL_AURA_DUMMY); + for(AuraList::const_iterator itr = dummyAura.begin(); itr != dummyAura.end(); ++itr) + if((*itr)->GetId()==37658) + ++count; + // release at 3 aura in stack (cont contain in basepoint of trigger aura) + if(count < triggerAmount) + return false; + + RemoveAurasDueToSpell(37658); + trigger_spell_id = 37661; + target = pVictim; + } + // Thunder Capacitor + else if (auraSpellInfo->Id == 54841) + { + if(!pVictim || !pVictim->isAlive()) + return false; + // stacking + CastSpell(this, 54842, true, NULL, triggeredByAura); + // counting + uint32 count = 0; + AuraList const& dummyAura = GetAurasByType(SPELL_AURA_DUMMY); + for(AuraList::const_iterator itr = dummyAura.begin(); itr != dummyAura.end(); ++itr) + if((*itr)->GetId()==54842) + ++count; + // release at 3 aura in stack (cont contain in basepoint of trigger aura) + if(count < triggerAmount) + return false; + + RemoveAurasDueToSpell(54842); + trigger_spell_id = 54843; + target = pVictim; + } + break; + } + case SPELLFAMILY_SHAMAN: + { + // Lightning Shield (overwrite non existing triggered spell call in spell.dbc + if(auraSpellInfo->SpellFamilyFlags & 0x0000000000000400) + { + switch(auraSpellInfo->Id) + { + case 324: // Rank 1 + trigger_spell_id = 26364; break; + case 325: // Rank 2 + trigger_spell_id = 26365; break; + case 905: // Rank 3 + trigger_spell_id = 26366; break; + case 945: // Rank 4 + trigger_spell_id = 26367; break; + case 8134: // Rank 5 + trigger_spell_id = 26369; break; + case 10431: // Rank 6 + trigger_spell_id = 26370; break; + case 10432: // Rank 7 + trigger_spell_id = 26363; break; + case 25469: // Rank 8 + trigger_spell_id = 26371; break; + case 25472: // Rank 9 + trigger_spell_id = 26372; break; + case 49280: // Rank 10 + trigger_spell_id = 49278; break; + case 49281: // Rank 11 + trigger_spell_id = 49279; break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in LShield", auraSpellInfo->Id); + return false; + } + } + // Lightning Shield (The Ten Storms set) + else if (auraSpellInfo->Id == 23551) + { + trigger_spell_id = 23552; + target = pVictim; + } + // Damage from Lightning Shield (The Ten Storms set) + else if (auraSpellInfo->Id == 23552) + trigger_spell_id = 27635; + // Mana Surge (The Earthfury set) + else if (auraSpellInfo->Id == 23572) + { + if(!procSpell) + return false; + basepoints0 = procSpell->manaCost * 35 / 100; + trigger_spell_id = 23571; + target = this; + } + // Nature's Guardian + else if (auraSpellInfo->SpellIconID == 2013) + { + // Check health condition - should drop to less 30% (damage deal after this!) + if (!(10*(int32(GetHealth() - damage)) < 3 * GetMaxHealth())) + return false; + + if(pVictim && pVictim->isAlive()) + pVictim->getThreatManager().modifyThreatPercent(this,-10); + + basepoints0 = triggerAmount * GetMaxHealth() / 100; + trigger_spell_id = 31616; + target = this; + } + break; + } + case SPELLFAMILY_DEATHKNIGHT: + { + // Acclimation + if (auraSpellInfo->SpellIconID == 1930) + { + if (!procSpell) + return false; + switch(GetFirstSchoolInMask(GetSpellSchoolMask(procSpell))) + { + case SPELL_SCHOOL_NORMAL: + return false; // ignore + case SPELL_SCHOOL_HOLY: trigger_spell_id = 50490; break; + case SPELL_SCHOOL_FIRE: trigger_spell_id = 50362; break; + case SPELL_SCHOOL_NATURE: trigger_spell_id = 50488; break; + case SPELL_SCHOOL_FROST: trigger_spell_id = 50485; break; + case SPELL_SCHOOL_SHADOW: trigger_spell_id = 50489; break; + case SPELL_SCHOOL_ARCANE: trigger_spell_id = 54373; break; + default: + return false; + } + } + // Blood Presence + else if (auraSpellInfo->Id == 48266) + { + if (GetTypeId() != TYPEID_PLAYER) + return false; + if (!((Player*)this)->isHonorOrXPTarget(pVictim)) + return false; + trigger_spell_id = 50475; + basepoints0 = damage * triggerAmount / 100; + } + break; + } + default: + break; } } - // standard non-dummy case - if(!triggered_spell_id) + // All ok. Check current trigger spell + SpellEntry const* triggerEntry = sSpellStore.LookupEntry(trigger_spell_id); + if ( triggerEntry == NULL ) { - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex()); - return false; - } - - SpellEntry const* triggerEntry = sSpellStore.LookupEntry(triggered_spell_id); - - if(!triggerEntry) - { - sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have not existed EffectTriggered[%d]=%u, not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex(),triggered_spell_id); + // Not cast unknown spell + // sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex()); return false; } // not allow proc extra attack spell at extra attack - if( m_extraAttacks && IsSpellHaveEffect(triggerEntry,SPELL_EFFECT_ADD_EXTRA_ATTACKS) ) + if( m_extraAttacks && IsSpellHaveEffect(triggerEntry, SPELL_EFFECT_ADD_EXTRA_ATTACKS) ) return false; - if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id)) + // Costum requirements (not listed in procEx) Warning! damage dealing after this + // Custom triggered spells + switch (auraSpellInfo->Id) + { + // Persistent Shield (Scarab Brooch trinket) + // This spell originally trigger 13567 - Dummy Trigger (vs dummy efect) + case 26467: + { + basepoints0 = damage * 15 / 100; + target = pVictim; + trigger_spell_id = 26470; + break; + } + // Cheat Death + case 28845: + { + // When your health drops below 20% .... + if (GetHealth() - damage > GetMaxHealth() / 5 || GetHealth() < GetMaxHealth() / 5) + return false; + break; + } + // Deadly Swiftness (Rank 1) + case 31255: + { + // whenever you deal damage to a target who is below 20% health. + if (pVictim->GetHealth() > pVictim->GetMaxHealth() / 5) + return false; + + target = this; + trigger_spell_id = 22588; + } + // Greater Heal Refund (Avatar Raiment set) + case 37594: + { + // Not give if target alredy have full health + if (pVictim->GetHealth() == pVictim->GetMaxHealth()) + return false; + // If your Greater Heal brings the target to full health, you gain $37595s1 mana. + if (pVictim->GetHealth() + damage < pVictim->GetMaxHealth()) + return false; + break; + } + // Bonus Healing (Crystal Spire of Karabor mace) + case 40971: + { + // If your target is below $s1% health + if (pVictim->GetHealth() > pVictim->GetMaxHealth() * triggerAmount / 100) + return false; + break; + } + // Evasive Maneuvers (Commendation of Kael`thas trinket) + case 45057: + { + // reduce you below $s1% health + if (GetHealth() - damage > GetMaxHealth() * triggerAmount / 100) + return false; + break; + } + } + + // Costum basepoints/target for exist spell + // dummy basepoints or other customs + switch(trigger_spell_id) + { + // Cast positive spell on enemy target + case 7099: // Curse of Mending + case 39647: // Curse of Mending + case 29494: // Temptation + case 20233: // Improved Lay on Hands (cast on target) + { + target = pVictim; + break; + } + // Combo points add triggers (need add combopoint only for main tatget, and after possible combopoints reset) + case 15250: // Rogue Setup + { + if(!pVictim || pVictim != getVictim()) // applied only for main target + return false; + break; // continue normal case + } + // Finish movies that add combo + case 14189: // Seal Fate (Netherblade set) + case 14157: // Ruthlessness + { + // Need add combopoint AFTER finish movie (or they dropped in finish phase) + break; + } + // Shamanistic Rage triggered spell + case 30824: + { + basepoints0 = int32(GetTotalAttackPowerValue(BASE_ATTACK) * triggerAmount / 100); + trigger_spell_id = 30824; + break; + } + // Enlightenment (trigger only from mana cost spells) + case 35095: + { + if(!procSpell || procSpell->powerType!=POWER_MANA || procSpell->manaCost==0 && procSpell->ManaCostPercentage==0 && procSpell->manaCostPerlevel==0) + return false; + break; + } + } + + if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id)) return false; + // try detect target manually if not set + if ( target == NULL ) + target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim; + // default case if(!target || target!=this && !target->isAlive()) return false; if(basepoints0) - CastCustomSpell(target,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura); + CastCustomSpell(target,trigger_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura); else - CastSpell(target,triggered_spell_id,true,castItem,triggeredByAura); + CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura); if( cooldown && GetTypeId()==TYPEID_PLAYER ) - ((Player*)this)->AddSpellCooldown(triggered_spell_id,0,time(NULL) + cooldown); + ((Player*)this)->AddSpellCooldown(trigger_spell_id,0,time(NULL) + cooldown); return true; } @@ -6705,7 +6232,7 @@ bool Unit::IsHostileTo(Unit const* unit) const return false; // Sanctuary - if(pTarget->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY) && pTester->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY)) + if(pTarget->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY) && pTester->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY)) return false; // PvP FFA state @@ -6814,7 +6341,7 @@ bool Unit::IsFriendlyTo(Unit const* unit) const return true; // Sanctuary - if(pTarget->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY) && pTester->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY)) + if(pTarget->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY) && pTester->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY)) return true; // PvP FFA state @@ -8010,38 +7537,17 @@ int32 Unit::SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVi bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask, bool useCharges) { - // no charges dependent checks + //If m_immuneToSchool type contain this school type, IMMUNE damage. SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr) if(itr->type & shoolMask) return true; - // charges dependent checks + //If m_immuneToDamage type contain magic, IMMUNE damage. SpellImmuneList const& damageList = m_spellImmune[IMMUNITY_DAMAGE]; for (SpellImmuneList::const_iterator itr = damageList.begin(); itr != damageList.end(); ++itr) - { if(itr->type & shoolMask) - { - if(useCharges) - { - AuraList const& auraDamageImmunity = GetAurasByType(SPELL_AURA_DAMAGE_IMMUNITY); - for(AuraList::const_iterator auraItr = auraDamageImmunity.begin(); auraItr != auraDamageImmunity.end(); ++auraItr) - { - if((*auraItr)->GetId()==itr->spellId) - { - if((*auraItr)->m_procCharges > 0) - { - --(*auraItr)->m_procCharges; - if((*auraItr)->m_procCharges==0) - RemoveAurasDueToSpell(itr->spellId); - } - break; - } - } - } return true; - } - } return false; } @@ -8051,8 +7557,6 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) if (!spellInfo) return false; - // no charges first - //FIX ME this hack: don't get feared if stunned if (spellInfo->Mechanic == MECHANIC_FEAR ) { @@ -8060,7 +7564,6 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) return true; } - // not have spells with charges currently SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL]; for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr) if(itr->type == spellInfo->Dispel) @@ -8069,7 +7572,6 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) if( !(spellInfo->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) && // unaffected by school immunity !(spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)) // can remove immune (by dispell or immune it) { - // not have spells with charges currently SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr) if( !(IsPositiveSpell(itr->spellId) && IsPositiveSpell(spellInfo->Id)) && @@ -8077,30 +7579,11 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) return true; } - // charges dependent checks - SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for(SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) { if(itr->type == spellInfo->Mechanic) { - if(useCharges) - { - AuraList const& auraMechImmunity = GetAurasByType(SPELL_AURA_MECHANIC_IMMUNITY); - for(AuraList::const_iterator auraItr = auraMechImmunity.begin(); auraItr != auraMechImmunity.end(); ++auraItr) - { - if((*auraItr)->GetId()==itr->spellId) - { - if((*auraItr)->m_procCharges > 0) - { - --(*auraItr)->m_procCharges; - if((*auraItr)->m_procCharges==0) - RemoveAurasDueToSpell(itr->spellId); - } - break; - } - } - } return true; } } @@ -8419,7 +7902,7 @@ void Unit::Unmount() if(GetTypeId() == TYPEID_PLAYER && IsInWorld() && ((Player*)this)->GetTemporaryUnsummonedPetNumber() && isAlive()) { Pet* NewPet = new Pet; - if(!NewPet->LoadPetFromDB(this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true)) + if(!NewPet->LoadPetFromDB((Player*)this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true)) delete NewPet; ((Player*)this)->SetTemporaryUnsummonedPetNumber(0); @@ -10072,176 +9555,376 @@ bool Unit::isFrozen() const struct ProcTriggeredData { - ProcTriggeredData(Aura* _triggeredByAura, uint32 _cooldown) - : triggeredByAura(_triggeredByAura), - triggeredByAura_SpellPair(Unit::spellEffectPair(triggeredByAura->GetId(),triggeredByAura->GetEffIndex())), - cooldown(_cooldown) - {} - - Aura* triggeredByAura; // triggred aura, can be invalidate at triggered aura proccessing - Unit::spellEffectPair triggeredByAura_SpellPair; // spell pair, used for re-find aura (by pointer comparison in range) - uint32 cooldown; // possible hidden cooldown + ProcTriggeredData(SpellProcEventEntry const * _spellProcEvent, Aura* _triggeredByAura) + : spellProcEvent(_spellProcEvent), triggeredByAura(_triggeredByAura), + triggeredByAura_SpellPair(Unit::spellEffectPair(triggeredByAura->GetId(),triggeredByAura->GetEffIndex())) + {} + SpellProcEventEntry const *spellProcEvent; + Aura* triggeredByAura; + Unit::spellEffectPair triggeredByAura_SpellPair; }; typedef std::list< ProcTriggeredData > ProcTriggeredList; +typedef std::list< uint32> RemoveSpellList; -void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, AuraTypeSet const& procAuraTypes, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage, SpellSchoolMask damageSchoolMask ) +// List of auras that CAN be trigger but may not exist in spell_proc_event +// in most case need for drop charges +// in some types of aura need do additional check +// for example SPELL_AURA_MECHANIC_IMMUNITY - need check for mechanic +bool InitTriggerAuraData() { - for(AuraTypeSet::const_iterator aur = procAuraTypes.begin(); aur != procAuraTypes.end(); ++aur) + for (int i=0;iblocked) + procEx|=PROC_EX_BLOCK; + // On absorb + if (damageInfo->absorb) + procEx|=PROC_EX_ABSORB; + // On crit + if (damageInfo->HitInfo & SPELL_HIT_TYPE_CRIT) + procEx|=PROC_EX_CRITICAL_HIT; + else + procEx|=PROC_EX_NORMAL_HIT; + } + return procEx; +} + +static int deep = 0; +void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage ) +{ + deep ++; + if (deep > 5) + { + sLog.outError("Prevent possible stack owerflow in Unit::ProcDamageAndSpellFor"); + if (procSpell) + sLog.outError(" Spell %u", procSpell->Id); + deep--; + return; + } + // For melee/ranged based attack need update skills and set some Aura states + if (procFlag & MELEE_BASED_TRIGGER_MASK) + { + // Update skills here for players + if (GetTypeId() == TYPEID_PLAYER) { - next = i; ++next; - - Aura* i_aura = *i; - - uint32 cooldown; // returned at next line - if(!IsTriggeredAtSpellProcEvent(i_aura->GetSpellProto(), procSpell, procFlag,attType,isVictim,cooldown)) - continue; - - procTriggered.push_back( ProcTriggeredData(i_aura, cooldown) ); - } - - // Handle effects proceed this time - for(ProcTriggeredList::iterator i = procTriggered.begin(); i != procTriggered.end(); ++i) - { - // Some auras can be deleted in function called in this loop (except first, ofc) - // Until storing auras in std::multimap to hard check deleting by another way - if(i != procTriggered.begin()) + // On melee based hit/miss/resist need update skill (for victim and attacker) + if (procExtra&(PROC_EX_NORMAL_HIT|PROC_EX_MISS|PROC_EX_RESIST)) { - bool found = false; - AuraMap::const_iterator lower = GetAuras().lower_bound(i->triggeredByAura_SpellPair); - AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair); - for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr) + if (pTarget->GetTypeId() != TYPEID_PLAYER && pTarget->GetCreatureType() != CREATURE_TYPE_CRITTER) + ((Player*)this)->UpdateCombatSkills(pTarget, attType, MELEE_HIT_MISS, isVictim); + } + // Update defence if player is victim and parry/dodge/block + if (isVictim && procExtra&(PROC_EX_DODGE|PROC_EX_PARRY|PROC_EX_BLOCK)) + ((Player*)this)->UpdateDefense(); + } + // If exist crit/parry/dodge/block need update aura state (for victim and attacker) + if (procExtra & (PROC_EX_CRITICAL_HIT|PROC_EX_PARRY|PROC_EX_DODGE|PROC_EX_BLOCK)) + { + // for victim + if (isVictim) + { + // if victim and dodge attack + if (procExtra&PROC_EX_DODGE) { - if(itr->second==i->triggeredByAura) + //Update AURA_STATE on dodge + if (getClass() != CLASS_ROGUE) // skip Rogue Riposte { - found = true; - break; + ModifyAuraState(AURA_STATE_DEFENSE, true); + StartReactiveTimer( REACTIVE_DEFENSE ); } } - - if(!found) + // if victim and parry attack + if (procExtra & PROC_EX_PARRY) { - sLog.outError("Spell aura %u (id:%u effect:%u) has been deleted before call spell proc event handler",*aur,i->triggeredByAura_SpellPair.first,i->triggeredByAura_SpellPair.second); - sLog.outError("It can be deleted one from early processed auras:"); - for(ProcTriggeredList::iterator i2 = procTriggered.begin(); i != i2; ++i2) - sLog.outError(" Spell aura %u (id:%u effect:%u)",*aur,i2->triggeredByAura_SpellPair.first,i2->triggeredByAura_SpellPair.second); - sLog.outError(" "); - continue; - } - } - - /// this is aura triggering code call - Aura* triggeredByAura = i->triggeredByAura; - - /// save charges existence before processing to prevent crash at access to deleted triggered aura after - /// used in speedup code check before check aura existance. - bool triggeredByAuraWithCharges = triggeredByAura->m_procCharges > 0; - - /// success in event proccesing - /// used in speedup code check before check aura existance. - bool casted = false; - - /// process triggered code - switch(*aur) - { - case SPELL_AURA_PROC_TRIGGER_SPELL: - { - sLog.outDebug("ProcDamageAndSpell: casting spell (triggered by %s proc aura of spell %u)", - (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - casted = HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, attType, i->cooldown); - break; - } - case SPELL_AURA_PROC_TRIGGER_DAMAGE: - { - uint32 triggered_damage = triggeredByAura->GetModifier()->m_amount; - sLog.outDebug("ProcDamageAndSpell: doing %u damage (triggered by %s aura of spell %u)", - triggered_damage, (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - SpellNonMeleeDamageLog(pTarget, triggeredByAura->GetId(), triggered_damage, true, true); - casted = true; - break; - } - case SPELL_AURA_DUMMY: - { - uint32 effect = triggeredByAura->GetEffIndex(); - sLog.outDebug("ProcDamageAndSpell: casting spell (triggered by %s dummy aura of spell %u)", - (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - casted = HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag,i->cooldown); - break; - } - case SPELL_AURA_PRAYER_OF_MENDING: - { - sLog.outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", - (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - - casted = HandleMeandingAuraProc(triggeredByAura); - break; - } - case SPELL_AURA_MOD_HASTE: - { - sLog.outDebug("ProcDamageAndSpell: casting spell (triggered by %s haste aura of spell %u)", - (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - casted = HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag,i->cooldown); - break; - } - case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: - { - // nothing do, just charges counter - // but count only in case appropriate school damage - casted = triggeredByAura->GetModifier()->m_miscvalue & damageSchoolMask; - break; - } - case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS: - { - sLog.outDebug("ProcDamageAndSpell: casting spell (triggered by %s class script aura of spell %u)", - (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); - casted = HandleOverrideClassScriptAuraProc(pTarget, triggeredByAura, procSpell,i->cooldown); - break; - } - default: - { - // nothing do, just charges counter - casted = true; - break; - } - } - - /// Update charge (aura can be removed by triggers) - if(casted && triggeredByAuraWithCharges) - { - /// need re-found aura (can be dropped by triggers) - AuraMap::const_iterator lower = GetAuras().lower_bound(i->triggeredByAura_SpellPair); - AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair); - for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr) - { - if(itr->second == triggeredByAura) // pointer still valid + // For Hunters only Counterattack (skip Mongoose bite) + if (getClass() == CLASS_HUNTER) { - if(triggeredByAura->m_procCharges > 0) - triggeredByAura->m_procCharges -= 1; - - triggeredByAura->UpdateAuraCharges(); - break; + ModifyAuraState(AURA_STATE_HUNTER_PARRY, true); + StartReactiveTimer( REACTIVE_HUNTER_PARRY ); + } + else + { + ModifyAuraState(AURA_STATE_DEFENSE, true); + StartReactiveTimer( REACTIVE_DEFENSE ); } } + // if and victim block attack + if (procExtra & PROC_EX_BLOCK) + { + ModifyAuraState(AURA_STATE_DEFENSE,true); + StartReactiveTimer( REACTIVE_DEFENSE ); + } } - } - - /// Safely remove auras with zero charges - for(AuraList::const_iterator i = auras.begin(), next; i != auras.end(); i = next) - { - next = i; ++next; - if((*i)->m_procCharges == 0) + else //For attacker { - RemoveAurasDueToSpell((*i)->GetId()); - next = auras.begin(); + // Overpower on victim dodge + if (procExtra&PROC_EX_DODGE && GetTypeId() == TYPEID_PLAYER && getClass() == CLASS_WARRIOR) + { + ((Player*)this)->AddComboPoints(pTarget, 1); + StartReactiveTimer( REACTIVE_OVERPOWER ); + } + // Enable AURA_STATE_CRIT on crit + if (procExtra & PROC_EX_CRITICAL_HIT) + { + ModifyAuraState(AURA_STATE_CRIT, true); + StartReactiveTimer( REACTIVE_CRIT ); + if(getClass()==CLASS_HUNTER) + { + ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, true); + StartReactiveTimer( REACTIVE_HUNTER_CRIT ); + } + } } } } + + RemoveSpellList removedSpells; + ProcTriggeredList procTriggered; + // Fill procTriggered list + for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr) + { + SpellProcEventEntry const* spellProcEvent = NULL; + if(!IsTriggeredAtSpellProcEvent(itr->second, procSpell, procFlag, procExtra, attType, isVictim, (damage > 0), spellProcEvent)) + continue; + + procTriggered.push_back( ProcTriggeredData(spellProcEvent, itr->second) ); + } + // Handle effects proceed this time + for(ProcTriggeredList::iterator i = procTriggered.begin(); i != procTriggered.end(); ++i) + { + // Some auras can be deleted in function called in this loop (except first, ofc) + // Until storing auars in std::multimap to hard check deleting by another way + if(i != procTriggered.begin()) + { + bool found = false; + AuraMap::const_iterator lower = GetAuras().lower_bound(i->triggeredByAura_SpellPair); + AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair); + for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr) + { + if(itr->second==i->triggeredByAura) + { + found = true; + break; + } + } + if(!found) + { +// sLog.outDebug("Spell aura %u (id:%u effect:%u) has been deleted before call spell proc event handler", i->triggeredByAura->GetModifier()->m_auraname, i->triggeredByAura_SpellPair.first, i->triggeredByAura_SpellPair.second); +// sLog.outDebug("It can be deleted one from early proccesed auras:"); +// for(ProcTriggeredList::iterator i2 = procTriggered.begin(); i != i2; ++i2) +// sLog.outDebug(" Spell aura %u (id:%u effect:%u)", i->triggeredByAura->GetModifier()->m_auraname,i2->triggeredByAura_SpellPair.first,i2->triggeredByAura_SpellPair.second); +// sLog.outDebug(" "); + continue; + } + } + + SpellProcEventEntry const *spellProcEvent = i->spellProcEvent; + Aura *triggeredByAura = i->triggeredByAura; + Modifier *auraModifier = triggeredByAura->GetModifier(); + SpellEntry const *spellInfo = triggeredByAura->GetSpellProto(); + uint32 effIndex = triggeredByAura->GetEffIndex(); + bool useCharges = triggeredByAura->m_procCharges > 0; + // For players set spell cooldown if need + uint32 cooldown = 0; + if (GetTypeId() == TYPEID_PLAYER && spellProcEvent && spellProcEvent->cooldown) + cooldown = spellProcEvent->cooldown; + + switch(auraModifier->m_auraname) + { + case SPELL_AURA_PROC_TRIGGER_SPELL: + { + sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + // Don`t drop charge or add cooldown for not started trigger + if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + continue; + break; + } + case SPELL_AURA_PROC_TRIGGER_DAMAGE: + { + sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", auraModifier->m_amount, spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask); + CalculateSpellDamage(&damageInfo, auraModifier->m_amount, spellInfo); + SendSpellNonMeleeDamageLog(&damageInfo); + DealSpellDamage(&damageInfo, true); + break; + } + case SPELL_AURA_MANA_SHIELD: + case SPELL_AURA_DUMMY: + { + sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + if (!HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + continue; + break; + } + case SPELL_AURA_MOD_HASTE: + { + sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + if (!HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + continue; + break; + } + case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS: + { + sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + if (!HandleOverrideClassScriptAuraProc(pTarget, triggeredByAura, procSpell, cooldown)) + continue; + break; + } + case SPELL_AURA_PRAYER_OF_MENDING: + { + sLog.outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", + (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); + + HandleMeandingAuraProc(triggeredByAura); + break; + } + case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE: + { + sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + + if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + continue; + break; + } + case SPELL_AURA_MOD_STUN: + // Remove by default, but if charge exist drop it + if (triggeredByAura->m_procCharges == 0) + removedSpells.push_back(triggeredByAura->GetId()); + break; + case SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS: + case SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS: + // Hunter's Mark (1-4 Rangs) + if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (spellInfo->SpellFamilyFlags&0x0000000000000400LL)) + { + uint32 basevalue = triggeredByAura->GetBasePoints(); + auraModifier->m_amount += basevalue/10; + if (auraModifier->m_amount > basevalue*4) + auraModifier->m_amount = basevalue*4; + } + break; + case SPELL_AURA_MOD_CASTING_SPEED: + // Skip melee hits or instant cast spells + if (procSpell == NULL || GetSpellCastTime(procSpell) == 0) + continue; + break; + case SPELL_AURA_REFLECT_SPELLS_SCHOOL: + // Skip Melee hits and spells ws wrong school + if (procSpell == NULL || (auraModifier->m_miscvalue & procSpell->SchoolMask) == 0) + continue; + break; + case SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT: + case SPELL_AURA_MOD_POWER_COST_SCHOOL: + // Skip melee hits and spells ws wrong school or zero cost + if (procSpell == NULL || + (procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0) || // Cost check + (auraModifier->m_miscvalue & procSpell->SchoolMask) == 0) // School check + continue; + break; + case SPELL_AURA_MECHANIC_IMMUNITY: + // Compare mechanic + if (procSpell==NULL || procSpell->Mechanic != auraModifier->m_miscvalue) + continue; + break; + case SPELL_AURA_MOD_MECHANIC_RESISTANCE: + // Compare mechanic + if (procSpell==NULL || procSpell->Mechanic != auraModifier->m_miscvalue) + continue; + break; + default: + // nothing do, just charges counter + break; + } + // Remove charge (aura can be removed by triggers) + if(useCharges) + { + // need found aura on drop (can be dropped by triggers) + AuraMap::const_iterator lower = GetAuras().lower_bound(i->triggeredByAura_SpellPair); + AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair); + for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr) + { + if(itr->second == i->triggeredByAura) + { + triggeredByAura->m_procCharges -=1; + triggeredByAura->UpdateAuraCharges(); + if (triggeredByAura->m_procCharges <= 0) + removedSpells.push_back(triggeredByAura->GetId()); + break; + } + } + } + } + if (removedSpells.size()) + { + // Sort spells and remove dublicates + removedSpells.sort(); + removedSpells.unique(); + // Remove auras from removedAuras + for(RemoveSpellList::const_iterator i = removedSpells.begin(); i != removedSpells.end();i++) + RemoveAurasDueToSpell(*i); + } + deep--; } SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const @@ -10838,6 +10521,9 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id) pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id); + if(GetTypeId()==TYPEID_PLAYER) + pet->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + uint32 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel(); pet->SetFreeTalentPoints(pet->GetMaxTalentPointsForLevel(level)); @@ -10857,60 +10543,83 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id) return pet; } -bool Unit::IsTriggeredAtSpellProcEvent(SpellEntry const* spellProto, SpellEntry const* procSpell, uint32 procFlag, WeaponAttackType attType, bool isVictim, uint32& cooldown ) +bool Unit::IsTriggeredAtSpellProcEvent(Aura* aura, SpellEntry const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent ) { - SpellProcEventEntry const * spellProcEvent = spellmgr.GetSpellProcEvent(spellProto->Id); + SpellEntry const* spellProto = aura->GetSpellProto (); - if(!spellProcEvent) - { - // used to prevent spam in log about same non-handled spells - static std::set nonHandledSpellProcSet; + // Get proc Event Entry + spellProcEvent = spellmgr.GetSpellProcEvent(spellProto->Id); - if(spellProto->procFlags != 0 && nonHandledSpellProcSet.find(spellProto->Id)==nonHandledSpellProcSet.end()) - { - sLog.outError("ProcDamageAndSpell: spell %u (%s aura source) not have record in `spell_proc_event`)",spellProto->Id,(isVictim?"a victim's":"an attacker's")); - nonHandledSpellProcSet.insert(spellProto->Id); - } - - // spell.dbc use totally different flags, that only can create problems if used. + // Aura info stored here + Modifier *mod = aura->GetModifier(); + // Skip this auras + if (isNonTriggerAura[mod->m_auraname]) + return false; + // If not trigger by default and spellProcEvent==NULL - skip + if (!isTriggerAura[mod->m_auraname] && spellProcEvent==NULL) + return false; + + // Get EventProcFlag + uint32 EventProcFlag; + if (spellProcEvent && spellProcEvent->procFlags) // if exist get custom spellProcEvent->procFlags + EventProcFlag = spellProcEvent->procFlags; + else + EventProcFlag = spellProto->procFlags; // else get from spell proto + // Continue if no trigger exist + if (!EventProcFlag) return false; - } // Check spellProcEvent data requirements - if(!SpellMgr::IsSpellProcEventCanTriggeredBy(spellProcEvent, procSpell,procFlag)) + if(!SpellMgr::IsSpellProcEventCanTriggeredBy(spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active)) + return false; + + // Aura added by spell can`t trogger from self (prevent drop cahres/do triggers) + // But except periodic triggers (can triggered from self) + if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC)) return false; // Check if current equipment allows aura to proc - if(!isVictim && GetTypeId() == TYPEID_PLAYER ) + if(!isVictim && GetTypeId() == TYPEID_PLAYER) { if(spellProto->EquippedItemClass == ITEM_CLASS_WEAPON) { - Item *item = ((Player*)this)->GetWeaponForAttack(attType,true); + Item *item = NULL; + if(attType == BASE_ATTACK) + item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); + else if (attType == OFF_ATTACK) + item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + else + item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED); - if(!item || !((1<GetProto()->SubClass) & spellProto->EquippedItemSubClassMask)) + if (!((Player*)this)->IsUseEquipedWeapon(attType==BASE_ATTACK)) + return false; + + if(!item || item->IsBroken() || item->GetProto()->Class != ITEM_CLASS_WEAPON || !((1<GetProto()->SubClass) & spellProto->EquippedItemSubClassMask)) return false; } else if(spellProto->EquippedItemClass == ITEM_CLASS_ARMOR) { // Check if player is wearing shield - Item *item = ((Player*)this)->GetShield(true); - if(!item || !((1<GetProto()->SubClass) & spellProto->EquippedItemSubClassMask)) + Item *item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + if(!item || item->IsBroken() || item->GetProto()->Class != ITEM_CLASS_ARMOR || !((1<GetProto()->SubClass) & spellProto->EquippedItemSubClassMask)) return false; } } - + // Get chance from spell float chance = (float)spellProto->procChance; - - if(Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_CHANCE_OF_SUCCESS,chance); - + // If in spellProcEvent exist custom chance, chance = spellProcEvent->customChance; + if(spellProcEvent && spellProcEvent->customChance) + chance = spellProcEvent->customChance; + // If PPM exist calculate chance from PPM if(!isVictim && spellProcEvent && spellProcEvent->ppmRate != 0) { uint32 WeaponSpeed = GetAttackTime(attType); chance = GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate); } + // Apply chance modifer aura + if(Player* modOwner = GetSpellModOwner()) + modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_CHANCE_OF_SUCCESS,chance); - cooldown = spellProcEvent ? spellProcEvent->cooldown : 0; return roll_chance_f(chance); } diff --git a/src/game/Unit.h b/src/game/Unit.h index b447d3b1c..f266130f4 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -596,6 +596,50 @@ struct CleanDamage MeleeHitOutcome hitOutCome; }; +// Struct for use in Unit::CalculateMeleeDamage +// Need create structure like in SMSG_ATTACKERSTATEUPDATE opcode +struct CalcDamageInfo +{ + Unit *attacker; // Attacker + Unit *target; // Target for damage + uint32 damageSchoolMask; + uint32 damage; + uint32 absorb; + uint32 resist; + uint32 blocked_amount; + uint32 HitInfo; + uint32 TargetState; +// Helper + WeaponAttackType attackType; // + uint32 procAttacker; + uint32 procVictim; + uint32 procEx; + uint32 cleanDamage; // Used only fo rage calcultion + MeleeHitOutcome hitOutCome; // TODO: remove this field (need use TargetState) +}; + +// Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode +struct SpellNonMeleeDamage{ + SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, uint32 _schoolMask) : + attacker(_attacker), target(_target), SpellID(_SpellID), damage(0), schoolMask(_schoolMask), + absorb(0), resist(0), phusicalLog(false), unused(false), blocked(0), HitInfo(0), cleanDamage(0) {} + Unit *target; + Unit *attacker; + uint32 SpellID; + uint32 damage; + uint32 schoolMask; + uint32 absorb; + uint32 resist; + bool phusicalLog; + bool unused; + uint32 blocked; + uint32 HitInfo; + // Used for help + uint32 cleanDamage; +}; + +uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition); + struct UnitActionBarEntry { union @@ -711,6 +755,8 @@ enum ReactiveType // delay time next attack to prevent client attack animation problems #define ATTACK_DISPLAY_DELAY 200 +struct SpellProcEventEntry; // used only privately + class MANGOS_DLL_SPEC Unit : public WorldObject { public: @@ -719,7 +765,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject typedef std::multimap< spellEffectPair, Aura*> AuraMap; typedef std::list AuraList; typedef std::list Diminishing; - typedef std::set AuraTypeSet; typedef std::set ComboPointHolderSet; typedef std::map VisibleAuraMap; @@ -868,15 +913,23 @@ class MANGOS_DLL_SPEC Unit : public WorldObject uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } uint32 DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss); - void DealFlatDamage(Unit *pVictim, SpellEntry const *spellInfo, uint32 *damage, CleanDamage *cleanDamage, bool *crit = false, bool isTriggeredSpell = false); - void DoAttackDamage(Unit *pVictim, uint32 *damage, CleanDamage *cleanDamage, uint32 *blocked_amount, SpellSchoolMask damageSchoolMask, uint32 *hitInfo, VictimState *victimState, uint32 *absorbDamage, uint32 *resistDamage, WeaponAttackType attType, SpellEntry const *spellCasted = NULL, bool isTriggeredSpell = false); - void CastMeleeProcDamageAndSpell(Unit* pVictim, uint32 damage, SpellSchoolMask damageSchoolMask, WeaponAttackType attType, MeleeHitOutcome outcome, SpellEntry const *spellCasted = NULL, bool isTriggeredSpell = false); - void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 damage = 0, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NONE, SpellEntry const *procSpell = NULL, bool isTriggeredSpell = false, WeaponAttackType attType = BASE_ATTACK); + void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL); + void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage ); + void HandleEmoteCommand(uint32 anim_id); void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false ); float MeleeMissChanceCalc(const Unit *pVictim, WeaponAttackType attType) const; + + void CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType = BASE_ATTACK); + void DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss); + + void CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType = BASE_ATTACK); + void DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss); + + float MeleeSpellMissChance(Unit *pVictim, WeaponAttackType attType, int32 skillDiff, SpellEntry const *spell); + SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell); SpellMissInfo MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell); SpellMissInfo SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool canReflect = false); @@ -891,7 +944,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject uint32 GetWeaponSkillValue(WeaponAttackType attType, Unit const* target = NULL) const; float GetWeaponProcChance() const; float GetPPMProcChance(uint32 WeaponSpeed, float PPM) const; - MeleeHitOutcome RollPhysicalOutcomeAgainst (const Unit *pVictim, WeaponAttackType attType, SpellEntry const *spellInfo); + MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttackType attType) const; MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance, bool SpellCasted ) const; @@ -965,7 +1018,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void DeMorph(); + void SendAttackStateUpdate(CalcDamageInfo *damageInfo); void SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); + void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log); void SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SpellSchoolMask damageSchoolMask,uint32 AbsorbedDamage, uint32 Resist,bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false); void SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo); @@ -1241,7 +1296,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim); uint32 SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 damage, DamageEffectType damagetype); uint32 SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, Unit *pVictim); - bool isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType); + bool isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAttackType attackType = BASE_ATTACK); + bool isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK); uint32 SpellCriticalBonus(SpellEntry const *spellProto, uint32 damage, Unit *pVictim); void SetLastManaUse(uint32 spellCastTime) { m_lastManaUse = spellCastTime; } @@ -1381,12 +1437,11 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void SendAttackStop(Unit* victim); // only from AttackStop(Unit*) void SendAttackStart(Unit* pVictim); // only from Unit::AttackStart(Unit*) - void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, AuraTypeSet const& procAuraTypes, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage, SpellSchoolMask damageSchoolMask ); - bool IsTriggeredAtSpellProcEvent( SpellEntry const* spellProto, SpellEntry const* procSpell, uint32 procFlag, WeaponAttackType attType, bool isVictim, uint32& cooldown ); - bool HandleDummyAuraProc( Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 cooldown); - bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, WeaponAttackType attType, uint32 cooldown); - bool HandleHasteAuraProc( Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 cooldown); - bool HandleOverrideClassScriptAuraProc(Unit *pVictim, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 cooldown); + bool IsTriggeredAtSpellProcEvent( Aura* aura, SpellEntry const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent ); + bool HandleDummyAuraProc( Unit *pVictim, uint32 damage, Aura* triggredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleHasteAuraProc( Unit *pVictim, uint32 damage, Aura* triggredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleOverrideClassScriptAuraProc(Unit *pVictim, Aura* triggredByAura, SpellEntry const *procSpell, uint32 cooldown); bool HandleMeandingAuraProc(Aura* triggeredByAura); uint32 m_state; // Even derived shouldn't modify diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index 0fb31d75c..b4c5bd095 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -324,6 +324,7 @@ class MANGOS_DLL_SPEC WorldSession void HandleGameObjectUseOpcode(WorldPacket& recPacket); void HandleMeetingStoneInfo(WorldPacket& recPacket); + void HandleGameobjectReportUse(WorldPacket& recvPacket); void HandleNameQueryOpcode(WorldPacket& recvPacket); diff --git a/src/game/tools.cpp b/src/game/tools.cpp deleted file mode 100644 index f5ebde52d..000000000 --- a/src/game/tools.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2005-2008 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 - */ - -#include "Tools.h" - -// THIS CAN BE A LOT FASTER -bool readGUID(WorldPacket & data, uint64& guid) -{ - if(data.rpos()+1 > data.size()) - return false; - - uint8 guidmark=0; - uint8 bit; - uint8 shiftdata=0x1; - uint64 Temp=0; - - guid = 0; - - data >> guidmark; - for(int i=0;i<8;i++) - { - if(guidmark & shiftdata) - { - Temp = 0; - - if(data.rpos()+1 > data.size()) - return false; - - data >> bit; - Temp = bit; - Temp <<= i*8; - guid |= Temp; - } - shiftdata=shiftdata<<1; - } - - return true; -} - -void writeGUID(WorldPacket & data, uint64 & guid) -{ - uint8 RAWmask = 0; - uint8 PackedGuid[8] = {0,0,0,0,0,0,0,0}; - - int j = 1; - uint8 * test = (uint8*)&guid; - - if (*test) - { - PackedGuid[j] = *test; - RAWmask |= 1; - ++j; - } - if (*(test+1)) - { - PackedGuid[j] = *(test+1); - RAWmask |= 2; - ++j; - } - if (*(test+2)) - { - PackedGuid[j] = *(test+2); - RAWmask |= 4; - ++j; - } - if (*(test+3)) - { - PackedGuid[j] = *(test+3); - RAWmask |= 8; - ++j; - } - if (*(test+4)) - { - PackedGuid[j] = *(test+4); - RAWmask |= 16; - ++j; - } - if (*(test+5)) - { - PackedGuid[j] = *(test+5); - RAWmask |= 32; - ++j; - } - if (*(test+6)) - { - PackedGuid[j] = *(test+6); - RAWmask |= 64; - ++j; - } - if (*(test+7)) - { - PackedGuid[j] = *(test+7); - RAWmask |= 128; - ++j; - } - PackedGuid[0] = RAWmask; - - data.append(PackedGuid,j); -} diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h index eff26bfa8..cca7216c8 100644 --- a/src/shared/ByteBuffer.h +++ b/src/shared/ByteBuffer.h @@ -241,6 +241,32 @@ class ByteBuffer _rpos += len; } + bool readPackGUID(uint64& guid) + { + if(rpos()+1 > size()) + return false; + + guid = 0; + + uint8 guidmark=0; + (*this) >> guidmark; + + for(int i=0;i<8;i++) + { + if(guidmark & (uint8(1) << i)) + { + if(rpos()+1 > size()) + return false; + + uint8 bit; + (*this) >> bit; + guid |= (uint64(bit) << (i*8)); + } + } + + return true; + } + const uint8 *contents() const { return &_storage[0]; } size_t size() const { return _storage.size(); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7fc3c4db5..299924ce0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6947" + #define REVISION_NR "6967" #endif // __REVISION_NR_H__ diff --git a/win/VC71/game.vcproj b/win/VC71/game.vcproj index ba5370d3d..b6827360d 100644 --- a/win/VC71/game.vcproj +++ b/win/VC71/game.vcproj @@ -842,12 +842,6 @@ - - - - - - - - - - - -