Guest User

Untitled

a guest
Jun 8th, 2012
1,679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 219.16 KB | None | 0 0
  1. diff --git a/sql/updates/woe/2012_02_15_update.sql b/sql/updates/woe/2012_02_15_update.sql
  2. new file mode 100644
  3. index 0000000..c3518b7
  4. --- /dev/null
  5. +++ b/sql/updates/woe/2012_02_15_update.sql
  6. @@ -0,0 +1,942 @@
  7. +-- Night of the deads
  8. +DELETE FROM spell_script_names WHERE spell_id = 62137;
  9. +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
  10. +(62137, 'spell_dk_avoidance_passive');
  11. +-- Death Knight
  12. +DELETE FROM `spell_script_names` WHERE `spell_id` IN (51996, 54566, 61697, 51906);
  13. +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
  14. +(54566, 'spell_dk_pet_scaling_01'),
  15. +(51996, 'spell_dk_pet_scaling_02'),
  16. +(61697, 'spell_dk_pet_scaling_03'),
  17. +(51906, 'spell_dk_rune_weapon_scaling_02');
  18. +-- Warlock
  19. +DELETE FROM `spell_script_names` WHERE `spell_id` IN (34947, 34956, 34957, 34958, 35695, 61013, 18735, 18730, 18729, 18728, 18727, 30147);
  20. +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
  21. +(34947, 'spell_warl_pet_scaling_01'),
  22. +(34956, 'spell_warl_pet_scaling_02'),
  23. +(34957, 'spell_warl_pet_scaling_03'),
  24. +(34958, 'spell_warl_pet_scaling_04'),
  25. +(61013, 'spell_warl_pet_scaling_05'),
  26. +(35695, 'spell_warl_pet_passive'),
  27. +(18735, 'spell_warl_pet_passive_voidwalker'),
  28. +(30147, 'spell_warl_pet_passive_damage_done'),
  29. +(18730, 'spell_warl_pet_passive_damage_done'),
  30. +(18729, 'spell_warl_pet_passive_damage_done'),
  31. +(18728, 'spell_warl_pet_passive_damage_done'),
  32. +(18727, 'spell_warl_pet_passive_damage_done');
  33. +-- Shaman
  34. +DELETE FROM `spell_script_names` WHERE `spell_id` = 61783;
  35. +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
  36. +(61783, 'spell_sha_pet_scaling_04');
  37. +-- Hunter
  38. +DELETE FROM `spell_script_names` WHERE `spell_id` IN (34902, 34903, 34904, 61017, 19591, 34027, 68361, 8875);
  39. +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
  40. +(34902, 'spell_hun_pet_scaling_01'),
  41. +(34903, 'spell_hun_pet_scaling_02'),
  42. +(34904, 'spell_hun_pet_scaling_03'),
  43. +(61017, 'spell_hun_pet_scaling_04'),
  44. +(19591, 'spell_hun_pet_passive_crit'),
  45. +(68361, 'spell_hun_animal_handler'),
  46. +(8875, 'spell_hun_pet_passive_damage_done'),
  47. +(34027, 'spell_hun_kill_command');
  48. +DELETE FROM spell_pet_auras WHERE spell IN(34453, 34454);
  49. +INSERT INTO `spell_pet_auras` (`spell`, `effectId`, `pet`, `aura`) VALUES
  50. +(34453, 1, 0, 68361),
  51. +(34454, 1, 0, 68361);
  52. +-- Bloodworms
  53. +UPDATE creature_template SET AIName = "" WHERE entry = 28017;
  54. +DELETE FROM creature_template_addon WHERE entry = 28017;
  55. +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
  56. +(28017, 0, 0, 0, 0, 0, '50453');
  57. +-- Succubus
  58. +DELETE FROM spell_bonus_data WHERE entry = 17767;
  59. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  60. +(17767, 0.429, -1, -1, -1, 'Succubus - Lash of Pain');
  61. +-- Voidwalker
  62. +DELETE FROM spell_bonus_data WHERE entry = 17767;
  63. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  64. +(17767, 0, 0, -1, -1, 'Voidwalker - Consume Shadows');
  65. +-- Felhunter
  66. +DELETE FROM spell_bonus_data WHERE entry = 54049;
  67. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  68. +(54049, 0.429, -1, -1, -1, 'Felhunter - Shadow Bite');
  69. +-- Imp
  70. +DELETE FROM spell_bonus_data WHERE entry = 3110;
  71. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  72. +(3110, 0.7142, -1, -1, -1, 'Imp - Firebolt');
  73. +DELETE FROM spell_bonus_data WHERE entry = 2947;
  74. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  75. +(2947, 0, -1, -1, -1, 'Imp - Fire Shield');
  76. +-- Felguard
  77. +DELETE FROM spell_bonus_data WHERE entry = 30213;
  78. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  79. +(30213, 0, -1, 0.1429, -1, 'Felguard - Cleave');
  80. +DELETE FROM spell_bonus_data WHERE entry = 30153;
  81. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  82. +(30153, 0, -1, 0.028, -1, 'Felguard - Intercept');
  83. +-- Inferno
  84. +DELETE FROM creature_template_addon WHERE entry = 89;
  85. +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
  86. +(89, 0, 0, 0, 0, 0, '32233 19483');
  87. +DELETE FROM spell_bonus_data WHERE entry = 20153;
  88. +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
  89. +(20153, 1.35, -1, -1, -1, 'Infernal - Immolation');
  90. +-- pets levelstats from wowwiki
  91. +-- pets rewrite
  92. +ALTER TABLE `pet_levelstats` ADD `mindmg` MEDIUMINT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Min base damage' AFTER `armor` ,
  93. +ADD `maxdmg` MEDIUMINT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Max base damage' AFTER `mindmg`,
  94. +ADD `attackpower` MEDIUMINT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Attack power' AFTER `maxdmg`;
  95. +-- default pet
  96. +SET @ENTRY := 1;
  97. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  98. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  99. +(@ENTRY, 1, 42, 1, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  100. +(@ENTRY, 2, 55, 1, 21, 3, 4, 11, 23, 21, 23, 20, 20),
  101. +(@ENTRY, 3, 71, 1, 46, 3, 6, 12, 24, 21, 24, 20, 21),
  102. +(@ENTRY, 4, 86, 1, 82, 5, 7, 13, 25, 22, 25, 21, 21),
  103. +(@ENTRY, 5, 102, 1, 126, 6, 9, 13, 26, 23, 25, 21, 21),
  104. +(@ENTRY, 6, 120, 1, 180, 7, 11, 14, 27, 24, 26, 21, 22),
  105. +(@ENTRY, 7, 137, 1, 245, 9, 14, 15, 28, 24, 27, 21, 22),
  106. +(@ENTRY, 8, 156, 1, 322, 10, 15, 16, 29, 25, 28, 22, 22),
  107. +(@ENTRY, 9, 176, 1, 412, 11, 16, 17, 30, 26, 29, 22, 23),
  108. +(@ENTRY, 10, 198, 1, 518, 11, 17, 17, 31, 26, 30, 22, 23),
  109. +(@ENTRY, 11, 222, 1, 545, 12, 18, 18, 32, 27, 34, 22, 24),
  110. +(@ENTRY, 12, 247, 1, 580, 13, 19, 19, 33, 28, 38, 23, 25),
  111. +(@ENTRY, 13, 273, 1, 615, 13, 20, 20, 34, 30, 42, 23, 25),
  112. +(@ENTRY, 14, 300, 1, 650, 14, 21, 21, 35, 31, 46, 23, 27),
  113. +(@ENTRY, 15, 328, 1, 685, 15, 23, 22, 37, 32, 51, 24, 28),
  114. +(@ENTRY, 16, 356, 1, 721, 16, 24, 24, 38, 33, 55, 25, 29),
  115. +(@ENTRY, 17, 386, 1, 756, 17, 25, 26, 40, 34, 59, 25, 30),
  116. +(@ENTRY, 18, 417, 1, 791, 18, 27, 27, 42, 36, 63, 25, 30),
  117. +(@ENTRY, 19, 449, 1, 826, 19, 28, 28, 44, 37, 67, 26, 32),
  118. +(@ENTRY, 20, 484, 1, 861, 20, 30, 30, 45, 39, 72, 27, 33),
  119. +(@ENTRY, 21, 521, 1, 897, 21, 31, 32, 47, 39, 76, 27, 34),
  120. +(@ENTRY, 22, 562, 1, 932, 22, 32, 34, 49, 40, 80, 27, 35),
  121. +(@ENTRY, 23, 605, 1, 967, 23, 33, 35, 50, 42, 84, 28, 36),
  122. +(@ENTRY, 24, 651, 1, 1002, 24, 35, 36, 52, 43, 88, 28, 37),
  123. +(@ENTRY, 25, 699, 1, 1037, 25, 36, 37, 53, 45, 94, 29, 39),
  124. +(@ENTRY, 26, 750, 1, 1072, 26, 37, 39, 55, 46, 98, 30, 39),
  125. +(@ENTRY, 27, 800, 1, 1108, 27, 39, 40, 56, 47, 102, 30, 40),
  126. +(@ENTRY, 28, 853, 1, 1142, 28, 40, 42, 58, 49, 106, 30, 41),
  127. +(@ENTRY, 29, 905, 1, 1177, 29, 41, 44, 60, 50, 110, 31, 42),
  128. +(@ENTRY, 30, 955, 1, 1212, 30, 43, 44, 61, 52, 115, 32, 44),
  129. +(@ENTRY, 31, 1006, 1, 1247, 30, 44, 46, 63, 53, 120, 32, 44),
  130. +(@ENTRY, 32, 1057, 1, 1283, 31, 45, 47, 64, 54, 124, 33, 46),
  131. +(@ENTRY, 33, 1110, 1, 1317, 32, 46, 49, 66, 56, 128, 33, 46),
  132. +(@ENTRY, 34, 1163, 1, 1353, 33, 47, 50, 67, 57, 132, 33, 48),
  133. +(@ENTRY, 35, 1220, 1, 1387, 34, 48, 52, 69, 59, 138, 35, 49),
  134. +(@ENTRY, 36, 1277, 1, 1494, 36, 50, 54, 70, 60, 142, 35, 50),
  135. +(@ENTRY, 37, 1336, 1, 1607, 37, 51, 55, 72, 61, 146, 35, 52),
  136. +(@ENTRY, 38, 1395, 1, 1724, 38, 53, 57, 74, 63, 151, 36, 52),
  137. +(@ENTRY, 39, 1459, 1, 1849, 40, 55, 60, 76, 64, 155, 36, 54),
  138. +(@ENTRY, 40, 1524, 1, 1980, 41, 57, 62, 78, 66, 160, 37, 55),
  139. +(@ENTRY, 41, 1585, 1, 2117, 43, 59, 64, 81, 68, 165, 38, 56),
  140. +(@ENTRY, 42, 1651, 1, 2262, 44, 61, 67, 86, 69, 169, 38, 57),
  141. +(@ENTRY, 43, 1716, 1, 2414, 45, 64, 71, 91, 71, 174, 39, 58),
  142. +(@ENTRY, 44, 1782, 1, 2574, 47, 67, 74, 97, 72, 178, 39, 59),
  143. +(@ENTRY, 45, 1848, 1, 2742, 48, 70, 77, 102, 74, 184, 40, 61),
  144. +(@ENTRY, 46, 1919, 1, 2798, 50, 73, 83, 104, 75, 188, 41, 62),
  145. +(@ENTRY, 47, 1990, 1, 2853, 52, 76, 85, 106, 77, 193, 41, 63),
  146. +(@ENTRY, 48, 2062, 1, 2907, 55, 79, 87, 108, 79, 197, 42, 64),
  147. +(@ENTRY, 49, 2138, 1, 2963, 59, 82, 89, 110, 80, 202, 42, 66),
  148. +(@ENTRY, 50, 2215, 1, 3018, 60, 87, 91, 113, 82, 207, 43, 67),
  149. +(@ENTRY, 51, 2292, 1, 3072, 62, 88, 93, 115, 84, 212, 44, 68),
  150. +(@ENTRY, 52, 2371, 1, 3128, 63, 90, 95, 117, 85, 216, 44, 69),
  151. +(@ENTRY, 53, 2453, 1, 3183, 65, 91, 97, 119, 87, 221, 45, 70),
  152. +(@ENTRY, 54, 2533, 1, 3237, 66, 93, 99, 122, 89, 226, 45, 72),
  153. +(@ENTRY, 55, 2614, 1, 3292, 67, 94, 101, 124, 91, 231, 47, 73),
  154. +(@ENTRY, 56, 2699, 1, 3348, 69, 96, 104, 127, 92, 236, 47, 74),
  155. +(@ENTRY, 57, 2784, 1, 3402, 72, 101, 108, 129, 94, 241, 48, 76),
  156. +(@ENTRY, 58, 2871, 1, 3457, 76, 106, 112, 131, 96, 245, 48, 77),
  157. +(@ENTRY, 59, 2961, 1, 3512, 80, 112, 116, 134, 98, 250, 49, 78),
  158. +(@ENTRY, 60, 3052, 1, 3814, 88, 123, 122, 136, 100, 256, 50, 80),
  159. +(@ENTRY, 61, 3144, 1, 4113, 92, 133, 128, 139, 102, 161, 51, 81),
  160. +(@ENTRY, 62, 3237, 1, 4410, 98, 162, 136, 141, 105, 266, 52, 83),
  161. +(@ENTRY, 63, 3331, 1, 4708, 102, 164, 138, 144, 107, 271, 53, 85),
  162. +(@ENTRY, 64, 3425, 1, 5006, 106, 166, 142, 146, 110, 276, 54, 87),
  163. +(@ENTRY, 65, 3524, 1, 5303, 108, 168, 144, 149, 113, 281, 55, 89),
  164. +(@ENTRY, 66, 3624, 1, 5601, 111, 169, 146, 151, 116, 287, 56, 91),
  165. +(@ENTRY, 67, 3728, 1, 5900, 115, 170, 148, 154, 119, 292, 57, 93),
  166. +(@ENTRY, 68, 3834, 1, 6197, 118, 171, 150, 156, 122, 297, 58, 95),
  167. +(@ENTRY, 69, 3941, 1, 6495, 123, 173, 153, 159, 125, 302, 59, 97),
  168. +(@ENTRY, 70, 4051, 1, 6794, 138, 174, 155, 162, 128, 307, 60, 99),
  169. +(@ENTRY, 71, 4162, 1, 7093, 152, 205, 167, 165, 131, 311, 61, 97),
  170. +(@ENTRY, 72, 4273, 1, 7392, 175, 228, 179, 168, 134, 316, 62, 99),
  171. +(@ENTRY, 73, 4384, 1, 7691, 189, 246, 192, 171, 137, 321, 63, 101),
  172. +(@ENTRY, 74, 4495, 1, 7990, 205, 267, 205, 174, 140, 326, 64, 103),
  173. +(@ENTRY, 75, 4606, 1, 8289, 221, 289, 217, 177, 143, 331, 65, 105),
  174. +(@ENTRY, 76, 4717, 1, 8588, 237, 308, 229, 180, 146, 336, 66, 107),
  175. +(@ENTRY, 77, 4828, 1, 8887, 252, 331, 242, 183, 149, 341, 67, 109),
  176. +(@ENTRY, 78, 4939, 1, 9186, 262, 353, 257, 186, 152, 346, 68, 111),
  177. +(@ENTRY, 79, 5050, 1, 9485, 280, 375, 270, 189, 155, 351, 69, 113),
  178. +(@ENTRY, 80, 5161, 1, 9784, 346, 499, 287, 192, 158, 356, 70, 115);
  179. +-- Imp Minion
  180. +SET @ENTRY := 12922;
  181. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  182. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  183. +(@ENTRY, 1, 140, 48, 20, 2, 3, 10, 20, 20, 20, 24, 23),
  184. +(@ENTRY, 2, 149, 59, 20, 3, 4, 11, 21, 20, 20, 25, 24),
  185. +(@ENTRY, 3, 158, 70, 20, 3, 6, 12, 22, 20, 21, 26, 25),
  186. +(@ENTRY, 4, 168, 81, 33, 5, 7, 13, 23, 21, 21, 27, 26),
  187. +(@ENTRY, 5, 177, 92, 49, 6, 9, 13, 23, 21, 22, 28, 27),
  188. +(@ENTRY, 6, 186, 103, 68, 7, 11, 14, 24, 21, 22, 29, 27),
  189. +(@ENTRY, 7, 195, 114, 92, 9, 14, 15, 25, 21, 23, 30, 28),
  190. +(@ENTRY, 8, 204, 125, 117, 10, 15, 16, 26, 21, 23, 31, 29),
  191. +(@ENTRY, 9, 213, 136, 147, 11, 16, 17, 27, 21, 23, 32, 30),
  192. +(@ENTRY, 10, 223, 147, 180, 11, 17, 17, 27, 22, 24, 33, 31),
  193. +(@ENTRY, 11, 232, 158, 190, 12, 18, 18, 28, 22, 24, 37, 35),
  194. +(@ENTRY, 12, 250, 180, 203, 13, 19, 19, 29, 22, 26, 41, 39),
  195. +(@ENTRY, 13, 289, 203, 215, 13, 20, 20, 30, 22, 26, 44, 43),
  196. +(@ENTRY, 14, 299, 227, 228, 14, 21, 21, 31, 22, 28, 50, 47),
  197. +(@ENTRY, 15, 309, 251, 240, 15, 23, 22, 32, 23, 29, 54, 52),
  198. +(@ENTRY, 16, 329, 275, 253, 16, 24, 24, 34, 23, 30, 57, 56),
  199. +(@ENTRY, 17, 350, 300, 265, 17, 25, 26, 36, 23, 31, 61, 60),
  200. +(@ENTRY, 18, 362, 314, 278, 18, 27, 27, 37, 23, 32, 65, 65),
  201. +(@ENTRY, 19, 393, 351, 291, 19, 28, 28, 38, 23, 33, 70, 69),
  202. +(@ENTRY, 20, 403, 377, 303, 20, 30, 30, 40, 24, 35, 74, 74),
  203. +(@ENTRY, 21, 425, 393, 320, 21, 31, 32, 42, 24, 44, 87, 64),
  204. +(@ENTRY, 22, 449, 420, 346, 22, 32, 34, 44, 24, 46, 91, 67),
  205. +(@ENTRY, 23, 473, 447, 360, 23, 33, 35, 45, 24, 47, 95, 69),
  206. +(@ENTRY, 24, 520, 476, 373, 24, 35, 36, 46, 25, 49, 99, 73),
  207. +(@ENTRY, 25, 540, 504, 386, 25, 36, 37, 47, 25, 50, 104, 75),
  208. +(@ENTRY, 26, 569, 534, 399, 26, 37, 39, 49, 25, 51, 107, 78),
  209. +(@ENTRY, 27, 571, 564, 411, 27, 39, 40, 50, 25, 53, 111, 81),
  210. +(@ENTRY, 28, 574, 592, 424, 28, 40, 42, 52, 25, 54, 118, 86),
  211. +(@ENTRY, 29, 576, 620, 436, 29, 41, 44, 54, 26, 56, 122, 89),
  212. +(@ENTRY, 30, 579, 648, 449, 30, 43, 44, 54, 26, 57, 128, 92),
  213. +(@ENTRY, 31, 581, 676, 462, 30, 44, 46, 56, 26, 59, 131, 95),
  214. +(@ENTRY, 32, 590, 720, 476, 31, 45, 47, 57, 26, 61, 136, 98),
  215. +(@ENTRY, 33, 598, 742, 488, 32, 46, 49, 59, 27, 61, 139, 101),
  216. +(@ENTRY, 34, 601, 793, 501, 33, 47, 50, 60, 27, 63, 143, 104),
  217. +(@ENTRY, 35, 609, 845, 513, 34, 48, 52, 64, 19, 62, 66, 107),
  218. +(@ENTRY, 36, 617, 879, 525, 35, 50, 54, 67, 19, 62, 66, 110),
  219. +(@ENTRY, 37, 626, 916, 537, 37, 51, 56, 69, 19, 63, 68, 112),
  220. +(@ENTRY, 38, 634, 952, 549, 38, 53, 58, 70, 19, 63, 68, 115),
  221. +(@ENTRY, 39, 642, 988, 561, 40, 55, 60, 72, 19, 64, 69, 118),
  222. +(@ENTRY, 40, 650, 1026, 639, 41, 57, 62, 74, 20, 64, 156, 142),
  223. +(@ENTRY, 41, 668, 1063, 694, 43, 59, 64, 77, 20, 65, 160, 143),
  224. +(@ENTRY, 42, 676, 1103, 756, 44, 61, 67, 77, 20, 65, 163, 144),
  225. +(@ENTRY, 43, 685, 1187, 808, 46, 64, 71, 87, 20, 66, 167, 145),
  226. +(@ENTRY, 44, 693, 1214, 853, 48, 69, 75, 91, 21, 66, 170, 146),
  227. +(@ENTRY, 45, 701, 1240, 884, 50, 73, 79, 96, 21, 67, 174, 148),
  228. +(@ENTRY, 46, 709, 1267, 910, 52, 77, 83, 93, 30, 66, 175, 144),
  229. +(@ENTRY, 47, 718, 1294, 928, 54, 80, 85, 95, 31, 68, 180, 148),
  230. +(@ENTRY, 48, 726, 1320, 946, 57, 83, 87, 97, 31, 68, 184, 151),
  231. +(@ENTRY, 49, 734, 1347, 964, 60, 86, 89, 99, 31, 70, 188, 155),
  232. +(@ENTRY, 50, 747, 1391, 983, 63, 87, 91, 101, 32, 72, 192, 158),
  233. +(@ENTRY, 51, 750, 1435, 996, 64, 88, 93, 109, 22, 74, 202, 161),
  234. +(@ENTRY, 52, 764, 1481, 1013, 65, 89, 95, 112, 24, 76, 208, 165),
  235. +(@ENTRY, 53, 787, 1527, 1039, 66, 91, 97, 114, 25, 78, 215, 168),
  236. +(@ENTRY, 54, 820, 1573, 1055, 66, 93, 99, 109, 33, 77, 209, 172),
  237. +(@ENTRY, 55, 836, 1620, 1078, 67, 94, 102, 119, 26, 81, 229, 177),
  238. +(@ENTRY, 56, 846, 1666, 1091, 69, 96, 104, 114, 34, 80, 221, 181),
  239. +(@ENTRY, 57, 850, 1714, 1101, 74, 102, 108, 123, 27, 83, 243, 185),
  240. +(@ENTRY, 58, 862, 1763, 1125, 78, 109, 113, 125, 27, 84, 250, 189),
  241. +(@ENTRY, 59, 878, 1824, 1150, 84, 116, 118, 127, 27, 85, 258, 192),
  242. +(@ENTRY, 60, 920, 1898, 1163, 88, 123, 122, 122, 35, 86, 264, 260),
  243. +(@ENTRY, 61, 973, 1925, 1608, 92, 127, 126, 132, 29, 88, 271, 239),
  244. +(@ENTRY, 62, 1050, 1977, 2807, 96, 130, 129, 126, 35, 102, 328, 212),
  245. +(@ENTRY, 63, 1188, 2030, 1732, 100, 136, 131, 137, 32, 92, 285, 244),
  246. +(@ENTRY, 64, 1292, 2084, 1809, 105, 142, 133, 139, 33, 95, 292, 247),
  247. +(@ENTRY, 65, 1335, 2137, 1844, 110, 148, 135, 140, 33, 97, 299, 250),
  248. +(@ENTRY, 66, 1357, 2191, 1872, 115, 154, 137, 141, 33, 97, 306, 255),
  249. +(@ENTRY, 67, 1401, 2244, 1900, 120, 160, 139, 142, 33, 98, 313, 258),
  250. +(@ENTRY, 68, 1429, 2298, 1987, 125, 166, 141, 143, 34, 98, 320, 260),
  251. +(@ENTRY, 69, 1464, 2351, 2008, 130, 170, 143, 144, 36, 100, 327, 262),
  252. +(@ENTRY, 70, 1528, 2568, 2207, 138, 174, 146, 145, 39, 101, 327, 263),
  253. +(@ENTRY, 71, 1580, 2632, 2319, 150, 195, 155, 148, 40, 102, 342, 269),
  254. +(@ENTRY, 72, 1639, 2695, 2431, 160, 210, 165, 150, 41, 104, 351, 274),
  255. +(@ENTRY, 73, 1699, 2763, 2544, 180, 240, 180, 153, 44, 104, 358, 280),
  256. +(@ENTRY, 74, 1761, 2830, 2660, 200, 270, 195, 156, 45, 108, 365, 283),
  257. +(@ENTRY, 75, 1821, 2896, 2760, 220, 310, 210, 159, 46, 109, 373, 288),
  258. +(@ENTRY, 76, 1882, 2964, 2890, 240, 350, 225, 164, 48, 110, 381, 295),
  259. +(@ENTRY, 77, 1949, 3033, 2999, 270, 390, 240, 166, 49, 113, 390, 300),
  260. +(@ENTRY, 78, 2011, 3100, 3110, 290, 420, 255, 168, 50, 114, 397, 308),
  261. +(@ENTRY, 79, 2073, 3167, 3150, 310, 450, 270, 171, 51, 115, 392, 313),
  262. +(@ENTRY, 80, 2129, 3228, 6273, 346, 499, 287, 297, 79, 118, 369, 367);
  263. +-- warlock imp
  264. +SET @ENTRY := 416;
  265. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  266. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  267. +(@ENTRY, 1, 140, 48, 20, 2, 3, 10, 20, 20, 20, 24, 23),
  268. +(@ENTRY, 2, 149, 59, 20, 3, 4, 11, 21, 20, 20, 25, 24),
  269. +(@ENTRY, 3, 158, 70, 20, 3, 6, 12, 22, 20, 21, 26, 25),
  270. +(@ENTRY, 4, 168, 81, 33, 5, 7, 13, 23, 21, 21, 27, 26),
  271. +(@ENTRY, 5, 177, 92, 49, 6, 9, 13, 23, 21, 22, 28, 27),
  272. +(@ENTRY, 6, 186, 103, 68, 7, 11, 14, 24, 21, 22, 29, 27),
  273. +(@ENTRY, 7, 195, 114, 92, 9, 14, 15, 25, 21, 23, 30, 28),
  274. +(@ENTRY, 8, 204, 125, 117, 10, 15, 16, 26, 21, 23, 31, 29),
  275. +(@ENTRY, 9, 213, 136, 147, 11, 16, 17, 27, 21, 23, 32, 30),
  276. +(@ENTRY, 10, 223, 147, 180, 11, 17, 17, 27, 22, 24, 33, 31),
  277. +(@ENTRY, 11, 232, 158, 190, 12, 18, 18, 28, 22, 24, 37, 35),
  278. +(@ENTRY, 12, 250, 180, 203, 13, 19, 19, 29, 22, 26, 41, 39),
  279. +(@ENTRY, 13, 289, 203, 215, 13, 20, 20, 30, 22, 26, 44, 43),
  280. +(@ENTRY, 14, 299, 227, 228, 14, 21, 21, 31, 22, 28, 50, 47),
  281. +(@ENTRY, 15, 309, 251, 240, 15, 23, 22, 32, 23, 29, 54, 52),
  282. +(@ENTRY, 16, 329, 275, 253, 16, 24, 24, 34, 23, 30, 57, 56),
  283. +(@ENTRY, 17, 350, 300, 265, 17, 25, 26, 36, 23, 31, 61, 60),
  284. +(@ENTRY, 18, 362, 314, 278, 18, 27, 27, 37, 23, 32, 65, 65),
  285. +(@ENTRY, 19, 393, 351, 291, 19, 28, 28, 38, 23, 33, 70, 69),
  286. +(@ENTRY, 20, 403, 377, 303, 20, 30, 30, 40, 24, 35, 74, 74),
  287. +(@ENTRY, 21, 425, 393, 320, 21, 31, 32, 42, 24, 44, 87, 64),
  288. +(@ENTRY, 22, 449, 420, 346, 22, 32, 34, 44, 24, 46, 91, 67),
  289. +(@ENTRY, 23, 473, 447, 360, 23, 33, 35, 45, 24, 47, 95, 69),
  290. +(@ENTRY, 24, 520, 476, 373, 24, 35, 36, 46, 25, 49, 99, 73),
  291. +(@ENTRY, 25, 540, 504, 386, 25, 36, 37, 47, 25, 50, 104, 75),
  292. +(@ENTRY, 26, 569, 534, 399, 26, 37, 39, 49, 25, 51, 107, 78),
  293. +(@ENTRY, 27, 571, 564, 411, 27, 39, 40, 50, 25, 53, 111, 81),
  294. +(@ENTRY, 28, 574, 592, 424, 28, 40, 42, 52, 25, 54, 118, 86),
  295. +(@ENTRY, 29, 576, 620, 436, 29, 41, 44, 54, 26, 56, 122, 89),
  296. +(@ENTRY, 30, 579, 648, 449, 30, 43, 44, 54, 26, 57, 128, 92),
  297. +(@ENTRY, 31, 581, 676, 462, 30, 44, 46, 56, 26, 59, 131, 95),
  298. +(@ENTRY, 32, 590, 720, 476, 31, 45, 47, 57, 26, 61, 136, 98),
  299. +(@ENTRY, 33, 598, 742, 488, 32, 46, 49, 59, 27, 61, 139, 101),
  300. +(@ENTRY, 34, 601, 793, 501, 33, 47, 50, 60, 27, 63, 143, 104),
  301. +(@ENTRY, 35, 609, 845, 513, 34, 48, 52, 64, 19, 62, 66, 107),
  302. +(@ENTRY, 36, 617, 879, 525, 35, 50, 54, 67, 19, 62, 66, 110),
  303. +(@ENTRY, 37, 626, 916, 537, 37, 51, 56, 69, 19, 63, 68, 112),
  304. +(@ENTRY, 38, 634, 952, 549, 38, 53, 58, 70, 19, 63, 68, 115),
  305. +(@ENTRY, 39, 642, 988, 561, 40, 55, 60, 72, 19, 64, 69, 118),
  306. +(@ENTRY, 40, 650, 1026, 639, 41, 57, 62, 74, 20, 64, 156, 142),
  307. +(@ENTRY, 41, 668, 1063, 694, 43, 59, 64, 77, 20, 65, 160, 143),
  308. +(@ENTRY, 42, 676, 1103, 756, 44, 61, 67, 77, 20, 65, 163, 144),
  309. +(@ENTRY, 43, 685, 1187, 808, 46, 64, 71, 87, 20, 66, 167, 145),
  310. +(@ENTRY, 44, 693, 1214, 853, 48, 69, 75, 91, 21, 66, 170, 146),
  311. +(@ENTRY, 45, 701, 1240, 884, 50, 73, 79, 96, 21, 67, 174, 148),
  312. +(@ENTRY, 46, 709, 1267, 910, 52, 77, 83, 93, 30, 66, 175, 144),
  313. +(@ENTRY, 47, 718, 1294, 928, 54, 80, 85, 95, 31, 68, 180, 148),
  314. +(@ENTRY, 48, 726, 1320, 946, 57, 83, 87, 97, 31, 68, 184, 151),
  315. +(@ENTRY, 49, 734, 1347, 964, 60, 86, 89, 99, 31, 70, 188, 155),
  316. +(@ENTRY, 50, 747, 1391, 983, 63, 87, 91, 101, 32, 72, 192, 158),
  317. +(@ENTRY, 51, 750, 1435, 996, 64, 88, 93, 109, 22, 74, 202, 161),
  318. +(@ENTRY, 52, 764, 1481, 1013, 65, 89, 95, 112, 24, 76, 208, 165),
  319. +(@ENTRY, 53, 787, 1527, 1039, 66, 91, 97, 114, 25, 78, 215, 168),
  320. +(@ENTRY, 54, 820, 1573, 1055, 66, 93, 99, 109, 33, 77, 209, 172),
  321. +(@ENTRY, 55, 836, 1620, 1078, 67, 94, 102, 119, 26, 81, 229, 177),
  322. +(@ENTRY, 56, 846, 1666, 1091, 69, 96, 104, 114, 34, 80, 221, 181),
  323. +(@ENTRY, 57, 850, 1714, 1101, 74, 102, 108, 123, 27, 83, 243, 185),
  324. +(@ENTRY, 58, 862, 1763, 1125, 78, 109, 113, 125, 27, 84, 250, 189),
  325. +(@ENTRY, 59, 878, 1824, 1150, 84, 116, 118, 127, 27, 85, 258, 192),
  326. +(@ENTRY, 60, 920, 1898, 1163, 88, 123, 122, 122, 35, 86, 264, 260),
  327. +(@ENTRY, 61, 973, 1925, 1608, 92, 127, 126, 132, 29, 88, 271, 239),
  328. +(@ENTRY, 62, 1050, 1977, 2807, 96, 130, 129, 126, 35, 102, 328, 212),
  329. +(@ENTRY, 63, 1188, 2030, 1732, 100, 136, 131, 137, 32, 92, 285, 244),
  330. +(@ENTRY, 64, 1292, 2084, 1809, 105, 142, 133, 139, 33, 95, 292, 247),
  331. +(@ENTRY, 65, 1335, 2137, 1844, 110, 148, 135, 140, 33, 97, 299, 250),
  332. +(@ENTRY, 66, 1357, 2191, 1872, 115, 154, 137, 141, 33, 97, 306, 255),
  333. +(@ENTRY, 67, 1401, 2244, 1900, 120, 160, 139, 142, 33, 98, 313, 258),
  334. +(@ENTRY, 68, 1429, 2298, 1987, 125, 166, 141, 143, 34, 98, 320, 260),
  335. +(@ENTRY, 69, 1464, 2351, 2008, 130, 170, 143, 144, 36, 100, 327, 262),
  336. +(@ENTRY, 70, 1528, 2568, 2207, 138, 174, 146, 145, 39, 101, 327, 263),
  337. +(@ENTRY, 71, 1580, 2632, 2319, 150, 195, 155, 148, 40, 102, 342, 269),
  338. +(@ENTRY, 72, 1639, 2695, 2431, 160, 210, 165, 150, 41, 104, 351, 274),
  339. +(@ENTRY, 73, 1699, 2763, 2544, 180, 240, 180, 153, 44, 104, 358, 280),
  340. +(@ENTRY, 74, 1761, 2830, 2660, 200, 270, 195, 156, 45, 108, 365, 283),
  341. +(@ENTRY, 75, 1821, 2896, 2760, 220, 310, 210, 159, 46, 109, 373, 288),
  342. +(@ENTRY, 76, 1882, 2964, 2890, 240, 350, 225, 164, 48, 110, 381, 295),
  343. +(@ENTRY, 77, 1949, 3033, 2999, 270, 390, 240, 166, 49, 113, 390, 300),
  344. +(@ENTRY, 78, 2011, 3100, 3110, 290, 420, 255, 168, 50, 114, 397, 308),
  345. +(@ENTRY, 79, 2073, 3167, 3150, 310, 450, 270, 171, 51, 115, 392, 313),
  346. +(@ENTRY, 80, 2129, 3228, 6273, 346, 499, 287, 297, 79, 118, 369, 367);
  347. +-- warlock voidwalker
  348. +SET @ENTRY := 1860;
  349. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  350. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  351. +(@ENTRY, 1, 40, 48, 831, 13, 19, 38, 29, 10, 29, 25, 27),
  352. +(@ENTRY, 2, 49, 59, 40, 13, 19, 38, 14, 15, 2, 1, 27),
  353. +(@ENTRY, 3, 58, 70, 60, 13, 19, 38, 15, 16, 4, 1, 27),
  354. +(@ENTRY, 4, 68, 81, 80, 13, 19, 38, 17, 17, 8, 2, 27),
  355. +(@ENTRY, 5, 77, 92, 100, 13, 19, 38, 18, 18, 12, 2, 27),
  356. +(@ENTRY, 6, 86, 103, 120, 13, 19, 38, 20, 19, 16, 3, 27),
  357. +(@ENTRY, 7, 95, 114, 140, 13, 19, 38, 22, 20, 21, 3, 27),
  358. +(@ENTRY, 8, 104, 125, 160, 13, 19, 38, 23, 21, 25, 4, 27),
  359. +(@ENTRY, 9, 113, 136, 180, 13, 19, 38, 25, 22, 27, 4, 27),
  360. +(@ENTRY, 10, 260, 147, 831, 13, 19, 38, 29, 10, 29, 25, 27),
  361. +(@ENTRY, 11, 291, 158, 875, 14, 20, 40, 30, 10, 32, 26, 28),
  362. +(@ENTRY, 12, 322, 180, 782, 7, 10, 42, 31, 26, 36, 24, 31),
  363. +(@ENTRY, 13, 354, 203, 827, 7, 11, 44, 32, 28, 43, 26, 32),
  364. +(@ENTRY, 14, 368, 227, 878, 7, 11, 46, 33, 28, 44, 25, 35),
  365. +(@ENTRY, 15, 421, 251, 925, 8, 12, 48, 34, 30, 48, 26, 37),
  366. +(@ENTRY, 16, 455, 275, 975, 9, 13, 52, 36, 30, 52, 27, 39),
  367. +(@ENTRY, 17, 490, 300, 1022, 9, 13, 56, 38, 31, 55, 28, 42),
  368. +(@ENTRY, 18, 528, 314, 1068, 10, 14, 58, 39, 33, 59, 28, 44),
  369. +(@ENTRY, 19, 566, 351, 1120, 10, 15, 60, 40, 33, 63, 30, 46),
  370. +(@ENTRY, 20, 606, 377, 1165, 11, 16, 64, 42, 35, 67, 31, 49),
  371. +(@ENTRY, 21, 653, 393, 1232, 19, 27, 68, 44, 36, 80, 53, 39),
  372. +(@ENTRY, 22, 699, 420, 1282, 20, 28, 72, 46, 36, 84, 54, 41),
  373. +(@ENTRY, 23, 746, 447, 1330, 21, 29, 74, 47, 38, 89, 56, 42),
  374. +(@ENTRY, 24, 823, 476, 1378, 22, 30, 78, 49, 39, 93, 57, 43),
  375. +(@ENTRY, 25, 854, 504, 1427, 23, 31, 80, 50, 40, 97, 60, 44),
  376. +(@ENTRY, 26, 911, 534, 1474, 24, 32, 84, 52, 41, 101, 62, 46),
  377. +(@ENTRY, 27, 968, 564, 1524, 24, 34, 86, 53, 42, 105, 63, 47),
  378. +(@ENTRY, 28, 1035, 592, 1572, 25, 35, 90, 55, 43, 110, 65, 48),
  379. +(@ENTRY, 29, 1127, 620, 1619, 26, 36, 94, 57, 44, 114, 67, 49),
  380. +(@ENTRY, 30, 1215, 648, 1667, 27, 37, 94, 57, 46, 118, 69, 51),
  381. +(@ENTRY, 31, 1292, 676, 1715, 28, 38, 98, 59, 47, 123, 71, 52),
  382. +(@ENTRY, 32, 1386, 720, 1766, 29, 39, 100, 60, 47, 127, 73, 53),
  383. +(@ENTRY, 33, 1457, 742, 1812, 29, 40, 104, 62, 49, 131, 74, 54),
  384. +(@ENTRY, 34, 1574, 793, 1861, 30, 41, 106, 63, 50, 135, 76, 56),
  385. +(@ENTRY, 35, 1690, 845, 2238, 49, 65, 110, 65, 21, 146, 62, 57),
  386. +(@ENTRY, 36, 1760, 879, 2415, 50, 67, 112, 66, 21, 150, 63, 59),
  387. +(@ENTRY, 37, 1830, 916, 2602, 51, 70, 116, 68, 21, 155, 64, 60),
  388. +(@ENTRY, 38, 1924, 952, 2795, 53, 71, 120, 70, 22, 159, 66, 62),
  389. +(@ENTRY, 39, 1974, 988, 3002, 54, 74, 124, 72, 22, 164, 67, 63),
  390. +(@ENTRY, 40, 2052, 1026, 3219, 56, 76, 128, 74, 23, 170, 70, 65),
  391. +(@ENTRY, 41, 2135, 1063, 2826, 57, 60, 135, 77, 58, 152, 51, 66),
  392. +(@ENTRY, 42, 2215, 1103, 3034, 40, 54, 142, 81, 59, 156, 70, 67),
  393. +(@ENTRY, 43, 2260, 1187, 3228, 43, 57, 152, 86, 61, 169, 72, 69),
  394. +(@ENTRY, 44, 2290, 1214, 3463, 44, 58, 160, 91, 61, 164, 54, 71),
  395. +(@ENTRY, 45, 2303, 1240, 3620, 45, 59, 168, 96, 64, 169, 55, 72),
  396. +(@ENTRY, 46, 2349, 1267, 3722, 46, 60, 176, 98, 65, 173, 77, 73),
  397. +(@ENTRY, 47, 2358, 1294, 3796, 48, 65, 180, 100, 66, 177, 78, 75),
  398. +(@ENTRY, 48, 2436, 1320, 3868, 52, 70, 184, 102, 68, 181, 80, 76),
  399. +(@ENTRY, 49, 2474, 1347, 3943, 56, 75, 188, 104, 69, 186, 82, 78),
  400. +(@ENTRY, 50, 2527, 1391, 4013, 60, 79, 193, 107, 71, 190, 84, 80),
  401. +(@ENTRY, 51, 2560, 1435, 4068, 60, 80, 196, 109, 72, 194, 60, 127),
  402. +(@ENTRY, 52, 2661, 1481, 4136, 60, 80, 200, 112, 74, 198, 62, 128),
  403. +(@ENTRY, 53, 2757, 1527, 4207, 61, 81, 205, 114, 75, 203, 63, 131),
  404. +(@ENTRY, 54, 2840, 1573, 4307, 61, 81, 210, 115, 76, 207, 90, 85),
  405. +(@ENTRY, 55, 2876, 1620, 4362, 80, 85, 216, 119, 79, 211, 65, 135),
  406. +(@ENTRY, 56, 3006, 1666, 4428, 100, 90, 225, 121, 80, 215, 66, 139),
  407. +(@ENTRY, 57, 3110, 1714, 4500, 120, 95, 230, 123, 81, 220, 67, 142),
  408. +(@ENTRY, 58, 3222, 1763, 4579, 140, 110, 232, 125, 82, 224, 68, 144),
  409. +(@ENTRY, 59, 3318, 1824, 4673, 160, 140, 234, 127, 83, 230, 69, 147),
  410. +(@ENTRY, 60, 3419, 1874, 4745, 170, 170, 238, 129, 85, 249, 70, 150),
  411. +(@ENTRY, 61, 3522, 1925, 5196, 180, 200, 242, 132, 89, 251, 78, 153),
  412. +(@ENTRY, 62, 3627, 1977, 7223, 190, 263, 246, 133, 36, 279, 124, 102),
  413. +(@ENTRY, 63, 3726, 2030, 6104, 200, 280, 251, 137, 93, 255, 93, 160),
  414. +(@ENTRY, 64, 3830, 2184, 6561, 205, 295, 256, 139, 95, 259, 102, 164),
  415. +(@ENTRY, 65, 3934, 2237, 7020, 210, 310, 261, 142, 97, 264, 119, 167),
  416. +(@ENTRY, 66, 4145, 2391, 7481, 215, 325, 266, 144, 99, 268, 122, 168),
  417. +(@ENTRY, 67, 4321, 2444, 7944, 220, 340, 271, 146, 101, 272, 124, 170),
  418. +(@ENTRY, 68, 4529, 2598, 8409, 225, 355, 276, 148, 104, 276, 127, 175),
  419. +(@ENTRY, 69, 4764, 2751, 8876, 230, 370, 281, 151, 106, 278, 130, 185),
  420. +(@ENTRY, 70, 4860, 2885, 9070, 240, 380, 286, 153, 109, 280, 133, 122),
  421. +(@ENTRY, 71, 5010, 2992, 9484, 250, 390, 300, 155, 112, 283, 137, 194),
  422. +(@ENTRY, 72, 5161, 3100, 9861, 260, 400, 320, 157, 114, 286, 141, 197),
  423. +(@ENTRY, 73, 5313, 3208, 10231, 270, 410, 340, 159, 116, 289, 145, 201),
  424. +(@ENTRY, 74, 5466, 3317, 10603, 280, 415, 370, 163, 120, 293, 151, 205),
  425. +(@ENTRY, 75, 5620, 3426, 10983, 290, 420, 390, 165, 123, 296, 156, 214),
  426. +(@ENTRY, 76, 5775, 3535, 14155, 303, 430, 408, 214, 67, 309, 143, 196),
  427. +(@ENTRY, 77, 5930, 3645, 14652, 315, 446, 452, 236, 72, 314, 144, 200),
  428. +(@ENTRY, 78, 6086, 3758, 12125, 325, 460, 500, 172, 129, 306, 172, 226),
  429. +(@ENTRY, 79, 6243, 3874, 12508, 340, 480, 550, 174, 131, 310, 178, 231),
  430. +(@ENTRY, 80, 6401, 3997, 16148, 358, 501, 608, 314, 140, 328, 185, 239);
  431. +-- warlock succubus
  432. +SET @ENTRY := 1863;
  433. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  434. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  435. +(@ENTRY, 1, 40, 48, 563, 29, 39, 64, 42, 35, 67, 31, 49),
  436. +(@ENTRY, 2, 49, 59, 40, 29, 39, 64, 14, 15, 2, 1, 26),
  437. +(@ENTRY, 3, 58, 70, 60, 29, 39, 64, 15, 16, 4, 1, 27),
  438. +(@ENTRY, 4, 68, 81, 80, 29, 39, 64, 17, 17, 8, 2, 27),
  439. +(@ENTRY, 5, 77, 92, 100, 29, 39, 64, 18, 18, 12, 2, 28),
  440. +(@ENTRY, 6, 86, 103, 120, 29, 39, 64, 20, 19, 16, 3, 29),
  441. +(@ENTRY, 7, 95, 114, 140, 29, 39, 64, 22, 20, 21, 3, 29),
  442. +(@ENTRY, 8, 104, 125, 160, 29, 39, 64, 23, 21, 25, 4, 30),
  443. +(@ENTRY, 9, 113, 136, 180, 29, 39, 64, 25, 22, 29, 4, 31),
  444. +(@ENTRY, 10, 123, 147, 200, 29, 39, 64, 26, 23, 33, 5, 31),
  445. +(@ENTRY, 11, 132, 158, 220, 29, 39, 64, 28, 25, 38, 6, 32),
  446. +(@ENTRY, 12, 150, 180, 240, 29, 39, 64, 29, 26, 42, 8, 33),
  447. +(@ENTRY, 13, 169, 203, 280, 29, 39, 64, 31, 27, 46, 9, 34),
  448. +(@ENTRY, 14, 189, 227, 320, 29, 39, 64, 33, 28, 50, 11, 35),
  449. +(@ENTRY, 15, 209, 251, 360, 29, 39, 64, 34, 29, 55, 14, 35),
  450. +(@ENTRY, 16, 229, 275, 400, 29, 39, 64, 36, 30, 59, 16, 36),
  451. +(@ENTRY, 17, 250, 300, 460, 29, 39, 64, 37, 31, 63, 20, 37),
  452. +(@ENTRY, 18, 262, 314, 510, 29, 39, 64, 39, 32, 67, 24, 38),
  453. +(@ENTRY, 19, 293, 351, 550, 29, 39, 64, 40, 33, 72, 29, 39),
  454. +(@ENTRY, 20, 303, 377, 563, 29, 39, 64, 42, 35, 67, 31, 49),
  455. +(@ENTRY, 21, 325, 393, 604, 29, 40, 68, 44, 36, 80, 53, 39),
  456. +(@ENTRY, 22, 349, 420, 628, 31, 42, 72, 46, 36, 84, 54, 41),
  457. +(@ENTRY, 23, 373, 447, 652, 32, 43, 74, 47, 38, 89, 56, 42),
  458. +(@ENTRY, 24, 400, 476, 675, 33, 45, 78, 49, 39, 93, 57, 43),
  459. +(@ENTRY, 25, 440, 504, 699, 34, 47, 80, 50, 40, 97, 60, 44),
  460. +(@ENTRY, 26, 469, 534, 721, 36, 48, 84, 52, 41, 101, 62, 46),
  461. +(@ENTRY, 27, 501, 564, 745, 37, 50, 86, 53, 42, 105, 63, 47),
  462. +(@ENTRY, 28, 534, 592, 768, 38, 52, 90, 55, 43, 110, 65, 48),
  463. +(@ENTRY, 29, 566, 620, 791, 40, 54, 94, 57, 44, 114, 67, 49),
  464. +(@ENTRY, 30, 599, 648, 815, 41, 56, 94, 57, 46, 118, 69, 51),
  465. +(@ENTRY, 31, 631, 676, 838, 42, 57, 98, 59, 47, 123, 71, 52),
  466. +(@ENTRY, 32, 680, 720, 862, 43, 59, 100, 60, 47, 127, 73, 53),
  467. +(@ENTRY, 33, 728, 742, 884, 44, 60, 104, 62, 49, 131, 74, 54),
  468. +(@ENTRY, 34, 661, 793, 908, 46, 62, 106, 63, 50, 135, 76, 56),
  469. +(@ENTRY, 35, 699, 845, 950, 45, 66, 110, 63, 51, 136, 73, 57),
  470. +(@ENTRY, 36, 737, 879, 990, 47, 70, 113, 67, 52, 137, 72, 58),
  471. +(@ENTRY, 37, 776, 916, 1038, 50, 74, 117, 69, 53, 138, 70, 59),
  472. +(@ENTRY, 38, 814, 952, 1095, 53, 78, 120, 70, 55, 139, 0, 91),
  473. +(@ENTRY, 39, 852, 988, 1163, 56, 81, 125, 72, 56, 142, 68, 62),
  474. +(@ENTRY, 40, 890, 1026, 1244, 59, 84, 130, 74, 57, 147, 67, 64),
  475. +(@ENTRY, 41, 928, 1063, 1338, 63, 86, 135, 77, 58, 152, 68, 66),
  476. +(@ENTRY, 42, 976, 1103, 1448, 66, 89, 142, 81, 59, 156, 70, 67),
  477. +(@ENTRY, 43, 1005, 1187, 1560, 69, 93, 0, 87, 60, 160, 72, 69),
  478. +(@ENTRY, 44, 1043, 1214, 1670, 72, 98, 0, 91, 61, 164, 74, 71),
  479. +(@ENTRY, 45, 1081, 1240, 1738, 76, 104, 0, 96, 64, 169, 75, 72),
  480. +(@ENTRY, 46, 1119, 1267, 1773, 79, 110, 176, 98, 65, 173, 77, 73),
  481. +(@ENTRY, 47, 1158, 1294, 1808, 82, 114, 180, 100, 66, 177, 78, 75),
  482. +(@ENTRY, 48, 1196, 1320, 1843, 84, 118, 184, 102, 68, 181, 80, 76),
  483. +(@ENTRY, 49, 1234, 1347, 1878, 88, 120, 188, 104, 69, 186, 82, 78),
  484. +(@ENTRY, 50, 1277, 1391, 1912, 94, 124, 194, 107, 71, 190, 84, 80),
  485. +(@ENTRY, 51, 1320, 1435, 1945, 97, 144, 200, 109, 72, 194, 86, 81),
  486. +(@ENTRY, 52, 1364, 1481, 1984, 107, 158, 204, 112, 74, 198, 88, 83),
  487. +(@ENTRY, 53, 1407, 1527, 2020, 117, 164, 210, 114, 75, 203, 90, 85),
  488. +(@ENTRY, 54, 1450, 1573, 2056, 127, 172, 216, 116, 77, 207, 92, 87),
  489. +(@ENTRY, 55, 1493, 1620, 2089, 137, 180, 220, 119, 79, 211, 94, 88),
  490. +(@ENTRY, 56, 1536, 1666, 2113, 147, 190, 224, 121, 80, 215, 96, 90),
  491. +(@ENTRY, 57, 1580, 1714, 2156, 157, 210, 228, 123, 82, 220, 99, 92),
  492. +(@ENTRY, 58, 1623, 1763, 2189, 167, 230, 232, 125, 84, 224, 101, 94),
  493. +(@ENTRY, 59, 1666, 1824, 2230, 177, 250, 236, 128, 86, 228, 103, 96),
  494. +(@ENTRY, 60, 1709, 1874, 2261, 187, 270, 240, 130, 87, 232, 106, 98),
  495. +(@ENTRY, 61, 1754, 1925, 2300, 207, 290, 243, 132, 89, 237, 108, 101),
  496. +(@ENTRY, 62, 1800, 1977, 4340, 229, 319, 246, 133, 36, 279, 124, 102),
  497. +(@ENTRY, 63, 1845, 2030, 2440, 239, 329, 266, 137, 93, 245, 113, 105),
  498. +(@ENTRY, 64, 1891, 2084, 2550, 249, 344, 286, 139, 95, 249, 116, 107),
  499. +(@ENTRY, 65, 1936, 2137, 2700, 259, 360, 306, 142, 97, 254, 119, 109),
  500. +(@ENTRY, 66, 1982, 2191, 2910, 269, 375, 336, 144, 99, 258, 122, 112),
  501. +(@ENTRY, 67, 2027, 2244, 3150, 279, 390, 366, 146, 101, 262, 124, 114),
  502. +(@ENTRY, 68, 2073, 2298, 3450, 289, 405, 396, 148, 104, 266, 127, 117),
  503. +(@ENTRY, 69, 2118, 2351, 3800, 299, 430, 436, 151, 106, 271, 130, 119),
  504. +(@ENTRY, 70, 2164, 2405, 4293, 321, 462, 486, 153, 108, 280, 133, 122),
  505. +(@ENTRY, 71, 2211, 2460, 4479, 333, 475, 506, 155, 110, 284, 136, 124),
  506. +(@ENTRY, 72, 2259, 2516, 4666, 343, 490, 516, 157, 111, 288, 139, 125),
  507. +(@ENTRY, 73, 2308, 2573, 4854, 353, 510, 526, 159, 113, 293, 143, 127),
  508. +(@ENTRY, 74, 2358, 2631, 5042, 363, 525, 536, 161, 115, 298, 147, 131),
  509. +(@ENTRY, 75, 2409, 2660, 5231, 373, 540, 546, 164, 118, 303, 150, 134),
  510. +(@ENTRY, 76, 2461, 2735, 5421, 385, 550, 556, 167, 120, 309, 154, 137),
  511. +(@ENTRY, 77, 2512, 2793, 5612, 400, 570, 566, 170, 122, 314, 156, 141),
  512. +(@ENTRY, 78, 2562, 2852, 5804, 420, 590, 576, 172, 124, 319, 158, 143),
  513. +(@ENTRY, 79, 2612, 2911, 5997, 440, 610, 586, 175, 127, 324, 160, 147),
  514. +(@ENTRY, 80, 2665, 2989, 9706, 461, 635, 608, 314, 129, 328, 170, 209);
  515. +-- warlock felhunter
  516. +SET @ENTRY := 417;
  517. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  518. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  519. +(@ENTRY, 1, 60, 48, 834, 31, 42, 94, 57, 46, 118, 69, 51),
  520. +(@ENTRY, 2, 73, 59, 168, 31, 42, 94, 12, 18, 14, 13, 23),
  521. +(@ENTRY, 3, 87, 70, 191, 31, 42, 94, 14, 19, 17, 15, 24),
  522. +(@ENTRY, 4, 101, 81, 215, 31, 42, 94, 15, 20, 19, 17, 25),
  523. +(@ENTRY, 5, 115, 92, 239, 31, 42, 94, 17, 21, 22, 19, 26),
  524. +(@ENTRY, 6, 129, 103, 263, 31, 42, 94, 19, 22, 24, 21, 27),
  525. +(@ENTRY, 7, 152, 114, 287, 31, 42, 94, 20, 23, 27, 23, 28),
  526. +(@ENTRY, 8, 156, 125, 310, 31, 42, 94, 22, 24, 29, 25, 29),
  527. +(@ENTRY, 9, 170, 136, 334, 31, 42, 94, 23, 25, 32, 27, 30),
  528. +(@ENTRY, 10, 184, 147, 358, 31, 42, 94, 25, 26, 34, 29, 31),
  529. +(@ENTRY, 11, 198, 158, 382, 31, 42, 94, 27, 27, 37, 31, 32),
  530. +(@ENTRY, 12, 225, 180, 406, 31, 42, 94, 28, 28, 41, 33, 33),
  531. +(@ENTRY, 13, 254, 203, 429, 31, 42, 94, 30, 29, 45, 35, 34),
  532. +(@ENTRY, 14, 284, 227, 453, 31, 42, 94, 31, 30, 50, 37, 35),
  533. +(@ENTRY, 15, 313, 251, 477, 31, 42, 94, 33, 31, 54, 39, 36),
  534. +(@ENTRY, 16, 343, 275, 501, 31, 42, 94, 35, 32, 58, 41, 37),
  535. +(@ENTRY, 17, 375, 300, 525, 31, 42, 94, 36, 33, 62, 43, 38),
  536. +(@ENTRY, 18, 392, 314, 548, 31, 42, 94, 38, 34, 67, 45, 39),
  537. +(@ENTRY, 19, 438, 351, 572, 31, 42, 94, 39, 35, 71, 47, 40),
  538. +(@ENTRY, 20, 471, 377, 596, 31, 42, 94, 41, 36, 75, 49, 41),
  539. +(@ENTRY, 21, 500, 400, 620, 31, 42, 94, 43, 37, 80, 51, 42),
  540. +(@ENTRY, 22, 528, 423, 644, 31, 42, 94, 44, 38, 84, 53, 43),
  541. +(@ENTRY, 23, 558, 447, 667, 31, 42, 94, 46, 39, 88, 55, 44),
  542. +(@ENTRY, 24, 595, 476, 691, 31, 42, 94, 47, 40, 93, 57, 45),
  543. +(@ENTRY, 25, 630, 504, 715, 31, 42, 94, 49, 41, 97, 59, 46),
  544. +(@ENTRY, 26, 678, 543, 739, 31, 42, 94, 51, 42, 101, 61, 47),
  545. +(@ENTRY, 27, 705, 564, 763, 31, 42, 94, 52, 43, 105, 63, 48),
  546. +(@ENTRY, 28, 740, 592, 786, 31, 42, 94, 54, 44, 110, 65, 49),
  547. +(@ENTRY, 29, 775, 620, 810, 31, 42, 94, 55, 45, 114, 67, 50),
  548. +(@ENTRY, 30, 800, 648, 834, 31, 42, 94, 57, 46, 118, 69, 51),
  549. +(@ENTRY, 31, 856, 676, 857, 32, 43, 98, 59, 47, 123, 71, 52),
  550. +(@ENTRY, 32, 921, 720, 882, 33, 45, 100, 60, 47, 127, 73, 53),
  551. +(@ENTRY, 33, 987, 742, 905, 34, 46, 104, 62, 49, 131, 74, 54),
  552. +(@ENTRY, 34, 1047, 793, 929, 35, 47, 106, 63, 50, 135, 76, 56),
  553. +(@ENTRY, 35, 1107, 845, 953, , 0, 0, 65, 52, 137, 73, 57),
  554. +(@ENTRY, 36, 1167, 879, 977, 0, 0, 0, 67, 53, 138, 72, 58),
  555. +(@ENTRY, 37, 1227, 916, 1001, 0, 0, 0, 68, 54, 138, 70, 60),
  556. +(@ENTRY, 38, 1288, 952, 1024, 0, 0, 0, 70, 55, 139, 69, 61),
  557. +(@ENTRY, 39, 1348, 988, 1048, 0, 0, 0, 71, 56, 142, 68, 62),
  558. +(@ENTRY, 40, 1408, 1026, 1250, 0, 0, 0, 73, 57, 146, 67, 64),
  559. +(@ENTRY, 41, 1468, 1063, 1390, 0, 0, 0, 76, 58, 151, 68, 65),
  560. +(@ENTRY, 42, 1408, 1026, 1484, 48, 64, 142, 81, 59, 156, 70, 67),
  561. +(@ENTRY, 43, 1588, 1187, 1550, 0, 0, 0, 87, 60, 160, 71, 68),
  562. +(@ENTRY, 44, 1648, 1214, 1650, 0, 0, 0, 91, 61, 164, 73, 70),
  563. +(@ENTRY, 45, 1708, 1240, 2159, 66, 87, 172, 96, 25, 169, 67, 72),
  564. +(@ENTRY, 46, 1768, 1267, 1817, 0, 0, 176, 98, 65, 173, 77, 73),
  565. +(@ENTRY, 47, 1928, 1294, 1853, 0, 0, 180, 100, 66, 177, 78, 75),
  566. +(@ENTRY, 48, 1889, 1320, 1888, 0, 0, 184, 102, 68, 181, 80, 76),
  567. +(@ENTRY, 49, 1950, 1347, 1925, 0, 0, 188, 104, 69, 186, 82, 78),
  568. +(@ENTRY, 50, 2638, 1977, 1959, 65, 86, 194, 107, 71, 190, 84, 80),
  569. +(@ENTRY, 51, 2055, 1435, 2041, 0, 0, 0, 109, 72, 195, 86, 82),
  570. +(@ENTRY, 52, 2108, 1481, 2125, 0, 0, 0, 111, 74, 199, 88, 84),
  571. +(@ENTRY, 53, 2161, 1527, 2213, 0, 0, 0, 113, 75, 204, 90, 86),
  572. +(@ENTRY, 54, 2213, 1573, 2305, 0, 0, 0, 116, 77, 208, 92, 88),
  573. +(@ENTRY, 55, 2266, 1620, 2400, 0, 0, 0, 118, 78, 213, 94, 90),
  574. +(@ENTRY, 56, 2318, 1666, 2499, 0, 0, 0, 120, 80, 217, 96, 92),
  575. +(@ENTRY, 57, 2371, 1714, 2602, 0, 0, 0, 123, 82, 222, 99, 94),
  576. +(@ENTRY, 58, 2424, 1763, 2709, 0, 0, 0, 125, 83, 226, 101, 97),
  577. +(@ENTRY, 59, 2476, 1824, 2821, 0, 0, 0, 127, 85, 231, 103, 99),
  578. +(@ENTRY, 60, 2529, 1874, 2938, 0, 0, 0, 130, 87, 235, 106, 101),
  579. +(@ENTRY, 61, 2583, 1925, 3059, 0, 0, 0, 132, 89, 240, 108, 103),
  580. +(@ENTRY, 62, 3518, 2833, 3479, 175, 243, 246, 133, 36, 279, 124, 102),
  581. +(@ENTRY, 63, 2693, 2030, 3317, 0, 0, 0, 137, 93, 249, 113, 107),
  582. +(@ENTRY, 64, 2758, 2084, 3454, 0, 0, 0, 139, 95, 253, 116, 109),
  583. +(@ENTRY, 65, 2823, 2139, 3597, 0, 0, 0, 141, 97, 258, 119, 111),
  584. +(@ENTRY, 66, 2888, 2195, 3745, 0, 0, 0, 143, 99, 262, 121, 113),
  585. +(@ENTRY, 67, 2944, 2252, 3900, 0, 0, 0, 146, 101, 267, 124, 115),
  586. +(@ENTRY, 68, 3000, 2300, 4061, 0, 0, 0, 148, 103, 271, 127, 117),
  587. +(@ENTRY, 69, 3056, 2360, 4229, 0, 0, 0, 150, 105, 276, 130, 120),
  588. +(@ENTRY, 70, 3112, 2420, 4400, 92, 123, 286, 153, 108, 280, 133, 122),
  589. +(@ENTRY, 71, 3169, 2478, 4561, 0, 0, 0, 156, 111, 285, 136, 124),
  590. +(@ENTRY, 72, 3227, 2535, 4721, 0, 0, 0, 159, 113, 290, 139, 126),
  591. +(@ENTRY, 73, 3283, 2594, 4882, 0, 0, 0, 162, 116, 294, 143, 128),
  592. +(@ENTRY, 74, 3342, 2653, 5041, 0, 0, 0, 165, 118, 298, 146, 129),
  593. +(@ENTRY, 75, 3403, 2711, 5199, 0, 0, 0, 167, 121, 304, 150, 131),
  594. +(@ENTRY, 76, 3459, 2772, 5363, 0, 0, 0, 170, 124, 309, 153, 132),
  595. +(@ENTRY, 77, 3518, 2833, 7056, 293, 415, 452, 236, 172, 314, 144, 200),
  596. +(@ENTRY, 78, 3576, 2894, 5688, 0, 0, 0, 175, 129, 319, 157, 137),
  597. +(@ENTRY, 79, 3645, 2954, 5868, 0, 0, 0, 177, 130, 324, 158, 140),
  598. +(@ENTRY, 80, 3733, 3025, 7782, 333, 466, 608, 314, 190, 328, 150, 209);
  599. +-- warlock felguard
  600. +SET @ENTRY := 17252;
  601. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  602. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  603. +(@ENTRY, 1, 40, 48, 3494, 113, 149, 194, 107, 71, 190, 84, 80),
  604. +(@ENTRY, 2, 49, 59, 40, 0, 0, 0, 14, 15, 2, 1, 26),
  605. +(@ENTRY, 3, 58, 70, 60, 0, 0, 0, 15, 16, 4, 1, 27),
  606. +(@ENTRY, 4, 68, 81, 80, 0, 0, 0, 17, 17, 8, 2, 27),
  607. +(@ENTRY, 5, 77, 92, 100, 0, 0, 0, 18, 18, 12, 2, 28),
  608. +(@ENTRY, 6, 86, 103, 120, 0, 0, 0, 20, 19, 16, 3, 29),
  609. +(@ENTRY, 7, 95, 114, 140, 0, 0, 0, 22, 20, 21, 3, 29),
  610. +(@ENTRY, 8, 104, 125, 160, 0, 0, 0, 23, 21, 25, 4, 30),
  611. +(@ENTRY, 9, 113, 136, 180, 0, 0, 0, 25, 22, 29, 4, 31),
  612. +(@ENTRY, 10, 123, 147, 200, 0, 0, 0, 26, 23, 33, 5, 31),
  613. +(@ENTRY, 11, 132, 158, 220, 0, 0, 0, 28, 25, 38, 6, 32),
  614. +(@ENTRY, 12, 150, 180, 240, 0, 0, 0, 29, 26, 42, 8, 33),
  615. +(@ENTRY, 13, 169, 203, 280, 0, 0, 0, 31, 27, 46, 9, 34),
  616. +(@ENTRY, 14, 189, 227, 320, 0, 0, 0, 33, 28, 50, 11, 35),
  617. +(@ENTRY, 15, 209, 251, 360, 0, 0, 0, 34, 29, 55, 14, 35),
  618. +(@ENTRY, 16, 229, 275, 400, 0, 0, 0, 36, 30, 59, 16, 36),
  619. +(@ENTRY, 17, 250, 300, 460, 0, 0, 0, 37, 31, 63, 20, 37),
  620. +(@ENTRY, 18, 262, 314, 510, 0, 0, 0, 39, 32, 67, 24, 38),
  621. +(@ENTRY, 19, 293, 351, 550, 0, 0, 0, 40, 33, 72, 29, 39),
  622. +(@ENTRY, 20, 303, 377, 563, 0, 0, 0, 42, 35, 67, 31, 49),
  623. +(@ENTRY, 21, 325, 393, 604, 0, 0, 0, 44, 36, 80, 53, 39),
  624. +(@ENTRY, 22, 349, 420, 628, 0, 0, 0, 46, 36, 84, 54, 41),
  625. +(@ENTRY, 23, 373, 447, 652, 0, 0, 0, 47, 38, 89, 56, 42),
  626. +(@ENTRY, 24, 400, 476, 675, 0, 0, 0, 49, 39, 93, 57, 43),
  627. +(@ENTRY, 25, 440, 504, 699, 0, 0, 0, 50, 40, 97, 60, 44),
  628. +(@ENTRY, 26, 469, 534, 721, 0, 0, 0, 52, 41, 101, 62, 46),
  629. +(@ENTRY, 27, 501, 564, 745, 0, 0, 0, 53, 42, 105, 63, 47),
  630. +(@ENTRY, 28, 534, 592, 768, 0, 0, 0, 55, 43, 110, 65, 48),
  631. +(@ENTRY, 29, 566, 620, 791, 0, 0, 0, 57, 44, 114, 67, 49),
  632. +(@ENTRY, 30, 599, 648, 815, 0, 0, 0, 57, 46, 118, 69, 51),
  633. +(@ENTRY, 31, 631, 676, 838, 0, 0, 0, 59, 47, 123, 71, 52),
  634. +(@ENTRY, 32, 680, 720, 862, 0, 0, 0, 60, 47, 127, 73, 53),
  635. +(@ENTRY, 33, 728, 742, 884, 0, 0, 0, 62, 49, 131, 74, 54),
  636. +(@ENTRY, 34, 661, 793, 908, 0, 0, 0, 64, 50, 135, 76, 56),
  637. +(@ENTRY, 35, 699, 845, 950, 0, 0, 0, 63, 51, 136, 73, 57),
  638. +(@ENTRY, 36, 737, 879, 990, 0, 0, 0, 67, 52, 137, 72, 58),
  639. +(@ENTRY, 37, 776, 916, 1038, 0, 0, 0, 69, 53, 138, 70, 59),
  640. +(@ENTRY, 38, 814, 952, 1095, 0, 0, 0, 70, 55, 139, 69, 61),
  641. +(@ENTRY, 39, 852, 988, 1163, 0, 0, 0, 72, 56, 142, 68, 62),
  642. +(@ENTRY, 40, 890, 1026, 1244, 0, 0, 0, 74, 57, 147, 67, 64),
  643. +(@ENTRY, 41, 928, 1063, 1338, 0, 0, 0, 77, 58, 152, 68, 66),
  644. +(@ENTRY, 42, 976, 1103, 1448, 0, 0, 0, 81, 59, 156, 70, 67),
  645. +(@ENTRY, 43, 1005, 1187, 1560, 0, 0, 0, 87, 60, 160, 72, 69),
  646. +(@ENTRY, 44, 1043, 1214, 1670, 0, 0, 0, 91, 61, 164, 74, 71),
  647. +(@ENTRY, 45, 1081, 1240, 1738, 0, 0, 0, 96, 64, 169, 75, 72),
  648. +(@ENTRY, 46, 1119, 1267, 1773, 0, 0, 0, 98, 65, 173, 77, 73),
  649. +(@ENTRY, 47, 1158, 1294, 1808, 0, 0, 0, 100, 66, 177, 78, 75),
  650. +(@ENTRY, 48, 1196, 1320, 1843, 0, 0, 0, 102, 68, 181, 80, 76),
  651. +(@ENTRY, 49, 1234, 1347, 1878, 0, 0, 0, 105, 69, 186, 82, 78),
  652. +(@ENTRY, 50, 2877, 2391, 3494, 113, 149, 194, 107, 71, 190, 84, 80),
  653. +(@ENTRY, 51, 2920, 2435, 3559, 122, 160, 198, 109, 72, 223, 97, 81),
  654. +(@ENTRY, 52, 3164, 2481, 3624, 127, 167, 202, 111, 73, 228, 100, 82),
  655. +(@ENTRY, 53, 3207, 2527, 3686, 127, 167, 206, 113, 75, 233, 102, 84),
  656. +(@ENTRY, 54, 3350, 2573, 3752, 0, 0, 0, 116, 77, 238, 104, 87),
  657. +(@ENTRY, 55, 3493, 2620, 3814, 0, 0, 0, 119, 78, 243, 106, 88),
  658. +(@ENTRY, 56, 3536, 2766, 3878, 135, 176, 220, 120, 79, 248, 108, 89),
  659. +(@ENTRY, 57, 3680, 2814, 3941, 0, 0, 0, 123, 82, 251, 111, 92),
  660. +(@ENTRY, 58, 3723, 2913, 4006, 0, 0, 0, 125, 84, 255, 113, 94),
  661. +(@ENTRY, 59, 3866, 2924, 4067, 0, 0, 0, 128, 86, 258, 115, 96),
  662. +(@ENTRY, 60, 3909, 3174, 4635, 0, 0, 0, 130, 87, 270, 118, 98),
  663. +(@ENTRY, 61, 4054, 3225, 6300, 0, 0, 0, 132, 90, 274, 121, 101),
  664. +(@ENTRY, 62, 4300, 3377, 6276, 240, 329, 246, 133, 36, 279, 124, 102),
  665. +(@ENTRY, 63, 4545, 3430, 6440, 0, 0, 0, 137, 93, 286, 123, 105),
  666. +(@ENTRY, 64, 4691, 3584, 6550, 0, 0, 0, 139, 95, 295, 128, 107),
  667. +(@ENTRY, 65, 4749, 3646, 6612, 0, 0, 0, 142, 98, 300, 129, 110),
  668. +(@ENTRY, 66, 4876, 3778, 6910, 0, 0, 0, 144, 99, 306, 130, 112),
  669. +(@ENTRY, 67, 4984, 3863, 7150, 0, 0, 0, 146, 101, 310, 131, 114),
  670. +(@ENTRY, 68, 5197, 3949, 7450, 0, 0, 0, 148, 105, 325, 132, 117),
  671. +(@ENTRY, 69, 5208, 4035, 7800, 0, 0, 0, 151, 107, 335, 133, 119),
  672. +(@ENTRY, 70, 5320, 4170, 7927, 176, 232, 323, 153, 108, 351, 196, 122),
  673. +(@ENTRY, 71, 5471, 4277, 8267, 0, 0, 0, 155, 109, 359, 204, 124),
  674. +(@ENTRY, 72, 5623, 4384, 8607, 0, 0, 0, 158, 111, 367, 211, 125),
  675. +(@ENTRY, 73, 5776, 4492, 8952, 0, 0, 0, 161, 113, 375, 219, 128),
  676. +(@ENTRY, 74, 5930, 4600, 9297, 0, 0, 0, 164, 115, 382, 227, 130),
  677. +(@ENTRY, 75, 6085, 4709, 9647, 0, 0, 0, 166, 118, 390, 235, 132),
  678. +(@ENTRY, 76, 6241, 4818, 9997, 0, 0, 0, 170, 121, 399, 242, 135),
  679. +(@ENTRY, 77, 6398, 4927, 10352, 0, 0, 0, 172, 124, 407, 250, 138),
  680. +(@ENTRY, 78, 6556, 5036, 10712, 0, 0, 0, 174, 125, 414, 257, 141),
  681. +(@ENTRY, 79, 6711, 5144, 11067, 0, 0, 0, 176, 127, 423, 266, 145),
  682. +(@ENTRY, 80, 6872, 5266, 14033, 329, 495, 608, 314, 129, 428, 280, 209);
  683. +-- DK Ghoul
  684. +SET @ENTRY := 26125;
  685. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  686. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  687. +(@ENTRY, 1, 48, 80, 10, 1, 3, 10, 20, 16, 13, 20, 8),
  688. +(@ENTRY, 2, 105, 106, 67, 2, 3, 30, 22, 17, 14, 21, 9),
  689. +(@ENTRY, 3, 162, 132, 124, 3, 4, 45, 24, 18, 15, 22, 10),
  690. +(@ENTRY, 4, 219, 158, 181, 3, 6, 60, 26, 19, 16, 23, 11),
  691. +(@ENTRY, 5, 276, 184, 238, 5, 7, 70, 28, 20, 17, 24, 12),
  692. +(@ENTRY, 6, 333, 210, 295, 6, 9, 75, 30, 21, 18, 25, 13),
  693. +(@ENTRY, 7, 390, 236, 352, 7, 11, 80, 32, 22, 19, 26, 14),
  694. +(@ENTRY, 8, 447, 262, 409, 9, 14, 85, 34, 23, 20, 27, 15),
  695. +(@ENTRY, 9, 504, 288, 466, 10, 15, 90, 36, 24, 21, 28, 16),
  696. +(@ENTRY, 10, 561, 314, 523, 11, 16, 95, 38, 25, 22, 29, 17),
  697. +(@ENTRY, 11, 618, 340, 580, 11, 17, 100, 40, 26, 23, 30, 18),
  698. +(@ENTRY, 12, 675, 366, 637, 12, 18, 105, 42, 27, 24, 31, 19),
  699. +(@ENTRY, 13, 732, 392, 694, 13, 19, 110, 44, 28, 25, 32, 20),
  700. +(@ENTRY, 14, 789, 418, 751, 13, 20, 115, 46, 29, 26, 33, 21),
  701. +(@ENTRY, 15, 846, 444, 808, 14, 21, 120, 48, 30, 27, 34, 22),
  702. +(@ENTRY, 16, 903, 470, 865, 15, 23, 125, 50, 31, 28, 35, 23),
  703. +(@ENTRY, 17, 960, 496, 922, 16, 24, 130, 52, 32, 29, 36, 24),
  704. +(@ENTRY, 18, 1017, 522, 979, 17, 25, 135, 54, 33, 30, 37, 25),
  705. +(@ENTRY, 19, 1074, 548, 1036, 18, 27, 140, 56, 34, 31, 38, 26),
  706. +(@ENTRY, 20, 1131, 574, 1093, 19, 28, 145, 58, 35, 32, 39, 27),
  707. +(@ENTRY, 21, 1188, 600, 1150, 20, 30, 150, 60, 36, 33, 40, 28),
  708. +(@ENTRY, 22, 1245, 626, 1207, 21, 31, 155, 62, 37, 34, 41, 29),
  709. +(@ENTRY, 23, 1302, 652, 1264, 22, 32, 160, 64, 38, 35, 42, 30),
  710. +(@ENTRY, 24, 1359, 678, 1321, 23, 33, 165, 66, 39, 36, 43, 31),
  711. +(@ENTRY, 25, 1416, 704, 1378, 24, 35, 170, 68, 40, 37, 44, 32),
  712. +(@ENTRY, 26, 1473, 730, 1435, 25, 36, 175, 70, 41, 38, 45, 33),
  713. +(@ENTRY, 27, 1530, 756, 1492, 26, 37, 180, 72, 42, 39, 46, 34),
  714. +(@ENTRY, 28, 1587, 782, 1549, 27, 39, 185, 74, 43, 40, 47, 35),
  715. +(@ENTRY, 29, 1644, 808, 1606, 28, 40, 190, 76, 44, 41, 48, 36),
  716. +(@ENTRY, 30, 1701, 834, 1663, 29, 41, 195, 78, 45, 42, 49, 37),
  717. +(@ENTRY, 31, 1758, 860, 1720, 30, 43, 200, 80, 46, 43, 50, 38),
  718. +(@ENTRY, 32, 1815, 886, 1777, 30, 44, 205, 82, 47, 44, 51, 39),
  719. +(@ENTRY, 33, 1872, 912, 1834, 31, 45, 210, 84, 48, 45, 52, 40),
  720. +(@ENTRY, 34, 1929, 938, 1891, 32, 46, 215, 86, 49, 46, 53, 41),
  721. +(@ENTRY, 35, 1986, 964, 1948, 33, 47, 220, 88, 50, 47, 54, 42),
  722. +(@ENTRY, 36, 2043, 990, 2005, 34, 48, 225, 90, 51, 48, 55, 43),
  723. +(@ENTRY, 37, 2100, 1016, 2062, 35, 50, 230, 92, 52, 49, 56, 44),
  724. +(@ENTRY, 38, 2157, 1042, 2119, 37, 51, 235, 94, 53, 50, 57, 45),
  725. +(@ENTRY, 39, 2214, 1068, 2176, 38, 53, 240, 96, 54, 51, 58, 46),
  726. +(@ENTRY, 40, 2271, 1094, 2233, 40, 55, 245, 98, 55, 52, 59, 47),
  727. +(@ENTRY, 41, 2328, 1120, 2290, 41, 57, 250, 100, 56, 53, 60, 48),
  728. +(@ENTRY, 42, 2385, 1146, 2347, 43, 59, 255, 102, 57, 54, 61, 49),
  729. +(@ENTRY, 43, 2442, 1172, 2404, 44, 61, 260, 104, 58, 55, 62, 50),
  730. +(@ENTRY, 44, 2499, 1198, 2461, 46, 64, 265, 106, 59, 56, 63, 51),
  731. +(@ENTRY, 45, 2556, 1224, 2518, 48, 69, 270, 108, 60, 57, 64, 52),
  732. +(@ENTRY, 46, 2613, 1250, 2575, 50, 73, 275, 110, 61, 58, 65, 53),
  733. +(@ENTRY, 47, 2670, 1276, 2632, 52, 77, 280, 112, 62, 59, 66, 54),
  734. +(@ENTRY, 48, 2727, 1302, 2689, 54, 80, 285, 114, 63, 60, 67, 55),
  735. +(@ENTRY, 49, 2784, 1328, 2746, 57, 83, 290, 116, 64, 61, 68, 56),
  736. +(@ENTRY, 50, 2841, 1354, 2803, 60, 86, 295, 118, 65, 62, 69, 57),
  737. +(@ENTRY, 51, 2898, 1380, 2860, 63, 87, 300, 120, 66, 63, 70, 58),
  738. +(@ENTRY, 52, 2955, 1406, 2917, 64, 88, 305, 122, 67, 64, 71, 59),
  739. +(@ENTRY, 53, 3012, 1432, 2974, 65, 89, 310, 124, 68, 65, 72, 60),
  740. +(@ENTRY, 54, 3069, 1458, 3031, 66, 91, 315, 126, 69, 66, 73, 61),
  741. +(@ENTRY, 55, 3126, 1484, 3088, 66, 93, 320, 128, 70, 67, 74, 62),
  742. +(@ENTRY, 56, 3183, 1510, 3145, 67, 94, 325, 130, 71, 68, 75, 63),
  743. +(@ENTRY, 57, 3240, 1536, 3202, 69, 96, 330, 132, 72, 69, 76, 64),
  744. +(@ENTRY, 58, 3297, 1562, 3259, 74, 102, 335, 134, 73, 70, 77, 65),
  745. +(@ENTRY, 59, 3354, 1588, 3316, 78, 109, 340, 136, 74, 71, 78, 66),
  746. +(@ENTRY, 60, 3411, 1614, 3373, 84, 116, 345, 138, 75, 72, 79, 67),
  747. +(@ENTRY, 61, 3468, 1640, 3430, 88, 123, 350, 140, 76, 73, 80, 68),
  748. +(@ENTRY, 62, 3525, 1666, 3487, 92, 127, 365, 142, 77, 74, 81, 69),
  749. +(@ENTRY, 63, 3582, 1692, 3544, 96, 130, 380, 144, 78, 75, 82, 70),
  750. +(@ENTRY, 64, 3639, 1718, 3601, 100, 136, 395, 146, 79, 76, 83, 71),
  751. +(@ENTRY, 65, 3696, 1744, 3658, 105, 142, 410, 148, 80, 77, 84, 72),
  752. +(@ENTRY, 66, 3753, 1770, 3715, 110, 148, 425, 150, 81, 78, 85, 73),
  753. +(@ENTRY, 67, 3810, 1796, 3772, 115, 154, 440, 152, 82, 79, 86, 74),
  754. +(@ENTRY, 68, 3867, 1822, 3829, 120, 160, 455, 154, 83, 80, 87, 75),
  755. +(@ENTRY, 69, 3924, 1848, 3886, 125, 166, 470, 156, 84, 81, 88, 76),
  756. +(@ENTRY, 70, 3981, 1874, 3943, 130, 170, 485, 158, 85, 82, 89, 77),
  757. +(@ENTRY, 71, 4038, 1900, 4000, 138, 174, 500, 160, 86, 83, 90, 78),
  758. +(@ENTRY, 72, 4095, 1926, 4057, 150, 195, 515, 162, 87, 84, 91, 79),
  759. +(@ENTRY, 73, 4152, 1952, 4114, 160, 210, 530, 164, 88, 85, 92, 80),
  760. +(@ENTRY, 74, 4209, 1978, 4171, 180, 240, 545, 166, 89, 86, 93, 81),
  761. +(@ENTRY, 75, 4266, 2004, 4228, 200, 270, 550, 168, 90, 87, 94, 82),
  762. +(@ENTRY, 76, 4323, 2030, 4285, 220, 310, 565, 170, 91, 88, 95, 83),
  763. +(@ENTRY, 77, 4380, 2056, 4342, 240, 350, 580, 172, 92, 89, 96, 84),
  764. +(@ENTRY, 78, 4437, 2082, 4399, 270, 390, 595, 174, 93, 90, 97, 85),
  765. +(@ENTRY, 79, 4494, 2108, 4456, 290, 420, 610, 176, 94, 91, 98, 86),
  766. +(@ENTRY, 80, 4551, 2134, 4513, 310, 504, 622, 178, 95, 92, 99, 87);
  767. +-- Water elemental
  768. +SET @ENTRY := 37994;
  769. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  770. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  771. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  772. +(@ENTRY, 50, 1234, 1000, 108, 63, 87, 91, 13, 19, 50, 43, 53),
  773. +(@ENTRY, 51, 1250, 1115, 112, 64, 88, 94, 15, 20, 51, 44, 54),
  774. +(@ENTRY, 52, 1271, 1135, 128, 65, 90, 96, 17, 21, 52, 44, 55),
  775. +(@ENTRY, 53, 1280, 1152, 183, 66, 92, 98, 19, 22, 53, 45, 56),
  776. +(@ENTRY, 54, 1304, 1161, 237, 67, 93, 99, 22, 23, 54, 45, 57),
  777. +(@ENTRY, 55, 1329, 1182, 292, 68, 95, 102, 24, 24, 55, 47, 58),
  778. +(@ENTRY, 56, 1341, 1200, 348, 69, 96, 104, 27, 25, 57, 47, 59),
  779. +(@ENTRY, 57, 1355, 1234, 402, 86, 100, 105, 29, 26, 58, 48, 60),
  780. +(@ENTRY, 58, 1364, 1242, 457, 104, 109, 106, 31, 27, 59, 48, 61),
  781. +(@ENTRY, 59, 1372, 1259, 512, 110, 115, 109, 34, 28, 60, 49, 62),
  782. +(@ENTRY, 60, 1381, 1262, 814, 134, 123, 112, 35, 29, 61, 50, 63),
  783. +(@ENTRY, 61, 1390, 1274, 1113, 157, 145, 114, 36, 30, 62, 51, 64),
  784. +(@ENTRY, 62, 1400, 1282, 1410, 179, 162, 116, 37, 31, 63, 52, 65),
  785. +(@ENTRY, 63, 1411, 1291, 1708, 190, 166, 126, 38, 32, 64, 53, 66),
  786. +(@ENTRY, 64, 1419, 1300, 1006, 182, 170, 142, 39, 33, 65, 54, 67),
  787. +(@ENTRY, 65, 1429, 1304, 1303, 186, 178, 153, 40, 34, 66, 55, 68),
  788. +(@ENTRY, 66, 1435, 1321, 1601, 189, 187, 163, 41, 35, 67, 56, 69),
  789. +(@ENTRY, 67, 1450, 1330, 1900, 192, 198, 172, 42, 36, 68, 57, 70),
  790. +(@ENTRY, 68, 1458, 1341, 1197, 199, 210, 181, 43, 37, 69, 58, 71),
  791. +(@ENTRY, 69, 1464, 1351, 2008, 122, 144, 127, 44, 36, 70, 77, 72),
  792. +(@ENTRY, 70, 1528, 1568, 2207, 138, 174, 135, 45, 39, 71, 78, 73),
  793. +(@ENTRY, 71, 1580, 1632, 2319, 142, 224, 182, 48, 40, 72, 82, 75),
  794. +(@ENTRY, 72, 1639, 1695, 2431, 146, 312, 204, 50, 41, 74, 83, 77),
  795. +(@ENTRY, 73, 1699, 1763, 2544, 154, 368, 255, 53, 44, 76, 85, 80),
  796. +(@ENTRY, 74, 1761, 1830, 2660, 162, 424, 301, 54, 45, 78, 87, 82),
  797. +(@ENTRY, 75, 1821, 1896, 2760, 168, 482, 390, 56, 46, 79, 89, 84),
  798. +(@ENTRY, 76, 1882, 1964, 2890, 184, 520, 470, 57, 48, 80, 90, 85),
  799. +(@ENTRY, 77, 1949, 2033, 2999, 212, 59, 550, 58, 50, 83, 92, 90),
  800. +(@ENTRY, 78, 2011, 2100, 3110, 263, 640, 622, 59, 54, 85, 94, 91),
  801. +(@ENTRY, 79, 2073, 2167, 3150, 322, 720, 710, 60, 61, 88, 96, 92),
  802. +(@ENTRY, 80, 3200, 2800, 4000, 410, 850, 820, 62, 86, 92, 101, 94);
  803. +-- Mirror image
  804. +SET @ENTRY := 31216;
  805. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  806. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  807. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  808. +(@ENTRY, 80, 2680, 2400, 8600, 182, 216, 110, 72, 86, 152, 191, 94);
  809. +-- Priest Shadowfiend
  810. +SET @ENTRY := 19668;
  811. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  812. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  813. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  814. +(@ENTRY, 66, 6888, 3195, 2745, 125, 480, 770, 48, 71, 78, 87, 87),
  815. +(@ENTRY, 67, 6944, 3252, 2900, 130, 520, 780, 49, 72, 79, 88, 88),
  816. +(@ENTRY, 68, 6000, 3300, 3061, 135, 550, 790, 50, 73, 80, 89, 89),
  817. +(@ENTRY, 69, 6056, 3360, 3229, 140, 590, 800, 51, 75, 81, 90, 90),
  818. +(@ENTRY, 70, 6112, 3420, 3400, 145, 610, 810, 52, 76, 82, 89, 91),
  819. +(@ENTRY, 71, 6169, 3478, 3561, 150, 635, 820, 53, 77, 83, 92, 92),
  820. +(@ENTRY, 72, 6227, 3535, 3721, 155, 655, 830, 54, 78, 84, 93, 93),
  821. +(@ENTRY, 73, 6283, 3594, 3882, 160, 680, 840, 55, 79, 85, 94, 94),
  822. +(@ENTRY, 74, 6342, 3653, 4041, 165, 700, 850, 56, 80, 86, 95, 95),
  823. +(@ENTRY, 75, 6403, 3711, 4199, 170, 720, 860, 57, 81, 87, 96, 96),
  824. +(@ENTRY, 76, 6459, 3772, 4363, 175, 750, 870, 58, 82, 88, 97 ,97),
  825. +(@ENTRY, 77, 6518, 3833, 4400, 180, 780, 880, 59, 83, 89, 96, 98),
  826. +(@ENTRY, 78, 6576, 3894, 4420, 185, 600, 890, 60, 84, 90, 98, 99),
  827. +(@ENTRY, 79, 6645, 3954, 4400, 188, 615, 900, 61, 85, 91, 100, 100),
  828. +(@ENTRY, 80, 7266, 4759, 4500, 190, 620, 910, 62, 86, 92, 101, 102);
  829. +-- Spirit wolf
  830. +SET @ENTRY := 29264;
  831. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  832. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  833. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  834. +(@ENTRY, 40, 5271, 1094, 2233, 73, 100, 190, 98, 55, 52, 59, 47),
  835. +(@ENTRY, 41, 5328, 1120, 2290, 75, 110, 220, 100, 56, 53, 60, 48),
  836. +(@ENTRY, 42, 5385, 1146, 2347, 76, 130, 240, 102, 57, 54, 61, 49),
  837. +(@ENTRY, 43, 5442, 1172, 2404, 78, 160, 260, 104, 58, 55, 62, 50),
  838. +(@ENTRY, 44, 5499, 1198, 2461, 80, 180, 280, 106, 59, 56, 63, 51),
  839. +(@ENTRY, 45, 5556, 1224, 2518, 85, 200, 300, 108, 60, 57, 64, 52),
  840. +(@ENTRY, 46, 5613, 1250, 2575, 90, 220, 320, 110, 61, 58, 65, 53),
  841. +(@ENTRY, 47, 5670, 1276, 2632, 95, 240, 340, 112, 62, 59, 66, 54),
  842. +(@ENTRY, 48, 5727, 1302, 2689, 100, 260, 360, 114, 63, 60, 67, 55),
  843. +(@ENTRY, 49, 5784, 1328, 2746, 110, 280, 380, 116, 64, 61, 68, 56),
  844. +(@ENTRY, 50, 5841, 1354, 2803, 120, 300, 400, 118, 65, 62, 69, 57),
  845. +(@ENTRY, 51, 5898, 1380, 2860, 130, 350, 440, 120, 66, 63, 70, 58),
  846. +(@ENTRY, 52, 5955, 1406, 2917, 140, 400, 470, 122, 67, 64, 71, 59),
  847. +(@ENTRY, 53, 5012, 1432, 2974, 150, 450, 500, 124, 68, 65, 72, 60),
  848. +(@ENTRY, 54, 6069, 1458, 3031, 160, 480, 520, 126, 69, 66, 73, 61),
  849. +(@ENTRY, 55, 6126, 1484, 3088, 170, 500, 550, 128, 70, 67, 74, 62),
  850. +(@ENTRY, 56, 6183, 1510, 3145, 180, 520, 600, 130, 71, 68, 75, 63),
  851. +(@ENTRY, 57, 6240, 1536, 3202, 190, 545, 620, 132, 72, 69, 76, 64),
  852. +(@ENTRY, 58, 6297, 1562, 3259, 200, 560, 640, 134, 73, 70, 77, 65),
  853. +(@ENTRY, 59, 6354, 1588, 3316, 210, 575, 660, 136, 74, 71, 78, 66),
  854. +(@ENTRY, 60, 6411, 1614, 3373, 220, 600, 680, 138, 75, 72, 79, 67),
  855. +(@ENTRY, 61, 6468, 1640, 3430, 230, 620, 700, 140, 76, 73, 80, 68),
  856. +(@ENTRY, 62, 6525, 1666, 3487, 240, 630, 720, 142, 77, 74, 81, 69),
  857. +(@ENTRY, 63, 6582, 1692, 3544, 250, 655, 740, 144, 78, 75, 82, 70),
  858. +(@ENTRY, 64, 6639, 1718, 3601, 260, 670, 760, 146, 79, 76, 83, 71),
  859. +(@ENTRY, 65, 6696, 1744, 3658, 270, 685, 790, 148, 80, 77, 84, 72),
  860. +(@ENTRY, 66, 6753, 1770, 3715, 280, 705, 810, 150, 81, 78, 85, 73),
  861. +(@ENTRY, 67, 6810, 1796, 3772, 290, 720, 820, 152, 82, 79, 86, 74),
  862. +(@ENTRY, 68, 6867, 1822, 3829, 300, 730, 840, 154, 83, 80, 87, 75),
  863. +(@ENTRY, 69, 6924, 1848, 3886, 310, 740, 860, 156, 84, 81, 88, 76),
  864. +(@ENTRY, 70, 7200, 1890, 3800, 320, 750, 900, 158, 82, 79, 92, 88),
  865. +(@ENTRY, 71, 8038, 1900, 4000, 325, 760, 930, 160, 86, 83, 90, 78),
  866. +(@ENTRY, 72, 8095, 1926, 4057, 330, 770, 940, 162, 87, 84, 91, 79),
  867. +(@ENTRY, 73, 8152, 1952, 4114, 340, 780, 950, 164, 88, 85, 92, 80),
  868. +(@ENTRY, 74, 8209, 1978, 4171, 350, 790, 960, 166, 89, 86, 93, 81),
  869. +(@ENTRY, 75, 8266, 2004, 4228, 360, 800, 970, 168, 90, 87, 94, 82),
  870. +(@ENTRY, 76, 8323, 2030, 4285, 370, 810, 980, 170, 91, 88, 95, 83),
  871. +(@ENTRY, 77, 8380, 2056, 4342, 380, 820, 990, 172, 92, 89, 96, 84),
  872. +(@ENTRY, 78, 8437, 2082, 4399, 390, 830, 1000,174, 93, 90, 97, 85),
  873. +(@ENTRY, 79, 8494, 2108, 4456, 400, 840, 1090,176, 94, 91, 98, 86),
  874. +(@ENTRY, 80, 8600, 3800, 4800, 410, 850, 1100,180, 122,92, 101, 94);
  875. +-- Greater Earth Elemental
  876. +SET @ENTRY := 15352;
  877. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  878. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  879. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  880. +(@ENTRY, 66, 7100, 1840, 7000, 50, 83, 672, 132, 62, 96, 132, 320),
  881. +(@ENTRY, 67, 7464, 1860, 7521, 50, 84, 682, 141, 64, 100, 134, 330),
  882. +(@ENTRY, 68, 7828, 1880, 8042, 51, 85, 692, 150, 66, 105, 136, 340),
  883. +(@ENTRY, 69, 8192, 1900, 8564, 52, 86, 702, 159, 68, 110, 139, 350),
  884. +(@ENTRY, 70, 8557, 1920, 9085, 52, 87, 712, 168, 70, 114, 141, 360),
  885. +(@ENTRY, 71, 8921, 1940, 9607, 53, 89, 722, 178, 72, 119, 143, 370),
  886. +(@ENTRY, 72, 9285, 1960, 10128, 54, 90, 732, 187, 74, 124, 146, 380),
  887. +(@ENTRY, 73, 9650, 1980, 10650, 55, 91, 742, 196, 76, 129, 148, 390),
  888. +(@ENTRY, 74, 10014, 2000, 11171, 55, 92, 752, 205, 78, 133, 150, 400),
  889. +(@ENTRY, 75, 10378, 2020, 11692, 56, 93, 762, 214, 80, 138, 153, 410),
  890. +(@ENTRY, 76, 10742, 2040, 12214, 57, 95, 772, 224, 82, 143, 155, 420),
  891. +(@ENTRY, 77, 11107, 2060, 12735, 57, 96, 782, 233, 84, 147, 157, 430),
  892. +(@ENTRY, 78, 11471, 2080, 13257, 58, 97, 792, 242, 86, 152, 160, 440),
  893. +(@ENTRY, 79, 11835, 2100, 13778, 59, 98, 802, 251, 88, 157, 162, 450),
  894. +(@ENTRY, 80, 12200, 2120, 14300, 60,100, 812, 261, 90, 162, 165, 460);
  895. +-- Greater Fire Elemental
  896. +SET @ENTRY := 15438;
  897. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  898. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  899. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  900. +(@ENTRY, 68, 6800, 2052, 980, 123, 164, 1100, 230, 138, 99, 320, 340),
  901. +(@ENTRY, 69, 6900, 2071, 990, 126, 167, 1130, 241, 139, 101, 327, 350),
  902. +(@ENTRY, 70, 7000, 2090, 1000, 129, 171, 1160, 252, 141, 103, 334, 360),
  903. +(@ENTRY, 71, 7100, 2109, 1010, 132, 175, 1190, 264, 143, 105, 341, 370),
  904. +(@ENTRY, 72, 7200, 2128, 1020, 135, 179, 1220, 275, 145, 107, 348, 380),
  905. +(@ENTRY, 73, 7300, 2147, 1030, 138, 183, 1250, 286, 147, 109, 355, 390),
  906. +(@ENTRY, 74, 7400, 2166, 1040, 141, 187, 1280, 298, 149, 112, 362, 400),
  907. +(@ENTRY, 75, 7500, 2185, 1050, 144, 190, 1310, 309, 150, 114, 369, 410),
  908. +(@ENTRY, 76, 7600, 2204, 1060, 147, 194, 1340, 320, 152, 116, 376, 420),
  909. +(@ENTRY, 77, 7700, 2223, 1070, 150, 198, 1370, 332, 154, 118, 383, 430),
  910. +(@ENTRY, 78, 7800, 2242, 1080, 153, 202, 1400, 343, 156, 120, 390, 440),
  911. +(@ENTRY, 79, 7900, 2261, 1090, 156, 206, 1430, 354, 158, 122, 397, 450),
  912. +(@ENTRY, 80, 8000, 2280, 1100, 160, 210, 1480, 366, 160, 125, 405, 460);
  913. +-- Mage Water elemental (old guardian)
  914. +SET @ENTRY := 510;
  915. +DELETE FROM `pet_levelstats` WHERE `creature_entry` = @ENTRY;
  916. +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `mindmg`, `maxdmg`, `attackpower`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES
  917. +(@ENTRY, 1, 42, 22, 20, 2, 3, 10, 22, 20, 22, 20, 20),
  918. +(@ENTRY, 50, 1234, 1000, 108, 63, 87, 91, 13, 19, 50, 43, 53),
  919. +(@ENTRY, 51, 1250, 1115, 112, 64, 88, 94, 15, 20, 51, 44, 54),
  920. +(@ENTRY, 52, 1271, 1135, 128, 65, 90, 96, 17, 21, 52, 44, 55),
  921. +(@ENTRY, 53, 1280, 1152, 183, 66, 92, 98, 19, 22, 53, 45, 56),
  922. +(@ENTRY, 54, 1304, 1161, 237, 67, 93, 99, 22, 23, 54, 45, 57),
  923. +(@ENTRY, 55, 1329, 1182, 292, 68, 95, 102, 24, 24, 55, 47, 58),
  924. +(@ENTRY, 56, 1341, 1200, 348, 69, 96, 104, 27, 25, 57, 47, 59),
  925. +(@ENTRY, 57, 1355, 1234, 402, 86, 100, 105, 29, 26, 58, 48, 60),
  926. +(@ENTRY, 58, 1364, 1242, 457, 104, 109, 106, 31, 27, 59, 48, 61),
  927. +(@ENTRY, 59, 1372, 1259, 512, 110, 115, 109, 34, 28, 60, 49, 62),
  928. +(@ENTRY, 60, 1381, 1262, 814, 134, 123, 112, 35, 29, 61, 50, 63),
  929. +(@ENTRY, 61, 1390, 1274, 1113, 157, 145, 114, 36, 30, 62, 51, 64),
  930. +(@ENTRY, 62, 1400, 1282, 1410, 179, 162, 116, 37, 31, 63, 52, 65),
  931. +(@ENTRY, 63, 1411, 1291, 1708, 190, 166, 126, 38, 32, 64, 53, 66),
  932. +(@ENTRY, 64, 1419, 1300, 1006, 182, 170, 142, 39, 33, 65, 54, 67),
  933. +(@ENTRY, 65, 1429, 1304, 1303, 186, 178, 153, 40, 34, 66, 55, 68),
  934. +(@ENTRY, 66, 1435, 1321, 1601, 189, 187, 163, 41, 35, 67, 56, 69),
  935. +(@ENTRY, 67, 1450, 1330, 1900, 192, 198, 172, 42, 36, 68, 57, 70),
  936. +(@ENTRY, 68, 1458, 1341, 1197, 199, 210, 181, 43, 37, 69, 58, 71),
  937. +(@ENTRY, 69, 1464, 1351, 2008, 122, 144, 127, 44, 36, 70, 77, 72),
  938. +(@ENTRY, 70, 1528, 1568, 2207, 138, 174, 135, 45, 39, 71, 78, 73),
  939. +(@ENTRY, 71, 1580, 1632, 2319, 142, 224, 182, 48, 40, 72, 82, 75),
  940. +(@ENTRY, 72, 1639, 1695, 2431, 146, 312, 204, 50, 41, 74, 83, 77),
  941. +(@ENTRY, 73, 1699, 1763, 2544, 154, 368, 255, 53, 44, 76, 85, 80),
  942. +(@ENTRY, 74, 1761, 1830, 2660, 162, 424, 301, 54, 45, 78, 87, 82),
  943. +(@ENTRY, 75, 1821, 1896, 2760, 168, 482, 390, 56, 46, 79, 89, 84),
  944. +(@ENTRY, 76, 1882, 1964, 2890, 184, 520, 470, 57, 48, 80, 90, 85),
  945. +(@ENTRY, 77, 1949, 2033, 2999, 212, 590, 550, 58, 50, 83, 92, 90),
  946. +(@ENTRY, 78, 2011, 2100, 3110, 263, 640, 622, 59, 54, 85, 94, 91),
  947. +(@ENTRY, 79, 2073, 2167, 3150, 322, 720, 710, 60, 61, 88, 96, 92),
  948. +(@ENTRY, 80, 2300, 2200, 3250, 360, 780, 740, 62, 86, 92, 99, 93);
  949. \ No newline at end of file
  950. diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
  951. index 9eca786..9e5ce79 100755
  952. --- a/src/server/game/AI/CoreAI/PetAI.cpp
  953. +++ b/src/server/game/AI/CoreAI/PetAI.cpp
  954. @@ -470,3 +470,19 @@ bool PetAI::CanAttack(Unit* target)
  955. // default, though we shouldn't ever get here
  956. return false;
  957. }
  958. +
  959. +void PetAI::ReceiveEmote(Player* player, uint32 emote)
  960. +{
  961. + sLog->outError("recieved emote : %d", emote);
  962. + switch (emote)
  963. + {
  964. + case TEXT_EMOTE_COWER:
  965. + if (me->isPet() && me->ToPet()->IsPetGhoul())
  966. + me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
  967. + break;
  968. + case TEXT_EMOTE_ANGRY:
  969. + if (me->isPet() && me->ToPet()->IsPetGhoul())
  970. + me->HandleEmoteCommand(EMOTE_ONESHOT_COWER);
  971. + break;
  972. + }
  973. +}
  974. \ No newline at end of file
  975. diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
  976. index 730ab12..ff392d8 100755
  977. --- a/src/server/game/AI/CoreAI/PetAI.h
  978. +++ b/src/server/game/AI/CoreAI/PetAI.h
  979. @@ -40,6 +40,7 @@ class PetAI : public CreatureAI
  980. void KilledUnit(Unit* /*victim*/);
  981. void AttackStart(Unit* target);
  982. void MovementInform(uint32 moveType, uint32 data);
  983. + void ReceiveEmote(Player* player, uint32 textEmote);
  984.  
  985. private:
  986. bool _isVisible(Unit*) const;
  987. diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
  988. index 4ffcdb3..3ce5bdb 100755
  989. --- a/src/server/game/AI/CreatureAIImpl.h
  990. +++ b/src/server/game/AI/CreatureAIImpl.h
  991. @@ -582,7 +582,10 @@ inline bool CreatureAI::_EnterEvadeMode()
  992. return false;
  993.  
  994. // dont remove vehicle auras, passengers arent supposed to drop off the vehicle
  995. - me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
  996. + if (me->isGuardian())
  997. + me->RemoveAllNonPassiveAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
  998. + else
  999. + me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
  1000.  
  1001. // sometimes bosses stuck in combat?
  1002. me->DeleteThreatList();
  1003. diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
  1004. index 9cb77ac..51b1cde 100755
  1005. --- a/src/server/game/Entities/Creature/Creature.cpp
  1006. +++ b/src/server/game/Entities/Creature/Creature.cpp
  1007. @@ -612,7 +612,6 @@ void Creature::RegenerateMana()
  1008. {
  1009. float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
  1010. float Spirit = GetStat(STAT_SPIRIT);
  1011. -
  1012. addvalue = uint32((Spirit / 5.0f + 17.0f) * ManaIncreaseRate);
  1013. }
  1014. }
  1015. @@ -647,12 +646,19 @@ void Creature::RegenerateHealth()
  1016. if (GetCharmerOrOwnerGUID())
  1017. {
  1018. float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH);
  1019. - float Spirit = GetStat(STAT_SPIRIT);
  1020. + if (isGuardian())
  1021. + {
  1022. + addvalue = ((Guardian*)this)->OCTRegenHPPerSpirit() * HealthIncreaseRate;
  1023. + }
  1024. + if (!addvalue)
  1025. + {
  1026. + float Spirit = GetStat(STAT_SPIRIT);
  1027.  
  1028. - if (GetPower(POWER_MANA) > 0)
  1029. - addvalue = uint32(Spirit * 0.25 * HealthIncreaseRate);
  1030. - else
  1031. - addvalue = uint32(Spirit * 0.80 * HealthIncreaseRate);
  1032. + if (GetPower(POWER_MANA) > 0)
  1033. + addvalue = uint32(Spirit * 0.25 * HealthIncreaseRate);
  1034. + else
  1035. + addvalue = uint32(Spirit * 0.80 * HealthIncreaseRate);
  1036. + }
  1037. }
  1038. else
  1039. addvalue = maxValue/3;
  1040. diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
  1041. index aae450a..72d76f6 100755
  1042. --- a/src/server/game/Entities/Creature/TemporarySummon.cpp
  1043. +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
  1044. @@ -24,7 +24,7 @@
  1045.  
  1046. TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) :
  1047. Creature(isWorldObject), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN),
  1048. -m_timer(0), m_lifetime(0)
  1049. +m_timer(0), m_lifetime(0), m_bonusSpellDamage(0)
  1050. {
  1051. m_summonerGUID = owner ? owner->GetGUID() : 0;
  1052. m_unitTypeMask |= UNIT_MASK_SUMMON;
  1053. @@ -307,7 +307,7 @@ bool Minion::IsGuardianPet() const
  1054. }
  1055.  
  1056. Guardian::Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) : Minion(properties, owner, isWorldObject)
  1057. -, m_bonusSpellDamage(0)
  1058. +, m_meleeCrit(0), m_spellCrit(0)
  1059. {
  1060. memset(m_statFromOwner, 0, sizeof(float)*MAX_STATS);
  1061. m_unitTypeMask |= UNIT_MASK_GUARDIAN;
  1062. diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
  1063. index 6b9e6b6..4caf606 100755
  1064. --- a/src/server/game/Entities/Creature/TemporarySummon.h
  1065. +++ b/src/server/game/Entities/Creature/TemporarySummon.h
  1066. @@ -36,6 +36,8 @@ class TempSummon : public Creature
  1067. Unit* GetSummoner() const;
  1068. uint64 GetSummonerGUID() { return m_summonerGUID; }
  1069. TempSummonType const& GetSummonType() { return m_type; }
  1070. + int32 GetBonusDamage() { return m_bonusSpellDamage; }
  1071. + void SetBonusDamage(int32 damage);
  1072.  
  1073. const SummonPropertiesEntry* const m_Properties;
  1074. private:
  1075. @@ -43,6 +45,7 @@ class TempSummon : public Creature
  1076. uint32 m_timer;
  1077. uint32 m_lifetime;
  1078. uint64 m_summonerGUID;
  1079. + int32 m_bonusSpellDamage;
  1080. };
  1081.  
  1082. class Minion : public TempSummon
  1083. @@ -77,11 +80,28 @@ class Guardian : public Minion
  1084. void UpdateMaxPower(Powers power);
  1085. void UpdateAttackPowerAndDamage(bool ranged = false);
  1086. void UpdateDamagePhysical(WeaponAttackType attType);
  1087. + void UpdateSpellCritChance();
  1088. + void UpdateMeleeCritChance();
  1089.  
  1090. - int32 GetBonusDamage() { return m_bonusSpellDamage; }
  1091. - void SetBonusDamage(int32 damage);
  1092. + float GetSpellCritFromIntellect();
  1093. + float GetMeleeCritFromAgility();
  1094. + float OCTRegenHPPerSpirit();
  1095. + float OCTRegenMPPerSpirit();
  1096. +
  1097. + void RecalculatePetScalingResistance(uint32 school);
  1098. + void RecalculatePetScalingStats(Stats stat);
  1099. + void RecalculatePetScalingAttackPower();
  1100. + void RecalculatePetScalingDamageDone();
  1101. + void RecalculatePetScalingAttackSpeed(WeaponAttackType att);
  1102. + void RecalculatePetScalingHitRating();
  1103. + void RecalculatePetScalingCritRating();
  1104. + void RecalculateHappinessEffect();
  1105. +
  1106. + int32 GetSpellCrit() { return m_spellCrit; }
  1107. + int32 GetMeleeCrit() { return m_meleeCrit; }
  1108. protected:
  1109. - int32 m_bonusSpellDamage;
  1110. + float m_spellCrit;
  1111. + float m_meleeCrit;
  1112. float m_statFromOwner[MAX_STATS];
  1113. };
  1114.  
  1115. diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
  1116. index 40e59bc..2d0e1ee 100755
  1117. --- a/src/server/game/Entities/Pet/Pet.cpp
  1118. +++ b/src/server/game/Entities/Pet/Pet.cpp
  1119. @@ -210,6 +210,8 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
  1120. SetByteFlag(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_CAN_BE_ABANDONED : UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED);
  1121.  
  1122. SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
  1123. + SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.372f);
  1124. + SetFloatValue(UNIT_FIELD_COMBATREACH, DEFAULT_COMBAT_REACH);
  1125. // this enables popup window (pet abandon, cancel)
  1126. SetMaxPower(POWER_HAPPINESS, GetCreatePowers(POWER_HAPPINESS));
  1127. SetPower(POWER_HAPPINESS, fields[12].GetUInt32());
  1128. @@ -232,21 +234,6 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
  1129. SetReactState(ReactStates(fields[6].GetUInt8()));
  1130. SetCanModifyStats(true);
  1131.  
  1132. - if (getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current
  1133. - SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
  1134. - else
  1135. - {
  1136. - uint32 savedhealth = fields[10].GetUInt32();
  1137. - uint32 savedmana = fields[11].GetUInt32();
  1138. - if (!savedhealth && getPetType() == HUNTER_PET)
  1139. - setDeathState(JUST_DIED);
  1140. - else
  1141. - {
  1142. - SetHealth(savedhealth > GetMaxHealth() ? GetMaxHealth() : savedhealth);
  1143. - SetPower(POWER_MANA, savedmana > GetMaxPower(POWER_MANA) ? GetMaxPower(POWER_MANA) : savedmana);
  1144. - }
  1145. - }
  1146. -
  1147. // set current pet as current
  1148. // 0=current
  1149. // 1..MAX_PET_STABLES in stable slot
  1150. @@ -297,6 +284,24 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
  1151. CastPetAuras(current);
  1152. }
  1153.  
  1154. + if (getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current
  1155. + {
  1156. + SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
  1157. + SetHealth(GetMaxHealth());
  1158. + }
  1159. + else
  1160. + {
  1161. + uint32 savedhealth = fields[10].GetUInt32();
  1162. + uint32 savedmana = fields[11].GetUInt32();
  1163. + if (!savedhealth && getPetType() == HUNTER_PET)
  1164. + setDeathState(JUST_DIED);
  1165. + else
  1166. + {
  1167. + SetHealth(savedhealth > GetMaxHealth() ? GetMaxHealth() : savedhealth);
  1168. + SetPower(POWER_MANA, savedmana > GetMaxPower(POWER_MANA) ? GetMaxPower(POWER_MANA) : savedmana);
  1169. + }
  1170. + }
  1171. +
  1172. CleanupActionBar(); // remove unknown spells from action bar after load
  1173.  
  1174. sLog->outDebug(LOG_FILTER_PETS, "New Pet has guid %u", GetGUIDLow());
  1175. @@ -760,6 +765,297 @@ bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phas
  1176. return true;
  1177. }
  1178.  
  1179. +void Guardian::RecalculatePetScalingResistance(uint32 school)
  1180. +{
  1181. + uint32 auraId = 0;
  1182. + uint8 effIndex = EFFECT_0;
  1183. +
  1184. + switch (school)
  1185. + {
  1186. + case SPELL_SCHOOL_NORMAL:
  1187. + if (isHunterPet())
  1188. + {
  1189. + auraId = 34904;
  1190. + effIndex = EFFECT_2;
  1191. + }
  1192. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1193. + {
  1194. + auraId = 34956;
  1195. + effIndex = EFFECT_1;
  1196. + }
  1197. + break;
  1198. + case SPELL_SCHOOL_FIRE:
  1199. + if (isHunterPet())
  1200. + {
  1201. + auraId = 34903;
  1202. + effIndex = EFFECT_0;
  1203. + }
  1204. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1205. + {
  1206. + auraId = 34956;
  1207. + effIndex = EFFECT_2;
  1208. + }
  1209. + break;
  1210. + case SPELL_SCHOOL_NATURE:
  1211. + if (isHunterPet())
  1212. + {
  1213. + auraId = 34903;
  1214. + effIndex = EFFECT_2;
  1215. + }
  1216. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1217. + {
  1218. + auraId = 34957;
  1219. + effIndex = EFFECT_2;
  1220. + }
  1221. + break;
  1222. + case SPELL_SCHOOL_FROST:
  1223. + if (isHunterPet())
  1224. + {
  1225. + auraId = 34903;
  1226. + effIndex = EFFECT_1;
  1227. + }
  1228. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1229. + {
  1230. + auraId = 34957;
  1231. + effIndex = EFFECT_0;
  1232. + }
  1233. + break;
  1234. + case SPELL_SCHOOL_SHADOW:
  1235. + if (isHunterPet())
  1236. + {
  1237. + auraId = 34904;
  1238. + effIndex = EFFECT_0;
  1239. + }
  1240. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1241. + {
  1242. + auraId = 34958;
  1243. + effIndex = EFFECT_0;
  1244. + }
  1245. + break;
  1246. + case SPELL_SCHOOL_ARCANE:
  1247. + if (isHunterPet())
  1248. + {
  1249. + auraId = 34904;
  1250. + effIndex = EFFECT_1;
  1251. + }
  1252. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1253. + {
  1254. + auraId = 34957;
  1255. + effIndex = EFFECT_1;
  1256. + }
  1257. + break;
  1258. + }
  1259. +
  1260. + if (!auraId)
  1261. + return;
  1262. +
  1263. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1264. + aurEffect->RecalculateAmount();
  1265. +}
  1266. +
  1267. +void Guardian::RecalculatePetScalingStats(Stats stat)
  1268. +{
  1269. + if (stat >= MAX_STATS)
  1270. + return;
  1271. +
  1272. + uint32 auraId = 0;
  1273. + uint8 effIndex = EFFECT_0;
  1274. +
  1275. + switch (stat)
  1276. + {
  1277. + case STAT_STAMINA:
  1278. + if (IsPetGhoul())
  1279. + {
  1280. + auraId = 54566;
  1281. + effIndex = EFFECT_0;
  1282. + }
  1283. + else if (isHunterPet())
  1284. + {
  1285. + auraId = 34902;
  1286. + effIndex = EFFECT_0;
  1287. + }
  1288. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1289. + {
  1290. + auraId = 34947;
  1291. + effIndex = EFFECT_0;
  1292. + }
  1293. + break;
  1294. + case STAT_STRENGTH:
  1295. + if (IsPetGhoul())
  1296. + {
  1297. + auraId = 54566;
  1298. + effIndex = EFFECT_1;
  1299. + }
  1300. + break;
  1301. + case STAT_INTELLECT:
  1302. + if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1303. + {
  1304. + auraId = 34956;
  1305. + effIndex = EFFECT_0;
  1306. + }
  1307. + break;
  1308. + }
  1309. +
  1310. + if (!auraId)
  1311. + return;
  1312. +
  1313. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1314. + aurEffect->RecalculateAmount();
  1315. +}
  1316. +
  1317. +void Guardian::RecalculatePetScalingAttackPower()
  1318. +{
  1319. + uint32 auraId = 0;
  1320. + uint8 effIndex = EFFECT_0;
  1321. +
  1322. + if (isHunterPet())
  1323. + {
  1324. + auraId = 34902;
  1325. + effIndex = EFFECT_1;
  1326. + }
  1327. + else if (IsPetGhoul())
  1328. + {
  1329. + auraId = 0;
  1330. + effIndex = EFFECT_0;
  1331. + }
  1332. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1333. + {
  1334. + auraId = 34947;
  1335. + effIndex = EFFECT_1;
  1336. + }
  1337. +
  1338. + if (!auraId)
  1339. + return;
  1340. +
  1341. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1342. + aurEffect->RecalculateAmount();
  1343. +}
  1344. +
  1345. +void Guardian::RecalculatePetScalingDamageDone()
  1346. +{
  1347. + uint32 auraId = 0;
  1348. + uint8 effIndex = EFFECT_0;
  1349. +
  1350. + if (isHunterPet())
  1351. + {
  1352. + auraId = 34902;
  1353. + effIndex = EFFECT_2;
  1354. + }
  1355. + else if (IsPetGhoul())
  1356. + {
  1357. + auraId = 54566;
  1358. + effIndex = EFFECT_2;
  1359. + }
  1360. + else if (GetEntry() == 27893)
  1361. + {
  1362. + auraId = 51906;
  1363. + effIndex = EFFECT_0;
  1364. + }
  1365. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1366. + {
  1367. + auraId = 34947;
  1368. + effIndex = EFFECT_2;
  1369. + }
  1370. +
  1371. + if (!auraId)
  1372. + return;
  1373. +
  1374. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1375. + aurEffect->RecalculateAmount();
  1376. +}
  1377. +
  1378. +void Guardian::RecalculatePetScalingAttackSpeed(WeaponAttackType att)
  1379. +{
  1380. + uint32 auraId = 0;
  1381. + uint8 effIndex = EFFECT_0;
  1382. +
  1383. + if (IsPetGhoul())
  1384. + {
  1385. + auraId = 51996;
  1386. + effIndex = EFFECT_1;
  1387. + }
  1388. + else if (GetEntry() == 27893)
  1389. + {
  1390. + auraId = 51906;
  1391. + effIndex = EFFECT_1;
  1392. + }
  1393. +
  1394. + if (!auraId)
  1395. + return;
  1396. +
  1397. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1398. + aurEffect->RecalculateAmount();
  1399. +}
  1400. +
  1401. +void Guardian::RecalculatePetScalingHitRating()
  1402. +{
  1403. + uint32 auraId = 0;
  1404. +
  1405. + if (isHunterPet())
  1406. + {
  1407. + auraId = 61017;
  1408. + }
  1409. + else if (IsPetGhoul() || GetEntry() == 27829)
  1410. + {
  1411. + auraId = 61697;
  1412. + }
  1413. + else if (GetEntry() == 29264)
  1414. + {
  1415. + auraId = 61783;
  1416. + }
  1417. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1418. + {
  1419. + auraId = 61013;
  1420. + }
  1421. +
  1422. + if (!auraId)
  1423. + return;
  1424. +
  1425. + if (Aura* aura = GetAura(auraId))
  1426. + aura->RecalculateAmountOfEffects();
  1427. +}
  1428. +
  1429. +void Guardian::RecalculatePetScalingCritRating()
  1430. +{
  1431. + uint32 auraId = 0;
  1432. + uint8 effIndex = EFFECT_0;
  1433. +
  1434. + if (isHunterPet())
  1435. + {
  1436. + auraId = 0;
  1437. + effIndex = EFFECT_0;
  1438. + }
  1439. + else if (m_owner && m_owner->getClass() == CLASS_WARLOCK)
  1440. + {
  1441. + auraId = 35695;
  1442. + effIndex = EFFECT_1;
  1443. + }
  1444. +
  1445. + if (!auraId)
  1446. + return;
  1447. +
  1448. + if (Aura* aura = GetAura(auraId))
  1449. + aura->RecalculateAmountOfEffects();
  1450. +}
  1451. +
  1452. +void Guardian::RecalculateHappinessEffect()
  1453. +{
  1454. + uint32 auraId = 0;
  1455. + uint8 effIndex = EFFECT_0;
  1456. +
  1457. + if (isHunterPet())
  1458. + {
  1459. + auraId = 8875;
  1460. + effIndex = EFFECT_0;
  1461. + }
  1462. +
  1463. + if (!auraId)
  1464. + return;
  1465. +
  1466. + if (AuraEffect* aurEffect = GetAuraEffect(auraId, effIndex))
  1467. + aurEffect->RecalculateAmount();
  1468. +}
  1469. +
  1470. // TODO: Move stat mods code to pet passive auras
  1471. bool Guardian::InitStatsForLevel(uint8 petlevel)
  1472. {
  1473. @@ -829,6 +1125,9 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1474.  
  1475. for (uint8 stat = 0; stat < MAX_STATS; ++stat)
  1476. SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
  1477. +
  1478. + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, pInfo->mindmg);
  1479. + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, pInfo->maxdmg);
  1480. }
  1481. else // not exist in DB, use some default fake data
  1482. {
  1483. @@ -842,6 +1141,9 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1484. SetCreateStat(STAT_STAMINA, 25);
  1485. SetCreateStat(STAT_INTELLECT, 28);
  1486. SetCreateStat(STAT_SPIRIT, 27);
  1487. +
  1488. + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1489. + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1490. }
  1491.  
  1492. SetBonusDamage(0);
  1493. @@ -849,43 +1151,17 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1494. {
  1495. case SUMMON_PET:
  1496. {
  1497. - //bonusAP += val * 0.57;
  1498. - float minDamage = 0.0f;
  1499. - float maxDamage = 0.0f;
  1500. - float attackPower = 0.0f;
  1501. - float multiplier = exp((float)petlevel/41);
  1502. - switch (GetEntry())
  1503. - {
  1504. - case 417: // Felhunter
  1505. - minDamage = (petlevel - (petlevel / 4)) * multiplier * 1.6f;
  1506. - maxDamage = (petlevel + (petlevel / 4)) * multiplier * 1.6f;
  1507. - attackPower = ((minDamage + maxDamage) /4)*7;
  1508. - break;
  1509. - case 1863: // Succubus
  1510. - minDamage = (petlevel - (petlevel / 4)) * multiplier * 1.7f;
  1511. - maxDamage = (petlevel + (petlevel / 4)) * multiplier * 1.7f;
  1512. - attackPower = ((minDamage + maxDamage) /4)*7;
  1513. - break;
  1514. - case 17252: // Felguard
  1515. - minDamage = (petlevel - (petlevel / 4)) * multiplier * 2.5f;
  1516. - maxDamage = (petlevel + (petlevel / 4)) * multiplier * 2.5f;
  1517. - attackPower = ((minDamage + maxDamage) /4)*7;
  1518. - break;
  1519. - case 11859: // Doomguard
  1520. - minDamage = (petlevel - (petlevel / 4)) * multiplier * 2.5f;
  1521. - maxDamage = (petlevel + (petlevel / 4)) * multiplier * 2.5f;
  1522. - attackPower = ((minDamage + maxDamage) /4)*7;
  1523. - break;
  1524. - default:
  1525. - minDamage = (petlevel - (petlevel / 4)) * multiplier;
  1526. - maxDamage = (petlevel + (petlevel / 4)) * multiplier;
  1527. - attackPower = ((minDamage + maxDamage) /4)*7;
  1528. - break;
  1529. - }
  1530. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  1531. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  1532. - SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  1533. - SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE) + float(m_owner->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor)
  1534. + /*float mod = 1;
  1535. + if (petlevel < 60)
  1536. + mod = 1;
  1537. + else if (petlevel < 70)
  1538. + mod = 2 + (petlevel-70)/10;
  1539. + else
  1540. + mod = 5 + (petlevel-80)/4;
  1541. + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel - (petlevel / 4))*mod));
  1542. + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel + (petlevel / 4))*mod));
  1543. +
  1544. + //SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, float(cinfo->attackpower));*/
  1545. break;
  1546. }
  1547. case HUNTER_PET:
  1548. @@ -893,9 +1169,9 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1549. SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr->GetXPForLevel(petlevel)*PET_XP_FACTOR));
  1550. //these formula may not be correct; however, it is designed to be close to what it should be
  1551. //this makes dps 0.5 of pets level
  1552. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1553. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1554. //damage range is then petlevel / 2
  1555. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1556. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1557. //damage is increased afterwards as strength and pet scaling modify attack power
  1558. break;
  1559. }
  1560. @@ -913,8 +1189,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1561. if (!pInfo)
  1562. SetCreateHealth(30 + 30*petlevel);
  1563. float bonusDmg = m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_NATURE) * 0.15f;
  1564. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2) + bonusDmg));
  1565. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2) + bonusDmg));
  1566. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2) + bonusDmg));
  1567. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2) + bonusDmg));
  1568. break;
  1569. }
  1570. case 15352: //earth elemental 36213
  1571. @@ -922,8 +1198,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1572. if (!pInfo)
  1573. SetCreateHealth(100 + 120*petlevel);
  1574. SetBonusDamage(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_NATURE) * 0.15f);
  1575. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (float(petlevel - (petlevel / 4)) * exp((float)petlevel/41))*0.9f);
  1576. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (float(petlevel + (petlevel / 4)) * exp((float)petlevel/41))*0.9f);
  1577. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1578. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1579. break;
  1580. }
  1581. case 15438: //fire elemental
  1582. @@ -934,8 +1210,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1583. SetCreateMana(28 + 10*petlevel);
  1584. }
  1585. SetBonusDamage(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) * 0.5f);
  1586. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)) * exp((float)petlevel/41));
  1587. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)) * exp((float)petlevel/41));
  1588. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel));
  1589. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
  1590. break;
  1591. }
  1592. case 19668: // Shadowfiend
  1593. @@ -946,8 +1222,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1594. SetCreateHealth(28 + 30*petlevel);
  1595. }
  1596. int32 bonus_dmg = (int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_SHADOW)* 0.3f));
  1597. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + bonus_dmg));
  1598. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + bonus_dmg));
  1599. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + bonus_dmg));
  1600. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + bonus_dmg));
  1601.  
  1602. break;
  1603. }
  1604. @@ -975,13 +1251,15 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1605. SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier));
  1606.  
  1607. // 14AP == 1dps, wolf's strike speed == 2s so dmg = basedmg + AP / 14 * 2
  1608. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier * 2 / 14)));
  1609. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier * 2 / 14)));
  1610. -
  1611. - SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE) + float(m_owner->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor)
  1612. - SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(m_owner->GetStat(STAT_STAMINA)) * 0.3f); // Bonus Stamina (30% of player stamina)
  1613. - if (!HasAura(58877))//prevent apply twice for the 2 wolves
  1614. - AddAura(58877, this);//Spirit Hunt, passive, Spirit Wolves' attacks heal them and their master for 150% of damage done.
  1615. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier * 2 / 14)));
  1616. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier * 2 / 14)));
  1617. +
  1618. + SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(m_owner->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor)
  1619. + SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(m_owner->GetStat(STAT_STAMINA)) * 0.3f); // Bonus Stamina (30% of player stamina)
  1620. + if (!HasAura(58877)) //prevent apply twice for the 2 wolves
  1621. + AddAura(58877, this); //Spirit Hunt, passive, Spirit Wolves' attacks heal them and their master for 150% of damage done.
  1622. + if (!HasAura(61783)) // prevent apply twice for the 2 wolves
  1623. + AddAura(61783, this); // Feral Pet Scaling
  1624. break;
  1625. }
  1626. case 31216: // Mirror Image
  1627. @@ -1002,51 +1280,128 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
  1628. SetCreateMana(28 + 10*petlevel);
  1629. SetCreateHealth(28 + 30*petlevel);
  1630. }
  1631. - SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.4f));
  1632. + SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f));
  1633. SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1634. SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1635. + ApplyCastTimePercentMod((1-m_owner->m_modAttackSpeedPct[BASE_ATTACK])*100, true);
  1636. + RemoveAurasDueToSpell(61697);
  1637. + CastSpell(this, 61697, true);
  1638. + RemoveAurasDueToSpell(62137);
  1639. + CastSpell(this, 62137, true);
  1640. break;
  1641. }
  1642. - case 12922: // Imp Minion
  1643. case 8996: // Voidwalker Minion
  1644. case 2676: // Compact Harvest Repair
  1645. + case 24476: // Minor Voidwalker
  1646. {
  1647. - SetLevel(m_owner->getLevel());
  1648. SetCreateMana(28 + 10 * petlevel);
  1649. SetCreateHealth(28 + 30 * petlevel);
  1650. - SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f));
  1651. - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)) * exp((float)petlevel/41));
  1652. - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)) * exp((float)petlevel/41));
  1653. + //SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
  1654. + //SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
  1655. break;
  1656. }
  1657. - case 11859: // Doomguard
  1658. + case 28017: // Bloodworm
  1659. {
  1660. - float attackPower = 0;
  1661. - float minDamage = (petlevel - (petlevel / 4)) * exp((float)petlevel/41) * 3.0f;
  1662. - float maxDamage = (petlevel + (petlevel / 4)) * exp((float)petlevel/41) * 3.0f;
  1663. - attackPower = ((minDamage + maxDamage) /4) * 7;
  1664. + float minDamage = (petlevel - (petlevel / 4)) * 0.30f;
  1665. + float maxDamage = (petlevel + (petlevel / 4)) * 0.30f;
  1666. + SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.006f));
  1667. SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  1668. SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  1669. - SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  1670. - SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE) + float(m_owner->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor)
  1671. - SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(m_owner->GetStat(STAT_STAMINA)) * 0.3f); // Bonus Stamina (30% of player stamina)
  1672. - SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_HOLY)) * 0.4f);
  1673. - SetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_FIRE)) * 0.4f);
  1674. - SetModifierValue(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_NATURE)) * 0.4f);
  1675. - SetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_FROST)) * 0.4f);
  1676. - SetModifierValue(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_SHADOW)) * 0.4f);
  1677. - SetModifierValue(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, GetModifierValue(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE) + float(m_owner->GetResistance(SPELL_SCHOOL_ARCANE)) * 0.4f);
  1678. - SetModifierValue(UNIT_MOD_STAT_INTELLECT, BASE_VALUE, float(m_owner->GetStat(STAT_INTELLECT)) * 0.3f);
  1679. break;
  1680. }
  1681. - case 28017: // Bloodworm
  1682. + case 27893: // Dancing Rune Weapon
  1683. {
  1684. - float attackPower = 0;
  1685. - float minDamage = (petlevel - (petlevel / 4)) * exp((float)petlevel/41) * 0.25f;
  1686. - float maxDamage = (petlevel + (petlevel / 4)) * exp((float)petlevel/41) * 0.25f;
  1687. - SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.006f));
  1688. + SetReducedThreatPercent(100, m_owner->GetGUID());
  1689. + RemoveAurasDueToSpell(61697);
  1690. + CastSpell(this, 61697, true);
  1691. + RemoveAurasDueToSpell(51906);
  1692. + CastSpell(this, 51906, true);
  1693. + RemoveAurasDueToSpell(62137);
  1694. + CastSpell(this, 62137, true);
  1695. + break;
  1696. + }
  1697. + case 26125: // Risen Ghoul
  1698. + {
  1699. + RemoveAurasDueToSpell(61697);
  1700. + CastSpell(this, 61697, true);
  1701. + RemoveAurasDueToSpell(54566);
  1702. + CastSpell(this, 54566, true);
  1703. + RemoveAurasDueToSpell(51996);
  1704. + CastSpell(this, 51996, true);
  1705. + RemoveAurasDueToSpell(62137);
  1706. + CastSpell(this, 62137, true);
  1707. + break;
  1708. + }
  1709. + case 89: // Infernal
  1710. + {
  1711. + if (m_owner->GetTypeId() == TYPEID_PLAYER)
  1712. + {
  1713. + int32 fire = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  1714. + int32 shadow = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
  1715. + int32 maximum = (fire > shadow) ? fire : shadow;
  1716. + if (maximum < 0)
  1717. + maximum = 0;
  1718. + SetBonusDamage(int32(maximum * 0.15f));
  1719. + }
  1720. + float mod = 1;
  1721. + if (petlevel < 60)
  1722. + mod = 5 + (petlevel-50)/4;
  1723. + if (petlevel < 70)
  1724. + mod = 10 + (petlevel-70)/4;
  1725. + else
  1726. + mod = 15 + (petlevel-80)/2;
  1727. + if (mod < 0)
  1728. + mod = 0;
  1729. + float minDamage = (petlevel - (petlevel / 4))*mod;
  1730. + float maxDamage = (petlevel + (petlevel / 4))*mod;
  1731. + float attackPower = ((minDamage + maxDamage) /4)*7;
  1732. SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  1733. SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  1734. + SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  1735. + break;
  1736. + }
  1737. + case 11859: // Doomguard
  1738. + {
  1739. + if (m_owner->GetTypeId() == TYPEID_PLAYER)
  1740. + {
  1741. + int32 fire = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  1742. + int32 shadow = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
  1743. + int32 maximum = (fire > shadow) ? fire : shadow;
  1744. + if (maximum < 0)
  1745. + maximum = 0;
  1746. + SetBonusDamage(int32(maximum * 0.15f));
  1747. + }
  1748. + if (!pInfo) // not exist in DB
  1749. + {
  1750. + // remove elite bonuses included in DB values
  1751. + CreatureTemplate const *cinfo = GetCreatureInfo();
  1752. + CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class);
  1753. + SetCreateHealth(stats->BaseHealth[cinfo->expansion]);
  1754. + SetCreateMana(stats->BaseMana);
  1755. +
  1756. + SetStat(STAT_STRENGTH, 22);
  1757. + SetStat(STAT_AGILITY, 22);
  1758. + SetStat(STAT_STAMINA, 25);
  1759. + SetStat(STAT_INTELLECT, 28);
  1760. + SetStat(STAT_SPIRIT, 27);
  1761. + }
  1762. + float mod = 1;
  1763. + if (petlevel < 70)
  1764. + mod = 10 + (petlevel-70)/2;
  1765. + else
  1766. + mod = 20 + (petlevel-80);
  1767. + if (mod < 0)
  1768. + mod = 0;
  1769. + float minDamage = (petlevel - (petlevel / 4))*mod;
  1770. + float maxDamage = (petlevel + (petlevel / 4))*mod;
  1771. + float attackPower = ((minDamage + maxDamage) /4)*7;
  1772. + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  1773. + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  1774. + SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  1775. + RemoveAurasDueToSpell(32233);
  1776. + CastSpell(this, 32233, true);
  1777. + RemoveAurasDueToSpell(35695);
  1778. + CastSpell(this, 35695, true);
  1779. break;
  1780. }
  1781. }
  1782. @@ -1986,6 +2341,14 @@ void Pet::CastPetAuras(bool current)
  1783. else
  1784. CastPetAura(pa);
  1785. }
  1786. +
  1787. + if (IsPetGhoul())
  1788. + {
  1789. + RemoveAurasDueToSpell(61697);
  1790. + CastSpell(this, 61697, true);
  1791. + RemoveAurasDueToSpell(62137);
  1792. + CastSpell(this, 62137, true);
  1793. + }
  1794. }
  1795.  
  1796. void Pet::CastPetAura(PetAura const* aura)
  1797. diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
  1798. index 68b6aa3..56e72a2 100755
  1799. --- a/src/server/game/Entities/Unit/StatSystem.cpp
  1800. +++ b/src/server/game/Entities/Unit/StatSystem.cpp
  1801. @@ -64,9 +64,7 @@ bool Player::UpdateStats(Stats stat)
  1802.  
  1803. if (stat == STAT_STAMINA || stat == STAT_INTELLECT || stat == STAT_STRENGTH)
  1804. {
  1805. - Pet* pet = GetPet();
  1806. - if (pet)
  1807. - pet->UpdateStats(stat);
  1808. + RecalculatePetsScalingStats(stat);
  1809. }
  1810.  
  1811. switch (stat)
  1812. @@ -150,6 +148,8 @@ void Player::UpdateSpellDamageAndHealingBonus()
  1813. // Get damage bonus for all schools
  1814. for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
  1815. SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonus(SpellSchoolMask(1 << i)));
  1816. + RecalculatePetsScalingAttackPower();
  1817. + RecalculatePetsScalingDamageDone();
  1818. }
  1819.  
  1820. bool Player::UpdateAllStats()
  1821. @@ -191,9 +191,7 @@ void Player::UpdateResistances(uint32 school)
  1822. float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
  1823. SetResistance(SpellSchools(school), int32(value));
  1824.  
  1825. - Pet* pet = GetPet();
  1826. - if (pet)
  1827. - pet->UpdateResistances(school);
  1828. + RecalculatePetsScalingResistance(school);
  1829. }
  1830. else
  1831. UpdateArmor();
  1832. @@ -221,9 +219,7 @@ void Player::UpdateArmor()
  1833.  
  1834. SetArmor(int32(value));
  1835.  
  1836. - Pet* pet = GetPet();
  1837. - if (pet)
  1838. - pet->UpdateArmor();
  1839. + RecalculatePetsScalingResistance(SPELL_SCHOOL_NORMAL);
  1840.  
  1841. UpdateAttackPowerAndDamage(); // armor dependent auras update for SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR
  1842. }
  1843. @@ -448,8 +444,6 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
  1844. if (ranged)
  1845. {
  1846. UpdateDamagePhysical(RANGED_ATTACK);
  1847. - if (pet && pet->isHunterPet()) // At ranged attack change for hunter pet
  1848. - pet->UpdateAttackPowerAndDamage();
  1849. }
  1850. else
  1851. {
  1852. @@ -458,10 +452,10 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
  1853. UpdateDamagePhysical(OFF_ATTACK);
  1854. if (getClass() == CLASS_SHAMAN || getClass() == CLASS_PALADIN) // mental quickness
  1855. UpdateSpellDamageAndHealingBonus();
  1856. -
  1857. - if (pet && pet->IsPetGhoul()) // At ranged attack change for hunter pet
  1858. - pet->UpdateAttackPowerAndDamage();
  1859. }
  1860. +
  1861. + RecalculatePetsScalingAttackPower();
  1862. + RecalculatePetsScalingDamageDone();
  1863. }
  1864.  
  1865. void Player::UpdateShieldBlockValue()
  1866. @@ -785,12 +779,14 @@ void Player::UpdateSpellHitChances()
  1867. {
  1868. m_modSpellHitChance = (float)GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  1869. m_modSpellHitChance += GetRatingBonusValue(CR_HIT_SPELL);
  1870. + RecalculatePetsScalingHitRating();
  1871. }
  1872.  
  1873. void Player::UpdateAllSpellCritChances()
  1874. {
  1875. for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
  1876. UpdateSpellCritChance(i);
  1877. + RecalculatePetsScalingCritRating();
  1878. }
  1879.  
  1880. void Player::UpdateExpertise(WeaponAttackType attack)
  1881. @@ -1077,8 +1073,8 @@ bool Guardian::UpdateStats(Stats stat)
  1882. return false;
  1883.  
  1884. // value = ((base_value * base_pct) + total_value) * total_pct
  1885. - float value = GetTotalStatValue(stat);
  1886. - ApplyStatBuffMod(stat, m_statFromOwner[stat], false);
  1887. + float value = GetTotalStatValue(stat);
  1888. + /*ApplyStatBuffMod(stat, m_statFromOwner[stat], false);
  1889. float ownersBonus = 0.0f;
  1890.  
  1891. Unit* owner = GetOwner();
  1892. @@ -1088,8 +1084,8 @@ bool Guardian::UpdateStats(Stats stat)
  1893. {
  1894. switch (stat)
  1895. {
  1896. - case STAT_STAMINA: mod = 0.3f; break; // Default Owner's Stamina scale
  1897. - case STAT_STRENGTH: mod = 0.7f; break; // Default Owner's Strength scale
  1898. + case STAT_STAMINA: mod = 0.3f; break; // Default Owner's Stamina scale
  1899. + case STAT_STRENGTH: mod = 0.7f; break; // Default Owner's Strength scale
  1900. default: break;
  1901. }
  1902. // Ravenous Dead
  1903. @@ -1098,13 +1094,13 @@ bool Guardian::UpdateStats(Stats stat)
  1904. aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
  1905. if (aurEff)
  1906. {
  1907. - SpellInfo const* spellInfo = aurEff->GetSpellInfo(); // Then get the SpellProto and add the dummy effect value
  1908. - AddPctN(mod, spellInfo->Effects[EFFECT_1].CalcValue()); // Ravenous Dead edits the original scale
  1909. + SpellInfo const* spellInfo = aurEff->GetSpellInfo(); // Then get the SpellProto and add the dummy effect value
  1910. + AddPctN(mod, spellInfo->Effects[EFFECT_1].CalcValue()); // Ravenous Dead edits the original scale
  1911. }
  1912. // Glyph of the Ghoul
  1913. aurEff = owner->GetAuraEffect(58686, 0);
  1914. if (aurEff)
  1915. - mod += CalculatePctN(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
  1916. + mod += CalculatePctN(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
  1917. ownersBonus = float(owner->GetStat(stat)) * mod;
  1918. value += ownersBonus;
  1919. }
  1920. @@ -1122,9 +1118,9 @@ bool Guardian::UpdateStats(Stats stat)
  1921. {
  1922. PetSpellMap::const_iterator itr = (ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
  1923. if (itr == ToPet()->m_spells.end())
  1924. - itr = ToPet()->m_spells.find(62762); // Wild Hunt rank 2
  1925. + itr = ToPet()->m_spells.find(62762); // Wild Hunt rank 2
  1926.  
  1927. - if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
  1928. + if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
  1929. {
  1930. SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
  1931. AddPctN(mod, spellInfo->Effects[EFFECT_0].CalcValue());
  1932. @@ -1144,23 +1140,31 @@ bool Guardian::UpdateStats(Stats stat)
  1933. }
  1934. }
  1935. /*
  1936. - else if (stat == STAT_STRENGTH)
  1937. - {
  1938. - if (IsPetGhoul())
  1939. - value += float(owner->GetStat(stat)) * 0.3f;
  1940. - }
  1941. +else if (stat == STAT_STRENGTH)
  1942. +{
  1943. +if (IsPetGhoul())
  1944. +value += float(owner->GetStat(stat)) * 0.3f;
  1945. +}
  1946. */
  1947.  
  1948. SetStat(stat, int32(value));
  1949. - m_statFromOwner[stat] = ownersBonus;
  1950. - ApplyStatBuffMod(stat, m_statFromOwner[stat], true);
  1951. + //m_statFromOwner[stat] = ownersBonus;
  1952. + //ApplyStatBuffMod(stat, m_statFromOwner[stat], true);
  1953.  
  1954. switch (stat)
  1955. {
  1956. - case STAT_STRENGTH: UpdateAttackPowerAndDamage(); break;
  1957. - case STAT_AGILITY: UpdateArmor(); break;
  1958. - case STAT_STAMINA: UpdateMaxHealth(); break;
  1959. - case STAT_INTELLECT: UpdateMaxPower(POWER_MANA); break;
  1960. + case STAT_STRENGTH:
  1961. + UpdateAttackPowerAndDamage();
  1962. + break;
  1963. + case STAT_AGILITY:
  1964. + UpdateArmor();
  1965. + UpdateMeleeCritChance();
  1966. + break;
  1967. + case STAT_STAMINA: UpdateMaxHealth(); break;
  1968. + case STAT_INTELLECT:
  1969. + UpdateMaxPower(POWER_MANA);
  1970. + UpdateSpellCritChance();
  1971. + break;
  1972. case STAT_SPIRIT:
  1973. default:
  1974. break;
  1975. @@ -1193,8 +1197,8 @@ void Guardian::UpdateResistances(uint32 school)
  1976. float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
  1977.  
  1978. // hunter and warlock pets gain 40% of owner's resistance
  1979. - if (isPet())
  1980. - value += float(CalculatePctN(m_owner->GetResistance(SpellSchools(school)), 40));
  1981. + //if (isPet() && !IsPetGhoul())
  1982. + // value += float(CalculatePctN(m_owner->GetResistance(SpellSchools(school)), 40));
  1983.  
  1984. SetResistance(SpellSchools(school), int32(value));
  1985. }
  1986. @@ -1209,13 +1213,14 @@ void Guardian::UpdateArmor()
  1987. UnitMods unitMod = UNIT_MOD_ARMOR;
  1988.  
  1989. // hunter and warlock pets gain 35% of owner's armor value
  1990. - if (isPet())
  1991. - bonus_armor = float(CalculatePctN(m_owner->GetArmor(), 35));
  1992. + //if (isPet() && !IsPetGhoul())
  1993. + // bonus_armor = float(CalculatePctN(m_owner->GetArmor(), 35));
  1994.  
  1995. value = GetModifierValue(unitMod, BASE_VALUE);
  1996. value *= GetModifierValue(unitMod, BASE_PCT);
  1997. value += GetStat(STAT_AGILITY) * 2.0f;
  1998. - value += GetModifierValue(unitMod, TOTAL_VALUE) + bonus_armor;
  1999. + value += GetModifierValue(unitMod, TOTAL_VALUE);
  2000. + //value += GetModifierValue(unitMod, TOTAL_VALUE) + bonus_armor;
  2001. value *= GetModifierValue(unitMod, TOTAL_PCT);
  2002.  
  2003. SetArmor(int32(value));
  2004. @@ -1231,22 +1236,19 @@ void Guardian::UpdateMaxHealth()
  2005. {
  2006. case ENTRY_IMP: multiplicator = 8.4f; break;
  2007. case ENTRY_VOIDWALKER: multiplicator = 11.0f; break;
  2008. - case ENTRY_SUCCUBUS: multiplicator = 9.1f; break;
  2009. + case ENTRY_SUCCUBUS: multiplicator = 9.0f; break;
  2010. case ENTRY_FELHUNTER: multiplicator = 9.5f; break;
  2011. case ENTRY_FELGUARD: multiplicator = 11.0f; break;
  2012. default: multiplicator = 10.0f; break;
  2013. }
  2014.  
  2015. + if (m_owner->GetTypeId() != TYPEID_PLAYER && !m_owner->isTotem())
  2016. + multiplicator = 0.0f;
  2017. +
  2018. float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
  2019. value *= GetModifierValue(unitMod, BASE_PCT);
  2020. value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
  2021. value *= GetModifierValue(unitMod, TOTAL_PCT);
  2022. -
  2023. - if (GetEntry() == ENTRY_GHOUL || GetEntry() == ENTRY_RISEN_ALLY)
  2024. - {
  2025. - stamina = GetStat(STAT_STAMINA);
  2026. - value = stamina * multiplicator;
  2027. - }
  2028. SetMaxHealth((uint32)value);
  2029. }
  2030.  
  2031. @@ -1284,12 +1286,19 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
  2032. float bonusAP = 0.0f;
  2033. UnitMods unitMod = UNIT_MOD_ATTACK_POWER;
  2034.  
  2035. + val = GetStat(STAT_STRENGTH) - 20.0f;
  2036. +
  2037. + /*
  2038. + float val = 0.0f;
  2039. + float bonusAP = 0.0f;
  2040. + UnitMods unitMod = UNIT_MOD_ATTACK_POWER;
  2041. +
  2042. if (GetEntry() == ENTRY_IMP) // imp's attack power
  2043. val = GetStat(STAT_STRENGTH) - 10.0f;
  2044. else if (GetEntry() == ENTRY_GHOUL)
  2045. - val = GetStat(STAT_STRENGTH) + 138.0f; // ghoul attack power
  2046. + val = 2 * (GetStat(STAT_STRENGTH) - 10); // ghoul attack power
  2047. else
  2048. - val = 2 * GetStat(STAT_STRENGTH) - 20.0f;
  2049. + val = 2 * (GetStat(STAT_STRENGTH) - 20.0f);
  2050.  
  2051. Unit* owner = GetOwner();
  2052. if (owner && owner->GetTypeId() == TYPEID_PLAYER)
  2053. @@ -1336,25 +1345,19 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
  2054. frost = 0;
  2055. SetBonusDamage(int32(frost * 0.4f));
  2056. }
  2057. - }
  2058. + }*/
  2059. + uint32 entry = isHunterPet() ? 1 : GetEntry();
  2060. + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(entry, getLevel());
  2061. + if (pInfo) // exist in DB
  2062. + val += pInfo->attackpower;
  2063.  
  2064. - SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, val + bonusAP);
  2065. + SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, val);
  2066.  
  2067. //in BASE_VALUE of UNIT_MOD_ATTACK_POWER for creatures we store data of meleeattackpower field in DB
  2068. float base_attPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT);
  2069. float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
  2070. float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
  2071.  
  2072. - // Glyph of Felguard
  2073. - if (GetEntry() == 17252)
  2074. - {
  2075. - if (owner->HasAura(56246))
  2076. - {
  2077. - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(56246); // Then get the SpellProto and add the dummy effect value
  2078. - attPowerMultiplier += CalculatePctN(1.0f, spellInfo->Effects[1].MiscValue);
  2079. - }
  2080. - }
  2081. -
  2082. //UNIT_FIELD_(RANGED)_ATTACK_POWER field
  2083. SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)base_attPower);
  2084. //UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field
  2085. @@ -1374,19 +1377,24 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
  2086. float bonusDamage = 0.0f;
  2087. if (m_owner->GetTypeId() == TYPEID_PLAYER)
  2088. {
  2089. - //force of nature
  2090. - if (GetEntry() == ENTRY_TREANT)
  2091. + switch (GetEntry())
  2092. {
  2093. - int32 spellDmg = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_NATURE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_NATURE);
  2094. - if (spellDmg > 0)
  2095. - bonusDamage = spellDmg * 0.09f;
  2096. - }
  2097. - //greater fire elemental
  2098. - else if (GetEntry() == ENTRY_FIRE_ELEMENTAL)
  2099. - {
  2100. - int32 spellDmg = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  2101. - if (spellDmg > 0)
  2102. - bonusDamage = spellDmg * 0.4f;
  2103. + //force of nature
  2104. + case ENTRY_TREANT:
  2105. + {
  2106. + int32 spellDmg = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_NATURE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_NATURE);
  2107. + if (spellDmg > 0)
  2108. + bonusDamage = spellDmg * 0.09f;
  2109. + break;
  2110. + }
  2111. + //greater fire elemental
  2112. + case ENTRY_FIRE_ELEMENTAL:
  2113. + {
  2114. + int32 spellDmg = int32(m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  2115. + if (spellDmg > 0)
  2116. + bonusDamage = spellDmg * 0.4f;
  2117. + break;
  2118. + }
  2119. }
  2120. }
  2121.  
  2122. @@ -1394,7 +1402,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
  2123.  
  2124. float att_speed = float(GetAttackTime(BASE_ATTACK))/1000.0f;
  2125.  
  2126. - float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType)/ 14.0f * att_speed + bonusDamage;
  2127. + float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType)/ 14.0f * att_speed + bonusDamage;
  2128. float base_pct = GetModifierValue(unitMod, BASE_PCT);
  2129. float total_value = GetModifierValue(unitMod, TOTAL_VALUE);
  2130. float total_pct = GetModifierValue(unitMod, TOTAL_PCT);
  2131. @@ -1406,7 +1414,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
  2132. float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct;
  2133.  
  2134. // Pet's base damage changes depending on happiness
  2135. - if (isHunterPet() && attType == BASE_ATTACK)
  2136. + /*if (isHunterPet() && attType == BASE_ATTACK)
  2137. {
  2138. switch (ToPet()->GetHappinessState())
  2139. {
  2140. @@ -1424,7 +1432,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
  2141. maxdamage = maxdamage * 0.75f;
  2142. break;
  2143. }
  2144. - }
  2145. + }*/
  2146.  
  2147. Unit::AuraEffectList const& mDummy = GetAuraEffectsByType(SPELL_AURA_MOD_ATTACKSPEED);
  2148. for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
  2149. @@ -1445,11 +1453,100 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
  2150. SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage);
  2151. }
  2152.  
  2153. -void Guardian::SetBonusDamage(int32 damage)
  2154. +void TempSummon::SetBonusDamage(int32 damage)
  2155. {
  2156. + Player* player = GetCharmerOrOwnerPlayerOrPlayerItself();
  2157. + if (!player)
  2158. + return;
  2159. + player->ApplyModUInt32Value(PLAYER_PET_SPELL_POWER, m_bonusSpellDamage, false);
  2160. m_bonusSpellDamage = damage;
  2161. - if (GetOwner()->GetTypeId() == TYPEID_PLAYER)
  2162. - GetOwner()->SetUInt32Value(PLAYER_PET_SPELL_POWER, damage);
  2163. + player->ApplyModUInt32Value(PLAYER_PET_SPELL_POWER, damage, true);
  2164. +}
  2165. +
  2166. +void Guardian::UpdateSpellCritChance()
  2167. +{
  2168. + m_spellCrit = GetSpellCritFromIntellect();
  2169. +}
  2170. +
  2171. +void Guardian::UpdateMeleeCritChance()
  2172. +{
  2173. + m_meleeCrit = GetMeleeCritFromAgility();
  2174. +}
  2175. +
  2176. +float Guardian::GetSpellCritFromIntellect()
  2177. +{
  2178. + uint8 level = getLevel();
  2179. + uint32 pclass = getClass();
  2180. +
  2181. + if (level > GT_MAX_LEVEL)
  2182. + level = GT_MAX_LEVEL;
  2183. +
  2184. + GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass-1);
  2185. + GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2186. + if (critBase == NULL || critRatio == NULL)
  2187. + return 0.0f;
  2188. +
  2189. + float crit=critBase->base + GetStat(STAT_INTELLECT)*critRatio->ratio;
  2190. + return crit*100.0f;
  2191. +}
  2192. +
  2193. +float Guardian::GetMeleeCritFromAgility()
  2194. +{
  2195. + uint8 level = getLevel();
  2196. + uint32 pclass = getClass();
  2197. +
  2198. + if (level > GT_MAX_LEVEL)
  2199. + level = GT_MAX_LEVEL;
  2200. +
  2201. + GtChanceToMeleeCritBaseEntry const* critBase = sGtChanceToMeleeCritBaseStore.LookupEntry(pclass-1);
  2202. + GtChanceToMeleeCritEntry const* critRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2203. + if (critBase == NULL || critRatio == NULL)
  2204. + return 0.0f;
  2205. +
  2206. + float crit = critBase->base + GetStat(STAT_AGILITY)*critRatio->ratio;
  2207. + return crit*100.0f;
  2208. +}
  2209. +
  2210. +float Guardian::OCTRegenHPPerSpirit()
  2211. +{
  2212. + uint8 level = getLevel();
  2213. + uint32 pclass = getClass();
  2214. +
  2215. + if (level > GT_MAX_LEVEL)
  2216. + level = GT_MAX_LEVEL;
  2217. +
  2218. + GtOCTRegenHPEntry const* baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2219. + GtRegenHPPerSptEntry const* moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2220. + if (baseRatio == NULL || moreRatio == NULL)
  2221. + return 0.0f;
  2222. +
  2223. + // Formula from PaperDollFrame script
  2224. + float spirit = GetStat(STAT_SPIRIT);
  2225. + float baseSpirit = spirit;
  2226. + if (baseSpirit > 50)
  2227. + baseSpirit = 50;
  2228. + float moreSpirit = spirit - baseSpirit;
  2229. + float regen = baseSpirit * baseRatio->ratio + moreSpirit * moreRatio->ratio;
  2230. + return regen;
  2231. +}
  2232. +
  2233. +float Guardian::OCTRegenMPPerSpirit()
  2234. +{
  2235. + uint8 level = getLevel();
  2236. + uint32 pclass = getClass();
  2237. +
  2238. + if (level > GT_MAX_LEVEL)
  2239. + level = GT_MAX_LEVEL;
  2240. +
  2241. +// GtOCTRegenMPEntry const* baseRatio = sGtOCTRegenMPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2242. + GtRegenMPPerSptEntry const* moreRatio = sGtRegenMPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
  2243. + if (moreRatio == NULL)
  2244. + return 0.0f;
  2245. +
  2246. + // Formula get from PaperDollFrame script
  2247. + float spirit = GetStat(STAT_SPIRIT);
  2248. + float regen = spirit * moreRatio->ratio;
  2249. + return regen;
  2250. }
  2251.  
  2252. bool Puppet::UpdateStats(Stats stat)
  2253. diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
  2254. index ba0fab7..00e6da4 100755
  2255. --- a/src/server/game/Entities/Unit/Unit.cpp
  2256. +++ b/src/server/game/Entities/Unit/Unit.cpp
  2257. @@ -2516,11 +2516,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit * victim, SpellInfo const * spell)
  2258. modHitChance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT, schoolMask);
  2259.  
  2260. // Increase hit chance from attacker SPELL_AURA_MOD_SPELL_HIT_CHANCE and attacker ratings
  2261. - Unit *owner = GetOwner();
  2262. - if (owner && owner->GetTypeId() == TYPEID_PLAYER)
  2263. - modHitChance += int32(owner->m_modSpellHitChance);
  2264. - else
  2265. - modHitChance += int32(m_modSpellHitChance);
  2266. + modHitChance += int32(m_modSpellHitChance);
  2267.  
  2268. if (modHitChance > 100)
  2269. modHitChance = 100;
  2270. @@ -2800,6 +2796,8 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victi
  2271. else
  2272. {
  2273. crit = 5.0f;
  2274. + if (isGuardian())
  2275. + crit += ((Guardian*)this)->GetMeleeCrit();
  2276. crit += GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
  2277. crit += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
  2278. }
  2279. @@ -4161,6 +4159,27 @@ void Unit::RemoveAllAurasExceptType(AuraType type)
  2280. }
  2281. }
  2282.  
  2283. +void Unit::RemoveAllNonPassiveAurasExceptType(AuraType type)
  2284. +{
  2285. + for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
  2286. + {
  2287. + Aura const* aura = iter->second->GetBase();
  2288. + if (!aura->GetSpellInfo()->HasAura(type) && !aura->GetSpellInfo()->IsPassive())
  2289. + _UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
  2290. + else
  2291. + ++iter;
  2292. + }
  2293. +
  2294. + for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
  2295. + {
  2296. + Aura* aura = iter->second;
  2297. + if (!aura->GetSpellInfo()->HasAura(type) && !aura->GetSpellInfo()->IsPassive())
  2298. + RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
  2299. + else
  2300. + ++iter;
  2301. + }
  2302. +}
  2303. +
  2304. void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
  2305. {
  2306. for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);++iter)
  2307. @@ -7715,9 +7734,10 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
  2308.  
  2309. if (pPet && pPet->getVictim() && damage && procSpell)
  2310. {
  2311. - uint32 procDmg = damage / 2;
  2312. - pPet->SendSpellNonMeleeDamageLog(pPet->getVictim(), procSpell->Id, procDmg, procSpell->GetSchoolMask(), 0, 0, false, 0, false);
  2313. - pPet->DealDamage(pPet->getVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, procSpell->GetSchoolMask(), procSpell, true);
  2314. + pPet->CastSpell(pPet->getVictim(), procSpell->Id, true);
  2315. + //uint32 procDmg = damage / 2;
  2316. + //pPet->SendSpellNonMeleeDamageLog(pPet->getVictim(), procSpell->Id, procDmg, procSpell->GetSchoolMask(), 0, 0, false, 0, false);
  2317. + //pPet->DealDamage(pPet->getVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, procSpell->GetSchoolMask(), procSpell, true);
  2318. break;
  2319. }
  2320. else
  2321. @@ -10158,6 +10178,90 @@ void Unit::SetMinion(Minion *minion, bool apply)
  2322. }
  2323. }
  2324.  
  2325. +void Unit::RecalculatePetsScalingResistance(uint32 school)
  2326. +{
  2327. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2328. + {
  2329. + Unit* unit = *itr;
  2330. + ++itr;
  2331. +
  2332. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2333. + ((Guardian*)unit)->RecalculatePetScalingResistance(school);
  2334. + }
  2335. +}
  2336. +
  2337. +void Unit::RecalculatePetsScalingStats(Stats stats)
  2338. +{
  2339. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2340. + {
  2341. + Unit* unit = *itr;
  2342. + ++itr;
  2343. +
  2344. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2345. + ((Guardian*)unit)->RecalculatePetScalingStats(stats);
  2346. + }
  2347. +}
  2348. +
  2349. +void Unit::RecalculatePetsScalingHitRating()
  2350. +{
  2351. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2352. + {
  2353. + Unit* unit = *itr;
  2354. + ++itr;
  2355. +
  2356. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2357. + ((Guardian*)unit)->RecalculatePetScalingHitRating();
  2358. + }
  2359. +}
  2360. +
  2361. +void Unit::RecalculatePetsScalingCritRating()
  2362. +{
  2363. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2364. + {
  2365. + Unit* unit = *itr;
  2366. + ++itr;
  2367. +
  2368. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2369. + ((Guardian*)unit)->RecalculatePetScalingCritRating();
  2370. + }
  2371. +}
  2372. +
  2373. +void Unit::RecalculatePetsScalingAttackSpeed(WeaponAttackType att)
  2374. +{
  2375. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2376. + {
  2377. + Unit* unit = *itr;
  2378. + ++itr;
  2379. +
  2380. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2381. + ((Guardian*)unit)->RecalculatePetScalingAttackSpeed(att);
  2382. + }
  2383. +}
  2384. +
  2385. +void Unit::RecalculatePetsScalingAttackPower()
  2386. +{
  2387. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2388. + {
  2389. + Unit* unit = *itr;
  2390. + ++itr;
  2391. +
  2392. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2393. + ((Guardian*)unit)->RecalculatePetScalingAttackPower();
  2394. + }
  2395. +}
  2396. +
  2397. +void Unit::RecalculatePetsScalingDamageDone()
  2398. +{
  2399. + for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2400. + {
  2401. + Unit* unit = *itr;
  2402. + ++itr;
  2403. +
  2404. + if (unit->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2405. + ((Guardian*)unit)->RecalculatePetScalingDamageDone();
  2406. + }
  2407. +}
  2408. +
  2409. void Unit::GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry)
  2410. {
  2411. for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
  2412. @@ -10905,8 +11009,8 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
  2413. int32 TakenAdvertisedBenefit = SpellBaseDamageBonusForVictim(spellProto->GetSchoolMask(), victim);
  2414. // Pets just add their bonus damage to their spell damage
  2415. // note that their spell damage is just gain of their own auras
  2416. - if (HasUnitTypeMask(UNIT_MASK_GUARDIAN))
  2417. - DoneAdvertisedBenefit += ((Guardian*)this)->GetBonusDamage();
  2418. + if (isSummon() && isCharmedOwnedByPlayerOrPlayer())
  2419. + DoneAdvertisedBenefit += ToTempSummon()->GetBonusDamage();
  2420.  
  2421. // Check for table values
  2422. float coeff = 0;
  2423. @@ -10921,6 +11025,9 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
  2424. WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
  2425. float APbonus = (float) victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
  2426. APbonus += GetTotalAttackPowerValue(attType);
  2427. + // Exception for Dancing Rune Weapon
  2428. + if (HasUnitTypeMask(UNIT_MASK_GUARDIAN) && GetEntry() == 27893 && (spellProto->SchoolMask & SPELL_SCHOOL_MASK_MAGIC))
  2429. + APbonus = ((Guardian*)this)->GetBonusDamage();
  2430. DoneTotal += int32(bonus->ap_dot_bonus * stack * ApCoeffMod * APbonus);
  2431. }
  2432. }
  2433. @@ -10932,6 +11039,9 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
  2434. WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
  2435. float APbonus = (float) victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
  2436. APbonus += GetTotalAttackPowerValue(attType);
  2437. + // Exception for Dancing Rune Weapon
  2438. + if (HasUnitTypeMask(UNIT_MASK_GUARDIAN) && GetEntry() == 27893 && (spellProto->SchoolMask & SPELL_SCHOOL_MASK_MAGIC))
  2439. + APbonus = ((Guardian*)this)->GetBonusDamage();
  2440. DoneTotal += int32(bonus->ap_bonus * stack * ApCoeffMod * APbonus);
  2441. }
  2442. }
  2443. @@ -11123,10 +11233,11 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
  2444. // Mobs can't crit with spells.
  2445. if (IS_CREATURE_GUID(GetGUID()))
  2446. {
  2447. - if (isGuardian() || isTotem())
  2448. + if (isTotem())
  2449. if (Unit* owner = this->GetCharmerOrOwner())
  2450. return owner->isSpellCrit(victim, spellProto, schoolMask, attackType);
  2451. - return false;
  2452. + if (!isPet())
  2453. + return false;
  2454. }
  2455.  
  2456. // not critting spell
  2457. @@ -13994,7 +14105,7 @@ void Unit::SetPower(Powers power, uint32 val)
  2458.  
  2459. // Update the pet's character sheet with happiness damage bonus
  2460. if (pet->getPetType() == HUNTER_PET && power == POWER_HAPPINESS)
  2461. - pet->UpdateDamagePhysical(BASE_ATTACK);
  2462. + pet->RecalculateHappinessEffect();
  2463. }
  2464. }
  2465.  
  2466. @@ -15254,9 +15365,9 @@ void Unit::ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply
  2467. ApplyPercentModFloatValue(UNIT_FIELD_BASEATTACKTIME+att, -val, apply);
  2468. }
  2469. if (att == BASE_ATTACK && getClass() == CLASS_DEATH_KNIGHT)
  2470. - if (Pet* pet = this->ToPlayer()->GetPet())
  2471. - if (pet->IsPetGhoul())
  2472. - pet->ApplyAttackTimePercentMod(att, val, apply);
  2473. + {
  2474. + RecalculatePetsScalingAttackSpeed(att);
  2475. + }
  2476. m_attackTimer[att] = uint32(GetAttackTime(att) * m_modAttackSpeedPct[att] * remainingTimePct);
  2477. }
  2478.  
  2479. diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
  2480. index d25532f..4a4b12b 100755
  2481. --- a/src/server/game/Entities/Unit/Unit.h
  2482. +++ b/src/server/game/Entities/Unit/Unit.h
  2483. @@ -1685,6 +1685,14 @@ class Unit : public WorldObject
  2484. Player* GetCharmerOrOwnerPlayerOrPlayerItself() const;
  2485. Player* GetAffectingPlayer() const;
  2486.  
  2487. + void RecalculatePetsScalingResistance(uint32 school);
  2488. + void RecalculatePetsScalingStats(Stats stats);
  2489. + void RecalculatePetsScalingAttackPower();
  2490. + void RecalculatePetsScalingDamageDone();
  2491. + void RecalculatePetsScalingAttackSpeed(WeaponAttackType att);
  2492. + void RecalculatePetsScalingHitRating();
  2493. + void RecalculatePetsScalingCritRating();
  2494. +
  2495. void SetMinion(Minion *minion, bool apply);
  2496. void GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry);
  2497. void RemoveAllMinionsByEntry(uint32 entry);
  2498. @@ -1779,6 +1787,7 @@ class Unit : public WorldObject
  2499. void RemoveAllAurasOnDeath();
  2500. void RemoveAllAurasRequiringDeadTarget();
  2501. void RemoveAllAurasExceptType(AuraType type);
  2502. + void RemoveAllNonPassiveAurasExceptType(AuraType type);
  2503. void DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime);
  2504.  
  2505. void _RemoveAllAuraStatMods();
  2506. diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
  2507. index 4a91139..82baff9 100755
  2508. --- a/src/server/game/Globals/ObjectMgr.cpp
  2509. +++ b/src/server/game/Globals/ObjectMgr.cpp
  2510. @@ -2925,7 +2925,7 @@ void ObjectMgr::LoadPetLevelInfo()
  2511. uint32 oldMSTime = getMSTime();
  2512.  
  2513. // 0 1 2 3 4 5 6 7 8 9
  2514. - QueryResult result = WorldDatabase.Query("SELECT creature_entry, level, hp, mana, str, agi, sta, inte, spi, armor FROM pet_levelstats");
  2515. + QueryResult result = WorldDatabase.Query("SELECT creature_entry, level, hp, mana, str, agi, sta, inte, spi, armor, mindmg, maxdmg, attackpower FROM pet_levelstats");
  2516.  
  2517. if (!result)
  2518. {
  2519. @@ -2976,6 +2976,9 @@ void ObjectMgr::LoadPetLevelInfo()
  2520. pLevelInfo->health = fields[2].GetUInt16();
  2521. pLevelInfo->mana = fields[3].GetUInt16();
  2522. pLevelInfo->armor = fields[9].GetUInt16();
  2523. + pLevelInfo->mindmg = fields[10].GetUInt16();
  2524. + pLevelInfo->maxdmg = fields[11].GetUInt16();
  2525. + pLevelInfo->attackpower = fields[12].GetUInt16();
  2526.  
  2527. for (int i = 0; i < MAX_STATS; i++)
  2528. {
  2529. @@ -2986,15 +2989,21 @@ void ObjectMgr::LoadPetLevelInfo()
  2530. }
  2531. while (result->NextRow());
  2532.  
  2533. + PetLevelInfo* petBaseInfo = _petInfoStore[1];
  2534. + uint16 maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) - 1;
  2535. +
  2536. // Fill gaps and check integrity
  2537. for (PetLevelInfoContainer::iterator itr = _petInfoStore.begin(); itr != _petInfoStore.end(); ++itr)
  2538. {
  2539. + // Don't fill data for default pet
  2540. + if (itr->first == 1)
  2541. + continue;
  2542. PetLevelInfo* pInfo = itr->second;
  2543.  
  2544. - // fatal error if no level 1 data
  2545. - if (!pInfo || pInfo[0].health == 0)
  2546. + // fatal error if no level 1 or no max health data
  2547. + if(!pInfo || pInfo[0].health == 0 || pInfo[maxLevel].health == 0 )
  2548. {
  2549. - sLog->outErrorDb("Creature %u does not have pet stats data for Level 1!", itr->first);
  2550. + sLog->outErrorDb("Creature %u does not have pet stats data for Levels 1 or %u! Must be exist!", itr->first, maxLevel);
  2551. exit(1);
  2552. }
  2553.  
  2554. @@ -3007,6 +3016,42 @@ void ObjectMgr::LoadPetLevelInfo()
  2555. pInfo[level] = pInfo[level-1];
  2556. }
  2557. }
  2558. +
  2559. + for (uint8 level = 1; level < maxLevel; ++level)
  2560. + {
  2561. + if( pInfo[level].health == 0
  2562. + || pInfo[level].mana == 0
  2563. + || pInfo[level].armor == 0
  2564. + || pInfo[level].mindmg == 0
  2565. + || pInfo[level].maxdmg == 0
  2566. + || pInfo[level].stats[STAT_STRENGTH] == 0
  2567. + || pInfo[level].stats[STAT_STAMINA] == 0
  2568. + || pInfo[level].stats[STAT_AGILITY] == 0
  2569. + || pInfo[level].stats[STAT_INTELLECT] == 0
  2570. + || pInfo[level].stats[STAT_SPIRIT] == 0
  2571. + )
  2572. + {
  2573. + sLog->outErrorDb("Creature %u has no full data set for Level %i pet stats data, using approximated (from default pet progression) data",itr->first,level+1);
  2574. +
  2575. + if(pInfo[level].health == 0)
  2576. + pInfo[level].health = uint16(pInfo[maxLevel].health * (petBaseInfo[level].health / petBaseInfo[maxLevel].health));
  2577. + if(pInfo[level].mana == 0)
  2578. + pInfo[level].mana = uint16(pInfo[maxLevel].mana * (petBaseInfo[level].mana / petBaseInfo[maxLevel].mana));
  2579. + if(pInfo[level].armor == 0)
  2580. + pInfo[level].armor = uint16(pInfo[maxLevel].armor * (petBaseInfo[level].armor / petBaseInfo[maxLevel].armor));
  2581. + if(pInfo[level].mindmg == 0)
  2582. + pInfo[level].mindmg = uint16(pInfo[maxLevel].mindmg * (petBaseInfo[level].mindmg / petBaseInfo[maxLevel].mindmg));
  2583. + if(pInfo[level].maxdmg == 0)
  2584. + pInfo[level].mana = uint16(pInfo[maxLevel].maxdmg * (petBaseInfo[level].maxdmg / petBaseInfo[maxLevel].maxdmg));
  2585. + if(pInfo[level].attackpower == 0)
  2586. + pInfo[level].mana = uint16(pInfo[maxLevel].attackpower * (petBaseInfo[level].attackpower / petBaseInfo[maxLevel].attackpower));
  2587. + for (int i = 0; i < MAX_STATS; i++)
  2588. + {
  2589. + if(pInfo[level].stats[i] == 0)
  2590. + pInfo[level].stats[i] = uint16(pInfo[maxLevel].stats[i] * (petBaseInfo[level].stats[i] / petBaseInfo[maxLevel].stats[i]));
  2591. + }
  2592. + }
  2593. + }
  2594. }
  2595.  
  2596. sLog->outString(">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
  2597. diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
  2598. index 6eb57ca..76a5219 100755
  2599. --- a/src/server/game/Globals/ObjectMgr.h
  2600. +++ b/src/server/game/Globals/ObjectMgr.h
  2601. @@ -424,6 +424,9 @@ struct PetLevelInfo
  2602. uint16 health;
  2603. uint16 mana;
  2604. uint16 armor;
  2605. + uint16 mindmg;
  2606. + uint16 maxdmg;
  2607. + uint16 attackpower;
  2608. };
  2609.  
  2610. struct MailLevelReward
  2611. diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
  2612. index 356f6d9..e5bbcbd 100755
  2613. --- a/src/server/game/Miscellaneous/SharedDefines.h
  2614. +++ b/src/server/game/Miscellaneous/SharedDefines.h
  2615. @@ -434,7 +434,7 @@ enum SpellAttr4
  2616. SPELL_ATTR4_UNK22 = 0x00400000, // 22
  2617. SPELL_ATTR4_UNK23 = 0x00800000, // 23
  2618. SPELL_ATTR4_UNK24 = 0x01000000, // 24 some shoot spell
  2619. - SPELL_ATTR4_UNK25 = 0x02000000, // 25 pet scaling auras
  2620. + SPELL_ATTR4_PET_SCALING_AURA = 0x02000000, // 25 pet scaling auras
  2621. SPELL_ATTR4_CAST_ONLY_IN_OUTLAND = 0x04000000, // 26 Can only be used in Outland.
  2622. SPELL_ATTR4_UNK27 = 0x08000000, // 27
  2623. SPELL_ATTR4_UNK28 = 0x10000000, // 28 Aimed Shot
  2624. diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
  2625. index 281ba59..33b948d 100755
  2626. --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
  2627. +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
  2628. @@ -3677,14 +3677,8 @@ void AuraEffect::HandleAuraModBaseResistancePCT(AuraApplication const* aurApp, u
  2629.  
  2630. Unit* target = aurApp->GetTarget();
  2631.  
  2632. - // only players have base stats
  2633. - if (target->GetTypeId() != TYPEID_PLAYER)
  2634. - {
  2635. - //pets only have base armor
  2636. - if (target->ToCreature()->isPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
  2637. - target->HandleStatModifier(UNIT_MOD_ARMOR, BASE_PCT, float(GetAmount()), apply);
  2638. - }
  2639. - else
  2640. + // only players and pets have base stats
  2641. + if (target->GetTypeId() == TYPEID_PLAYER || target->isPet())
  2642. {
  2643. for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
  2644. {
  2645. @@ -3722,14 +3716,8 @@ void AuraEffect::HandleModBaseResistance(AuraApplication const* aurApp, uint8 mo
  2646.  
  2647. Unit* target = aurApp->GetTarget();
  2648.  
  2649. - // only players have base stats
  2650. - if (target->GetTypeId() != TYPEID_PLAYER)
  2651. - {
  2652. - //only pets have base stats
  2653. - if (target->ToCreature()->isPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
  2654. - target->HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(GetAmount()), apply);
  2655. - }
  2656. - else
  2657. + // only players and pets have base stats
  2658. + if (target->GetTypeId() == TYPEID_PLAYER || target->isPet())
  2659. {
  2660. for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
  2661. {
  2662. @@ -3800,8 +3788,8 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
  2663. return;
  2664. }
  2665.  
  2666. - // only players have base stats
  2667. - if (target->GetTypeId() != TYPEID_PLAYER)
  2668. + // only players and pets have base stats
  2669. + if (target->GetTypeId() != TYPEID_PLAYER && !target->isPet())
  2670. return;
  2671.  
  2672. for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
  2673. @@ -4558,8 +4546,13 @@ void AuraEffect::HandleModDamageDone(AuraApplication const* aurApp, uint8 mode,
  2674. target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i, GetAmount(), apply);
  2675. }
  2676. }
  2677. - if (Guardian* pet = target->ToPlayer()->GetGuardianPet())
  2678. - pet->UpdateAttackPowerAndDamage();
  2679. + target->RecalculatePetsScalingAttackPower();
  2680. + target->RecalculatePetsScalingDamageDone();
  2681. + }
  2682. + else if (target->isPet())
  2683. + {
  2684. + if (Unit* owner = target->GetOwner())
  2685. + owner->ApplyModUInt32Value(PLAYER_PET_SPELL_POWER, GetAmount(), apply);
  2686. }
  2687. }
  2688.  
  2689. diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
  2690. index da05e3a..168bd07 100755
  2691. --- a/src/server/game/Spells/SpellEffects.cpp
  2692. +++ b/src/server/game/Spells/SpellEffects.cpp
  2693. @@ -408,7 +408,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
  2694. case 49882:
  2695. case 60864: // Jaws of Death
  2696. case 46588: // Ice Spear
  2697. - case 30740: // Eyesore Blaster
  2698. {
  2699. damage = unitTarget->CountPctFromMaxHealth(damage);
  2700. break;
  2701. @@ -1389,18 +1388,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
  2702. m_caster->CastSpell(m_caster, spell_id, true);
  2703. return;
  2704. }
  2705. - case 69922: // Temper Quel'Delar
  2706. - {
  2707. - if (!unitTarget)
  2708. - return;
  2709. -
  2710. - if (!unitTarget->FindNearestGameObject(201600, 5.0f))
  2711. - return;
  2712. -
  2713. - // Return Tempered Quel'Delar
  2714. - unitTarget->CastSpell(m_caster, 69956, true);
  2715. - return;
  2716. - }
  2717. case 53808: // Pygmy Oil
  2718. {
  2719. Aura* pAura = m_caster->GetAura(53806);
  2720. @@ -2152,10 +2139,10 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
  2721. // Do we have talent Master of Ghouls?
  2722. if (m_caster->HasAura(52143))
  2723. // summon as pet
  2724. - bp = 52150;
  2725. + bp = m_spellInfo->Effects[EFFECT_2].CalcValue();
  2726. else
  2727. // or guardian
  2728. - bp = 46585;
  2729. + bp = m_spellInfo->Effects[EFFECT_1].CalcValue();
  2730.  
  2731. if (m_targets.HasDst())
  2732. targets.SetDst(*m_targets.GetDst());
  2733. @@ -3815,21 +3802,18 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
  2734. case 629:
  2735. case 181:
  2736. case 715:
  2737. - case 18662:
  2738. - case 48739:
  2739. - case 12749:
  2740. - case 4073:
  2741. - case 19804:
  2742. + case 1161:
  2743. numSummons = (damage > 0) ? damage : 1;
  2744. break;
  2745. - case 46585:
  2746. - duration = 60000;
  2747. - break;
  2748. default:
  2749. numSummons = 1;
  2750. break;
  2751. }
  2752.  
  2753. + // Bloodworms
  2754. + if (m_spellInfo->Id == 50452)
  2755. + numSummons = urand(2, 4);
  2756. +
  2757. switch (properties->Category)
  2758. {
  2759. case SUMMON_CATEGORY_WILD:
  2760. @@ -3912,57 +3896,55 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
  2761.  
  2762. switch (m_spellInfo->Id)
  2763. {
  2764. - case 18662: // Curse of Doom Effect
  2765. - {
  2766. - uint32 petlevel = m_originalCaster->getLevel() < 60 ? 60 : m_originalCaster->getLevel();
  2767. - summon->SetLevel(petlevel);
  2768. - //health, mana, armor and resistance
  2769. - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(entry, petlevel);
  2770. - if (pInfo) // exist in DB
  2771. - {
  2772. - summon->SetCreateHealth(pInfo->health);
  2773. - summon->SetCreateMana(pInfo->mana);
  2774. + case 18662: // Curse of Doom Effect
  2775. + {
  2776. + uint32 petlevel = m_originalCaster->getLevel() < 60 ? 60 : m_originalCaster->getLevel();
  2777. + summon->SetLevel(petlevel);
  2778. + //health, mana, armor and resistance
  2779. + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(entry, petlevel);
  2780. + if (pInfo) // exist in DB
  2781. + {
  2782. + summon->HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, pInfo->health, true);
  2783. + summon->HandleStatModifier(UNIT_MOD_POWER_START, BASE_VALUE, pInfo->mana, true);
  2784. + summon->SetHealth(summon->GetMaxHealth());
  2785. + summon->SetPower(POWER_MANA, summon->GetMaxPower(POWER_MANA));
  2786.  
  2787. - if (pInfo->armor > 0)
  2788. - summon->SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
  2789. + if (pInfo->armor > 0)
  2790. + summon->SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
  2791.  
  2792. - for (uint8 stat = 0; stat < MAX_STATS; ++stat)
  2793. - summon->SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
  2794. - }
  2795. - else // not exist in DB, use some default fake data
  2796. - {
  2797. - // remove elite bonuses included in DB values
  2798. - CreatureTemplate const *cinfo = summon->GetCreatureInfo();
  2799. - CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class);
  2800. - summon->SetCreateHealth(stats->BaseHealth[cinfo->expansion]);
  2801. - summon->SetCreateMana(stats->BaseMana);
  2802. -
  2803. - summon->SetCreateStat(STAT_STRENGTH, 22);
  2804. - summon->SetCreateStat(STAT_AGILITY, 22);
  2805. - summon->SetCreateStat(STAT_STAMINA, 25);
  2806. - summon->SetCreateStat(STAT_INTELLECT, 28);
  2807. - summon->SetCreateStat(STAT_SPIRIT, 27);
  2808. + for (uint8 stat = 0; stat < MAX_STATS; ++stat)
  2809. + summon->SetStat(Stats(stat), float(pInfo->stats[stat]));
  2810. + }
  2811. + else // not exist in DB, use some default fake data
  2812. + {
  2813. + // remove elite bonuses included in DB values
  2814. + CreatureTemplate const *cinfo = summon->GetCreatureInfo();
  2815. + CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class);
  2816. + summon->SetCreateHealth(stats->BaseHealth[cinfo->expansion]);
  2817. + summon->SetCreateMana(stats->BaseMana);
  2818. +
  2819. + summon->SetStat(STAT_STRENGTH, 22);
  2820. + summon->SetStat(STAT_AGILITY, 22);
  2821. + summon->SetStat(STAT_STAMINA, 25);
  2822. + summon->SetStat(STAT_INTELLECT, 28);
  2823. + summon->SetStat(STAT_SPIRIT, 27);
  2824. + }
  2825. + float mod = 1;
  2826. + if (petlevel < 70)
  2827. + mod = 10 + (petlevel-70)/2;
  2828. + else
  2829. + mod = 20 + (petlevel-80);
  2830. + if (mod < 0)
  2831. + mod = 0;
  2832. + float minDamage = (petlevel - (petlevel / 4))*mod;
  2833. + float maxDamage = (petlevel + (petlevel / 4))*mod;
  2834. + float attackPower = ((minDamage + maxDamage) /4)*7;
  2835. + summon->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  2836. + summon->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  2837. + summon->SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  2838. + summon->UpdateAllStats();
  2839. + break;
  2840. }
  2841. -
  2842. - //bonusAP += val * 0.57;
  2843. - float minDamage = (petlevel - (petlevel / 4))*18;
  2844. - float maxDamage = (petlevel + (petlevel / 4))*18;
  2845. - float attackPower = ((minDamage + maxDamage) /4)*7;
  2846. - summon->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
  2847. - summon->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
  2848. - summon->SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, attackPower);
  2849. - summon->SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE) + float(m_originalCaster->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor)
  2850. - summon->SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(m_originalCaster->GetStat(STAT_STAMINA)) * 0.3f); // Bonus Stamina (30% of player stamina)
  2851. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_HOLY)) * 0.4f);
  2852. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_FIRE)) * 0.4f);
  2853. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_NATURE)) * 0.4f);
  2854. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_FROST)) * 0.4f);
  2855. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_SHADOW)) * 0.4f);
  2856. - summon->SetModifierValue(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, summon->GetModifierValue(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE) + float(m_originalCaster->GetResistance(SPELL_SCHOOL_ARCANE)) * 0.4f);
  2857. - summon->SetModifierValue(UNIT_MOD_STAT_INTELLECT, BASE_VALUE, float(m_originalCaster->GetStat(STAT_INTELLECT)) * 0.3f);
  2858. - summon->UpdateAllStats();
  2859. - break;
  2860. - }
  2861. }
  2862.  
  2863. if (properties->Category == SUMMON_CATEGORY_ALLY)
  2864. @@ -3994,6 +3976,19 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
  2865. summon->CastSpell(summon, 47448, true);
  2866. summon->CastSpell(summon, 47466, true);
  2867. }
  2868. + // Eye of Kilrogg
  2869. + if (summon->GetEntry() == 4277)
  2870. + {
  2871. + summon->CastSpell(summon, 2585, true);
  2872. + // Glyph of Kilrogg
  2873. + if (m_caster->HasAura(58081))
  2874. + {
  2875. + uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(), m_caster->GetZoneId());
  2876. + MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
  2877. + if (mapEntry && mapEntry->addon > 0 && mapEntry->IsContinent())
  2878. + summon->CastSpell(summon, 58083, true);
  2879. + }
  2880. + }
  2881. break;
  2882. case SUMMON_CATEGORY_VEHICLE:
  2883. // Summoning spells (usually triggered by npc_spellclick) that spawn a vehicle and that cause the clicker
  2884. diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
  2885. index 5c0f6bc..5694042 100644
  2886. --- a/src/server/scripts/Spells/spell_dk.cpp
  2887. +++ b/src/server/scripts/Spells/spell_dk.cpp
  2888. @@ -656,6 +656,304 @@ public:
  2889. }
  2890. };
  2891.  
  2892. +class spell_dk_avoidance_passive : public SpellScriptLoader
  2893. +{
  2894. + public:
  2895. + spell_dk_avoidance_passive() : SpellScriptLoader("spell_dk_avoidance_passive") { }
  2896. +
  2897. + class spell_dk_avoidance_passive_AuraScript : public AuraScript
  2898. + {
  2899. + PrepareAuraScript(spell_dk_avoidance_passive_AuraScript);
  2900. +
  2901. + bool Load()
  2902. + {
  2903. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  2904. + return false;
  2905. + return true;
  2906. + }
  2907. +
  2908. + void CalculateAvoidanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  2909. + {
  2910. + if (Unit* pet = GetUnitOwner())
  2911. + {
  2912. + Unit* owner = pet->GetOwner();
  2913. + if (!owner)
  2914. + return;
  2915. +
  2916. + // Night of the dead
  2917. + if (owner->HasAura(55623))
  2918. + amount = 90;
  2919. + else if (owner->HasAura(55620))
  2920. + amount = 45;
  2921. + }
  2922. + }
  2923. +
  2924. + void Register()
  2925. + {
  2926. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_avoidance_passive_AuraScript::CalculateAvoidanceAmount, EFFECT_0, SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE);
  2927. + }
  2928. + };
  2929. +
  2930. + AuraScript* GetAuraScript() const
  2931. + {
  2932. + return new spell_dk_avoidance_passive_AuraScript();
  2933. + }
  2934. +};
  2935. +
  2936. +class spell_dk_pet_scaling_01 : public SpellScriptLoader
  2937. +{
  2938. + public:
  2939. + spell_dk_pet_scaling_01() : SpellScriptLoader("spell_dk_pet_scaling_01") { }
  2940. +
  2941. + class spell_dk_pet_scaling_01_AuraScript : public AuraScript
  2942. + {
  2943. + PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript);
  2944. +
  2945. + bool Load()
  2946. + {
  2947. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  2948. + return false;
  2949. + return true;
  2950. + }
  2951. +
  2952. + void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  2953. + {
  2954. + if (Unit* pet = GetUnitOwner())
  2955. + {
  2956. + if (!pet->isGuardian())
  2957. + return;
  2958. +
  2959. + Unit* owner = pet->GetOwner();
  2960. + if (!owner)
  2961. + return;
  2962. +
  2963. + float mod = 0.3f;
  2964. +
  2965. + // Ravenous Dead
  2966. + AuraEffect const* aurEff = NULL;
  2967. + // Check just if owner has Ravenous Dead since it's effect is not an aura
  2968. + aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
  2969. + if (aurEff)
  2970. + {
  2971. + mod += CalculatePctN(mod, aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue()); // Ravenous Dead edits the original scale
  2972. + }
  2973. + // Glyph of the Ghoul
  2974. + aurEff = owner->GetAuraEffect(58686, 0);
  2975. + if (aurEff)
  2976. + mod += CalculatePctN(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
  2977. + float ownerBonus = float(owner->GetStat(STAT_STAMINA)) * mod;
  2978. + amount += ownerBonus;
  2979. + }
  2980. + }
  2981. +
  2982. + void CalculateStrengthAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  2983. + {
  2984. + if (Unit* pet = GetUnitOwner())
  2985. + {
  2986. + if (!pet->isGuardian())
  2987. + return;
  2988. +
  2989. + Unit* owner = pet->GetOwner();
  2990. + if (!owner)
  2991. + return;
  2992. +
  2993. + float mod = 0.7f;
  2994. +
  2995. + // Ravenous Dead
  2996. + AuraEffect const* aurEff = NULL;
  2997. + // Check just if owner has Ravenous Dead since it's effect is not an aura
  2998. + aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
  2999. + if (aurEff)
  3000. + {
  3001. + mod += CalculatePctN(mod, aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue()); // Ravenous Dead edits the original scale
  3002. + }
  3003. + // Glyph of the Ghoul
  3004. + aurEff = owner->GetAuraEffect(58686, 0);
  3005. + if (aurEff)
  3006. + mod += CalculatePctN(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
  3007. + float ownerBonus = float(owner->GetStat(STAT_STRENGTH)) * mod;
  3008. + amount += ownerBonus;
  3009. + }
  3010. + }
  3011. +
  3012. + void Register()
  3013. + {
  3014. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_01_AuraScript::CalculateStaminaAmount, EFFECT_0, SPELL_AURA_MOD_STAT);
  3015. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_01_AuraScript::CalculateStrengthAmount, EFFECT_1, SPELL_AURA_MOD_STAT);
  3016. + }
  3017. + };
  3018. +
  3019. + AuraScript* GetAuraScript() const
  3020. + {
  3021. + return new spell_dk_pet_scaling_01_AuraScript();
  3022. + }
  3023. +};
  3024. +
  3025. +class spell_dk_pet_scaling_02 : public SpellScriptLoader
  3026. +{
  3027. + public:
  3028. + spell_dk_pet_scaling_02() : SpellScriptLoader("spell_dk_pet_scaling_02") { }
  3029. +
  3030. + class spell_dk_pet_scaling_02_AuraScript : public AuraScript
  3031. + {
  3032. + PrepareAuraScript(spell_dk_pet_scaling_02_AuraScript);
  3033. +
  3034. + bool Load()
  3035. + {
  3036. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3037. + return false;
  3038. + return true;
  3039. + }
  3040. +
  3041. + void CalculateAmountMeleeHaste(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3042. + {
  3043. + if (!GetCaster() || !GetCaster()->GetOwner())
  3044. + return;
  3045. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3046. + {
  3047. + // For others recalculate it from:
  3048. + float HasteMelee = 0.0f;
  3049. + // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
  3050. + HasteMelee += (1-owner->m_modAttackSpeedPct[BASE_ATTACK])*100;
  3051. +
  3052. + amount += int32(HasteMelee);
  3053. + }
  3054. + }
  3055. +
  3056. + void Register()
  3057. + {
  3058. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MELEE_SLOW);
  3059. + }
  3060. + };
  3061. +
  3062. + AuraScript* GetAuraScript() const
  3063. + {
  3064. + return new spell_dk_pet_scaling_02_AuraScript();
  3065. + }
  3066. +};
  3067. +
  3068. +class spell_dk_pet_scaling_03 : public SpellScriptLoader
  3069. +{
  3070. + public:
  3071. + spell_dk_pet_scaling_03() : SpellScriptLoader("spell_dk_pet_scaling_03") { }
  3072. +
  3073. + class spell_dk_pet_scaling_03_AuraScript : public AuraScript
  3074. + {
  3075. + PrepareAuraScript(spell_dk_pet_scaling_03_AuraScript);
  3076. +
  3077. + bool Load()
  3078. + {
  3079. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3080. + return false;
  3081. + return true;
  3082. + }
  3083. +
  3084. + void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3085. + {
  3086. + if (!GetCaster() || !GetCaster()->GetOwner())
  3087. + return;
  3088. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3089. + {
  3090. + // For others recalculate it from:
  3091. + float HitMelee = 0.0f;
  3092. + // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
  3093. + HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
  3094. + // Increase hit melee from meele hit ratings
  3095. + HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
  3096. +
  3097. + amount += int32(HitMelee);
  3098. + }
  3099. + }
  3100. +
  3101. + void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3102. + {
  3103. + if (!GetCaster() || !GetCaster()->GetOwner())
  3104. + return;
  3105. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3106. + {
  3107. + // For others recalculate it from:
  3108. + float HitSpell = 0.0f;
  3109. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  3110. + HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3111. + // Increase hit spell from spell hit ratings
  3112. + HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
  3113. +
  3114. + amount += int32(HitSpell);
  3115. + }
  3116. + }
  3117. +
  3118. + void Register()
  3119. + {
  3120. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_03_AuraScript::CalculateAmountMeleeHit, EFFECT_0, SPELL_AURA_MOD_HIT_CHANCE);
  3121. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_03_AuraScript::CalculateAmountSpellHit, EFFECT_1, SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3122. + }
  3123. + };
  3124. +
  3125. + AuraScript* GetAuraScript() const
  3126. + {
  3127. + return new spell_dk_pet_scaling_03_AuraScript();
  3128. + }
  3129. +};
  3130. +
  3131. +class spell_dk_rune_weapon_scaling_02 : public SpellScriptLoader
  3132. +{
  3133. + public:
  3134. + spell_dk_rune_weapon_scaling_02() : SpellScriptLoader("spell_dk_rune_weapon_scaling_02") { }
  3135. +
  3136. + class spell_dk_rune_weapon_scaling_02_AuraScript : public AuraScript
  3137. + {
  3138. + PrepareAuraScript(spell_dk_rune_weapon_scaling_02_AuraScript);
  3139. +
  3140. + bool Load()
  3141. + {
  3142. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3143. + return false;
  3144. + return true;
  3145. + }
  3146. +
  3147. + void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3148. + {
  3149. + if (Unit* pet = GetUnitOwner())
  3150. + {
  3151. + Unit* owner = pet->GetOwner();
  3152. + if (!owner)
  3153. + return;
  3154. +
  3155. + if (pet->isGuardian())
  3156. + ((Guardian*)pet)->SetBonusDamage(owner->GetTotalAttackPowerValue(BASE_ATTACK));
  3157. +
  3158. + amount += owner->CalculateDamage(BASE_ATTACK, true, true);;
  3159. + }
  3160. + }
  3161. +
  3162. + void CalculateAmountMeleeHaste(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3163. + {
  3164. + if (!GetCaster() || !GetCaster()->GetOwner())
  3165. + return;
  3166. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3167. + {
  3168. + // For others recalculate it from:
  3169. + float HasteMelee = 0.0f;
  3170. + // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
  3171. + HasteMelee += (1-owner->m_modAttackSpeedPct[BASE_ATTACK])*100;
  3172. +
  3173. + amount += int32(HasteMelee);
  3174. + }
  3175. + }
  3176. +
  3177. + void Register()
  3178. + {
  3179. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_rune_weapon_scaling_02_AuraScript::CalculateDamageDoneAmount, EFFECT_0, SPELL_AURA_MOD_DAMAGE_DONE);
  3180. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_rune_weapon_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MELEE_SLOW);
  3181. + }
  3182. + };
  3183. +
  3184. + AuraScript* GetAuraScript() const
  3185. + {
  3186. + return new spell_dk_rune_weapon_scaling_02_AuraScript();
  3187. + }
  3188. +};
  3189. +
  3190. void AddSC_deathknight_spell_scripts()
  3191. {
  3192. new spell_dk_anti_magic_shell_raid();
  3193. @@ -671,4 +969,9 @@ void AddSC_deathknight_spell_scripts()
  3194. new spell_dk_will_of_the_necropolis();
  3195. new spell_dk_improved_blood_presence();
  3196. new spell_dk_improved_unholy_presence();
  3197. + new spell_dk_avoidance_passive();
  3198. + new spell_dk_pet_scaling_01();
  3199. + new spell_dk_pet_scaling_02();
  3200. + new spell_dk_pet_scaling_03();
  3201. + new spell_dk_rune_weapon_scaling_02();
  3202. }
  3203. diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
  3204. index 8a3424a..360c76b 100644
  3205. --- a/src/server/scripts/Spells/spell_hunter.cpp
  3206. +++ b/src/server/scripts/Spells/spell_hunter.cpp
  3207. @@ -40,6 +40,11 @@ enum HunterSpells
  3208. HUNTER_SPELL_CHIMERA_SHOT_VIPER = 53358,
  3209. HUNTER_SPELL_CHIMERA_SHOT_SCORPID = 53359,
  3210. HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET = 61669,
  3211. + HUNTER_SPELL_KILL_COMMAND_CRIT_10 = 60110,
  3212. + HUNTER_SPELL_KILL_COMMAND_CRIT_20 = 60113,
  3213. + HUNTER_SPELL_FOCUSED_FIRE_1 = 35029,
  3214. + HUNTER_SPELL_FOCUSED_FIRE_2 = 35030,
  3215. + HUNTER_SPELL_ANIMAL_HANDLER = 34453
  3216. };
  3217.  
  3218. // 13161 Aspect of the Beast
  3219. @@ -562,6 +567,569 @@ public:
  3220. }
  3221. };
  3222.  
  3223. +class spell_hun_pet_scaling_01 : public SpellScriptLoader
  3224. +{
  3225. + public:
  3226. + spell_hun_pet_scaling_01() : SpellScriptLoader("spell_hun_pet_scaling_01") { }
  3227. +
  3228. + class spell_hun_pet_scaling_01_AuraScript : public AuraScript
  3229. + {
  3230. + PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript);
  3231. +
  3232. + void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3233. + {
  3234. + if (Unit* pet = GetUnitOwner())
  3235. + {
  3236. + if (!pet->isPet())
  3237. + return;
  3238. +
  3239. + Unit* owner = pet->ToPet()->GetOwner();
  3240. + if (!owner)
  3241. + return;
  3242. +
  3243. + float mod = 0.45f;
  3244. + float ownerBonus = 0.0f;
  3245. +
  3246. + PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
  3247. + if (itr == pet->ToPet()->m_spells.end())
  3248. + itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
  3249. +
  3250. + if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
  3251. + {
  3252. + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
  3253. + AddPctN(mod, spellInfo->Effects[EFFECT_0].CalcValue());
  3254. + }
  3255. +
  3256. + ownerBonus = owner->GetStat(STAT_STAMINA)*mod;
  3257. +
  3258. + amount += ownerBonus;
  3259. + }
  3260. + }
  3261. +
  3262. + void CalculateAttackPowerAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3263. + {
  3264. + if (Unit* pet = GetUnitOwner())
  3265. + {
  3266. + if (!pet->isPet())
  3267. + return;
  3268. +
  3269. + Unit* owner = pet->ToPet()->GetOwner();
  3270. + if (!owner)
  3271. + return;
  3272. +
  3273. + float mod = 1.0f; //Hunter contribution modifier
  3274. + float bonusAP = 0.0f;
  3275. +
  3276. + PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
  3277. + if (itr == pet->ToPet()->m_spells.end())
  3278. + itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
  3279. +
  3280. + if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
  3281. + {
  3282. + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
  3283. + mod += CalculatePctN(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
  3284. + }
  3285. +
  3286. + bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
  3287. +
  3288. + amount += bonusAP;
  3289. + }
  3290. + }
  3291. +
  3292. + void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3293. + {
  3294. + if (Unit* pet = GetUnitOwner())
  3295. + {
  3296. + if (!pet->isPet())
  3297. + return;
  3298. +
  3299. + Unit* owner = pet->ToPet()->GetOwner();
  3300. + if (!owner)
  3301. + return;
  3302. +
  3303. + float mod = 1.0f; //Hunter contribution modifier
  3304. + float bonusDamage = 0.0f;
  3305. +
  3306. + PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
  3307. + if (itr == pet->ToPet()->m_spells.end())
  3308. + itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
  3309. +
  3310. + if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
  3311. + {
  3312. + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
  3313. + mod += CalculatePctN(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
  3314. + }
  3315. +
  3316. + bonusDamage = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod;
  3317. +
  3318. + amount += bonusDamage;
  3319. + }
  3320. + }
  3321. +
  3322. + void Register()
  3323. + {
  3324. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_01_AuraScript::CalculateStaminaAmount, EFFECT_0, SPELL_AURA_MOD_STAT);
  3325. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_01_AuraScript::CalculateAttackPowerAmount, EFFECT_1, SPELL_AURA_MOD_ATTACK_POWER);
  3326. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_01_AuraScript::CalculateDamageDoneAmount, EFFECT_2, SPELL_AURA_MOD_DAMAGE_DONE);
  3327. + }
  3328. + };
  3329. +
  3330. + AuraScript* GetAuraScript() const
  3331. + {
  3332. + return new spell_hun_pet_scaling_01_AuraScript();
  3333. + }
  3334. +};
  3335. +
  3336. +class spell_hun_pet_scaling_02 : public SpellScriptLoader
  3337. +{
  3338. + public:
  3339. + spell_hun_pet_scaling_02() : SpellScriptLoader("spell_hun_pet_scaling_02") { }
  3340. +
  3341. + class spell_hun_pet_scaling_02_AuraScript : public AuraScript
  3342. + {
  3343. + PrepareAuraScript(spell_hun_pet_scaling_02_AuraScript);
  3344. +
  3345. + void CalculateFrostResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3346. + {
  3347. + if (Unit* pet = GetUnitOwner())
  3348. + {
  3349. + if (!pet->isPet())
  3350. + return;
  3351. +
  3352. + Unit* owner = pet->ToPet()->GetOwner();
  3353. + if (!owner)
  3354. + return;
  3355. +
  3356. + float ownerBonus = 0.0f;
  3357. +
  3358. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
  3359. +
  3360. + amount += ownerBonus;
  3361. + }
  3362. + }
  3363. +
  3364. + void CalculateFireResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3365. + {
  3366. + if (Unit* pet = GetUnitOwner())
  3367. + {
  3368. + if (!pet->isPet())
  3369. + return;
  3370. +
  3371. + Unit* owner = pet->ToPet()->GetOwner();
  3372. + if (!owner)
  3373. + return;
  3374. +
  3375. + float ownerBonus = 0.0f;
  3376. +
  3377. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
  3378. +
  3379. + amount += ownerBonus;
  3380. + }
  3381. + }
  3382. +
  3383. + void CalculateNatureResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3384. + {
  3385. + if (Unit* pet = GetUnitOwner())
  3386. + {
  3387. + if (!pet->isPet())
  3388. + return;
  3389. +
  3390. + Unit* owner = pet->ToPet()->GetOwner();
  3391. + if (!owner)
  3392. + return;
  3393. +
  3394. + float ownerBonus = 0.0f;
  3395. +
  3396. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
  3397. +
  3398. + amount += ownerBonus;
  3399. + }
  3400. + }
  3401. +
  3402. + void Register()
  3403. + {
  3404. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_02_AuraScript::CalculateFrostResistanceAmount, EFFECT_1, SPELL_AURA_MOD_RESISTANCE);
  3405. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_02_AuraScript::CalculateFireResistanceAmount, EFFECT_0, SPELL_AURA_MOD_RESISTANCE);
  3406. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_02_AuraScript::CalculateNatureResistanceAmount, EFFECT_2, SPELL_AURA_MOD_RESISTANCE);
  3407. + }
  3408. + };
  3409. +
  3410. + AuraScript* GetAuraScript() const
  3411. + {
  3412. + return new spell_hun_pet_scaling_02_AuraScript();
  3413. + }
  3414. +};
  3415. +
  3416. +class spell_hun_pet_scaling_03 : public SpellScriptLoader
  3417. +{
  3418. + public:
  3419. + spell_hun_pet_scaling_03() : SpellScriptLoader("spell_hun_pet_scaling_03") { }
  3420. +
  3421. + class spell_hun_pet_scaling_03_AuraScript : public AuraScript
  3422. + {
  3423. + PrepareAuraScript(spell_hun_pet_scaling_03_AuraScript);
  3424. +
  3425. + void CalculateShadowResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3426. + {
  3427. + if (Unit* pet = GetUnitOwner())
  3428. + {
  3429. + if (!pet->isPet())
  3430. + return;
  3431. +
  3432. + Unit* owner = pet->ToPet()->GetOwner();
  3433. + if (!owner)
  3434. + return;
  3435. +
  3436. + float ownerBonus = 0.0f;
  3437. +
  3438. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
  3439. +
  3440. + amount += ownerBonus;
  3441. + }
  3442. + }
  3443. +
  3444. + void CalculateArcaneResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3445. + {
  3446. + if (Unit* pet = GetUnitOwner())
  3447. + {
  3448. + if (!pet->isPet())
  3449. + return;
  3450. +
  3451. + Unit* owner = pet->ToPet()->GetOwner();
  3452. + if (!owner)
  3453. + return;
  3454. +
  3455. + float ownerBonus = 0.0f;
  3456. +
  3457. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
  3458. +
  3459. + amount += ownerBonus;
  3460. + }
  3461. + }
  3462. +
  3463. + void CalculateArmorAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  3464. + {
  3465. + if (Unit* pet = GetUnitOwner())
  3466. + {
  3467. + if (!pet->isPet())
  3468. + return;
  3469. +
  3470. + Unit* owner = pet->ToPet()->GetOwner();
  3471. + if (!owner)
  3472. + return;
  3473. +
  3474. + float ownerBonus = 0.0f;
  3475. +
  3476. + ownerBonus = CalculatePctN(owner->GetArmor(), 35);
  3477. +
  3478. + amount += ownerBonus;
  3479. + }
  3480. + }
  3481. +
  3482. + void Register()
  3483. + {
  3484. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_03_AuraScript::CalculateShadowResistanceAmount, EFFECT_0, SPELL_AURA_MOD_RESISTANCE);
  3485. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount, EFFECT_1, SPELL_AURA_MOD_RESISTANCE);
  3486. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_03_AuraScript::CalculateArmorAmount, EFFECT_2, SPELL_AURA_MOD_RESISTANCE);
  3487. + }
  3488. + };
  3489. +
  3490. + AuraScript* GetAuraScript() const
  3491. + {
  3492. + return new spell_hun_pet_scaling_03_AuraScript();
  3493. + }
  3494. +};
  3495. +
  3496. +class spell_hun_pet_scaling_04 : public SpellScriptLoader
  3497. +{
  3498. + public:
  3499. + spell_hun_pet_scaling_04() : SpellScriptLoader("spell_hun_pet_scaling_04") { }
  3500. +
  3501. + class spell_hun_pet_scaling_04_AuraScript : public AuraScript
  3502. + {
  3503. + PrepareAuraScript(spell_hun_pet_scaling_04_AuraScript);
  3504. +
  3505. + bool Load()
  3506. + {
  3507. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3508. + return false;
  3509. + return true;
  3510. + }
  3511. +
  3512. + void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3513. + {
  3514. + if (!GetCaster() || !GetCaster()->GetOwner())
  3515. + return;
  3516. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3517. + {
  3518. + // For others recalculate it from:
  3519. + float HitMelee = 0.0f;
  3520. + // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
  3521. + HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
  3522. + // Increase hit melee from meele hit ratings
  3523. + HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
  3524. +
  3525. + amount += int32(HitMelee);
  3526. + }
  3527. + }
  3528. +
  3529. + void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3530. + {
  3531. + if (!GetCaster() || !GetCaster()->GetOwner())
  3532. + return;
  3533. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3534. + {
  3535. + // For others recalculate it from:
  3536. + float HitSpell = 0.0f;
  3537. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  3538. + HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3539. + // Increase hit spell from spell hit ratings
  3540. + HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
  3541. +
  3542. + amount += int32(HitSpell);
  3543. + }
  3544. + }
  3545. +
  3546. + void CalculateAmountExpertise(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3547. + {
  3548. + if (!GetCaster() || !GetCaster()->GetOwner())
  3549. + return;
  3550. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3551. + {
  3552. + // For others recalculate it from:
  3553. + float Expertise = 0.0f;
  3554. + // Increase hit from SPELL_AURA_MOD_EXPERTISE
  3555. + Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE);
  3556. + // Increase Expertise from Expertise ratings
  3557. + Expertise += owner->GetRatingBonusValue(CR_EXPERTISE);
  3558. +
  3559. + amount += int32(Expertise);
  3560. + }
  3561. + }
  3562. +
  3563. + void Register()
  3564. + {
  3565. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_04_AuraScript::CalculateAmountMeleeHit, EFFECT_0, SPELL_AURA_MOD_HIT_CHANCE);
  3566. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_04_AuraScript::CalculateAmountSpellHit, EFFECT_1, SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3567. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_scaling_04_AuraScript::CalculateAmountExpertise, EFFECT_2, SPELL_AURA_MOD_EXPERTISE);
  3568. + }
  3569. + };
  3570. +
  3571. + AuraScript* GetAuraScript() const
  3572. + {
  3573. + return new spell_hun_pet_scaling_04_AuraScript();
  3574. + }
  3575. +};
  3576. +
  3577. +class spell_hun_pet_passive_crit : public SpellScriptLoader
  3578. +{
  3579. + public:
  3580. + spell_hun_pet_passive_crit() : SpellScriptLoader("spell_hun_pet_passive_crit") { }
  3581. +
  3582. + class spell_hun_pet_passive_crit_AuraScript : public AuraScript
  3583. + {
  3584. + PrepareAuraScript(spell_hun_pet_passive_crit_AuraScript);
  3585. +
  3586. + bool Load()
  3587. + {
  3588. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3589. + return false;
  3590. + return true;
  3591. + }
  3592. +
  3593. + void CalculateAmountCritSpell(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3594. + {
  3595. + if (!GetCaster() || !GetCaster()->GetOwner())
  3596. + return;
  3597. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3598. + {
  3599. + // For others recalculate it from:
  3600. + float CritSpell = 0.0f;
  3601. + // Crit from Intellect
  3602. + // CritSpell += owner->GetSpellCritFromIntellect();
  3603. + // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
  3604. + // CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
  3605. + // Increase crit from SPELL_AURA_MOD_CRIT_PCT
  3606. + // CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
  3607. + // Increase crit spell from spell crit ratings
  3608. + // CritSpell += owner->GetRatingBonusValue(CR_CRIT_SPELL);
  3609. +
  3610. + amount += (CritSpell*0.8f);
  3611. + }
  3612. + }
  3613. +
  3614. + void CalculateAmountCritMelee(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3615. + {
  3616. + if (!GetCaster() || !GetCaster()->GetOwner())
  3617. + return;
  3618. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3619. + {
  3620. + // For others recalculate it from:
  3621. + float CritMelee = 0.0f;
  3622. + // Crit from Agility
  3623. + // CritMelee += owner->GetMeleeCritFromAgility();
  3624. + // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
  3625. + // CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
  3626. + // Increase crit from SPELL_AURA_MOD_CRIT_PCT
  3627. + // CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
  3628. + // Increase crit melee from melee crit ratings
  3629. + // CritMelee += owner->GetRatingBonusValue(CR_CRIT_MELEE);
  3630. +
  3631. + amount += (CritMelee*0.8f);
  3632. + }
  3633. + }
  3634. +
  3635. + void Register()
  3636. + {
  3637. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_passive_crit_AuraScript::CalculateAmountCritSpell, EFFECT_1, SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
  3638. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_passive_crit_AuraScript::CalculateAmountCritMelee, EFFECT_0, SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
  3639. + }
  3640. + };
  3641. +
  3642. + AuraScript* GetAuraScript() const
  3643. + {
  3644. + return new spell_hun_pet_passive_crit_AuraScript();
  3645. + }
  3646. +};
  3647. +
  3648. +class spell_hun_pet_passive_damage_done : public SpellScriptLoader
  3649. +{
  3650. + public:
  3651. + spell_hun_pet_passive_damage_done() : SpellScriptLoader("spell_hun_pet_passive_damage_done") { }
  3652. +
  3653. + class spell_hun_pet_passive_damage_done_AuraScript : public AuraScript
  3654. + {
  3655. + PrepareAuraScript(spell_hun_pet_passive_damage_done_AuraScript);
  3656. +
  3657. + bool Load()
  3658. + {
  3659. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3660. + return false;
  3661. + return true;
  3662. + }
  3663. +
  3664. + void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3665. + {
  3666. + if (!GetCaster() || !GetCaster()->GetOwner())
  3667. + return;
  3668. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3669. + {
  3670. + // Pet's base damage changes depending on happiness
  3671. + if (GetCaster()->isPet() && GetCaster()->ToPet()->isHunterPet())
  3672. + {
  3673. + switch (GetCaster()->ToPet()->GetHappinessState())
  3674. + {
  3675. + case HAPPY:
  3676. + // 125% of normal damage
  3677. + amount += 25.0f;
  3678. + break;
  3679. + case CONTENT:
  3680. + // 100% of normal damage, nothing to modify
  3681. + break;
  3682. + case UNHAPPY:
  3683. + // 75% of normal damage
  3684. + amount += -25.0f;
  3685. + break;
  3686. + }
  3687. + }
  3688. + }
  3689. + }
  3690. +
  3691. + void Register()
  3692. + {
  3693. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_passive_damage_done_AuraScript::CalculateAmountDamageDone, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
  3694. + }
  3695. + };
  3696. +
  3697. + AuraScript* GetAuraScript() const
  3698. + {
  3699. + return new spell_hun_pet_passive_damage_done_AuraScript();
  3700. + }
  3701. +};
  3702. +
  3703. +class spell_hun_animal_handler : public SpellScriptLoader
  3704. +{
  3705. + public:
  3706. + spell_hun_animal_handler() : SpellScriptLoader("spell_hun_animal_handler") { }
  3707. +
  3708. + class spell_hun_animal_handler_AuraScript : public AuraScript
  3709. + {
  3710. + PrepareAuraScript(spell_hun_animal_handler_AuraScript);
  3711. +
  3712. + bool Load()
  3713. + {
  3714. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3715. + return false;
  3716. + return true;
  3717. + }
  3718. +
  3719. + void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3720. + {
  3721. + if (!GetCaster() || !GetCaster()->GetOwner())
  3722. + return;
  3723. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3724. + {
  3725. + if (AuraEffect* aurEffect = owner->GetAuraEffectOfRankedSpell(HUNTER_SPELL_ANIMAL_HANDLER, EFFECT_1))
  3726. + amount = aurEffect->GetAmount();
  3727. + else
  3728. + amount = 0;
  3729. + }
  3730. + }
  3731. +
  3732. + void Register()
  3733. + {
  3734. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_animal_handler_AuraScript::CalculateAmountDamageDone, EFFECT_0, SPELL_AURA_MOD_ATTACK_POWER_PCT);
  3735. + }
  3736. + };
  3737. +
  3738. + AuraScript* GetAuraScript() const
  3739. + {
  3740. + return new spell_hun_animal_handler_AuraScript();
  3741. + }
  3742. +};
  3743. +
  3744. +class spell_hun_kill_command : public SpellScriptLoader
  3745. +{
  3746. +public:
  3747. + spell_hun_kill_command() : SpellScriptLoader("spell_hun_kill_command") { }
  3748. +
  3749. + class spell_hun_kill_command_AuraScript : public AuraScript
  3750. + {
  3751. + PrepareAuraScript(spell_hun_kill_command_AuraScript)
  3752. + void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
  3753. + {
  3754. + if (Unit* m_target = GetTarget())
  3755. + {
  3756. + if (GetCaster()->HasAura(HUNTER_SPELL_FOCUSED_FIRE_2))
  3757. + m_target->CastSpell(m_target, HUNTER_SPELL_KILL_COMMAND_CRIT_20, true);
  3758. + else if (GetCaster()->HasAura(HUNTER_SPELL_FOCUSED_FIRE_1))
  3759. + m_target->CastSpell(m_target, HUNTER_SPELL_KILL_COMMAND_CRIT_10, true);
  3760. + }
  3761. +
  3762. + }
  3763. +
  3764. + void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
  3765. + {
  3766. + if (Unit* m_target = GetTarget())
  3767. + {
  3768. + m_target->RemoveAurasDueToSpell(HUNTER_SPELL_KILL_COMMAND_CRIT_10);
  3769. + m_target->RemoveAurasDueToSpell(HUNTER_SPELL_KILL_COMMAND_CRIT_20);
  3770. + }
  3771. + }
  3772. +
  3773. + void Register()
  3774. + {
  3775. + OnEffectRemove += AuraEffectRemoveFn(spell_hun_kill_command_AuraScript::RemoveEffect, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
  3776. + OnEffectApply += AuraEffectApplyFn(spell_hun_kill_command_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
  3777. + }
  3778. + };
  3779. +
  3780. + AuraScript* GetAuraScript() const
  3781. + {
  3782. + return new spell_hun_kill_command_AuraScript();
  3783. + }
  3784. +};
  3785. +
  3786. void AddSC_hunter_spell_scripts()
  3787. {
  3788. new spell_hun_aspect_of_the_beast();
  3789. @@ -574,4 +1142,12 @@ void AddSC_hunter_spell_scripts()
  3790. new spell_hun_sniper_training();
  3791. new spell_hun_pet_heart_of_the_phoenix();
  3792. new spell_hun_pet_carrion_feeder();
  3793. + new spell_hun_pet_scaling_01();
  3794. + new spell_hun_pet_scaling_02();
  3795. + new spell_hun_pet_scaling_03();
  3796. + new spell_hun_pet_scaling_04();
  3797. + new spell_hun_pet_passive_crit();
  3798. + new spell_hun_pet_passive_damage_done();
  3799. + new spell_hun_animal_handler();
  3800. + new spell_hun_kill_command();
  3801. }
  3802. diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
  3803. index b0116d6..90e4393 100644
  3804. --- a/src/server/scripts/Spells/spell_shaman.cpp
  3805. +++ b/src/server/scripts/Spells/spell_shaman.cpp
  3806. @@ -316,6 +316,70 @@ class spell_sha_heroism : public SpellScriptLoader
  3807. }
  3808. };
  3809.  
  3810. +class spell_sha_pet_scaling_04 : public SpellScriptLoader
  3811. +{
  3812. + public:
  3813. + spell_sha_pet_scaling_04() : SpellScriptLoader("spell_sha_pet_scaling_04") { }
  3814. +
  3815. + class spell_sha_pet_scaling_04_AuraScript : public AuraScript
  3816. + {
  3817. + PrepareAuraScript(spell_sha_pet_scaling_04_AuraScript);
  3818. +
  3819. + bool Load()
  3820. + {
  3821. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  3822. + return false;
  3823. + return true;
  3824. + }
  3825. +
  3826. + void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3827. + {
  3828. + if (!GetCaster() || !GetCaster()->GetOwner())
  3829. + return;
  3830. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3831. + {
  3832. + // For others recalculate it from:
  3833. + float HitMelee = 0.0f;
  3834. + // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
  3835. + HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
  3836. + // Increase hit melee from meele hit ratings
  3837. + HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
  3838. +
  3839. + amount += int32(HitMelee);
  3840. + }
  3841. + }
  3842. +
  3843. + void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  3844. + {
  3845. + if (!GetCaster() || !GetCaster()->GetOwner())
  3846. + return;
  3847. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  3848. + {
  3849. + // For others recalculate it from:
  3850. + float HitSpell = 0.0f;
  3851. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  3852. + HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3853. + // Increase hit spell from spell hit ratings
  3854. + HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
  3855. +
  3856. + amount += int32(HitSpell);
  3857. + }
  3858. + }
  3859. +
  3860. + void Register()
  3861. + {
  3862. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_pet_scaling_04_AuraScript::CalculateAmountMeleeHit, EFFECT_0, SPELL_AURA_MOD_HIT_CHANCE);
  3863. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_pet_scaling_04_AuraScript::CalculateAmountSpellHit, EFFECT_1, SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  3864. + }
  3865. + };
  3866. +
  3867. + AuraScript* GetAuraScript() const
  3868. + {
  3869. + return new spell_sha_pet_scaling_04_AuraScript();
  3870. + }
  3871. +};
  3872. +
  3873. +
  3874. void AddSC_shaman_spell_scripts()
  3875. {
  3876. new spell_sha_astral_shift();
  3877. @@ -324,4 +388,5 @@ void AddSC_shaman_spell_scripts()
  3878. new spell_sha_earthbind_totem();
  3879. new spell_sha_bloodlust();
  3880. new spell_sha_heroism();
  3881. + new spell_sha_pet_scaling_04();
  3882. }
  3883. diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
  3884. index d81808f..0954182 100644
  3885. --- a/src/server/scripts/Spells/spell_warlock.cpp
  3886. +++ b/src/server/scripts/Spells/spell_warlock.cpp
  3887. @@ -41,6 +41,17 @@ enum WarlockSpells
  3888. WARLOCK_SHADOWFLAME_AURA_R1 = 47960,
  3889. WARLOCK_SHADOWFLAME_R2 = 61290,
  3890. WARLOCK_SHADOWFLAME_AURA_R2 = 61291,
  3891. +
  3892. + WARLOCK_PET_PASSIVE = 35695,
  3893. + WARLOCK_DEMONIC_TACTICS = 30242,
  3894. + WARLOCK_AVOIDANCE_PASSIVE = 32233,
  3895. +
  3896. + ENTRY_IMP = 416,
  3897. + ENTRY_VOIDWALKER = 1860,
  3898. + ENTRY_SUCCUBUS = 1863,
  3899. + ENTRY_FELHUNTER = 417,
  3900. + ENTRY_FELGUARD = 17252,
  3901. + ENTRY_DOOMGUARD = 11859
  3902. };
  3903.  
  3904. class spell_warl_banish : public SpellScriptLoader
  3905. @@ -315,10 +326,6 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
  3906. }
  3907. };
  3908.  
  3909. -enum eEnslaveDemon
  3910. -{
  3911. - NPC_DOOMGUARD = 11859
  3912. -};
  3913. class spell_warl_enslave_demon : public SpellScriptLoader
  3914. {
  3915. public:
  3916. @@ -329,15 +336,35 @@ public:
  3917. PrepareAuraScript(spell_warl_enslave_demon_AuraScript)
  3918. void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
  3919. {
  3920. + if (GetCaster()->GetTypeId() != TYPEID_PLAYER)
  3921. + return;
  3922. +
  3923. if (Unit* m_target = GetTarget())
  3924. {
  3925. if (m_target->GetTypeId() == TYPEID_UNIT)
  3926. {
  3927. - if (m_target->GetEntry() == NPC_DOOMGUARD && m_target->isSummon())
  3928. - m_target->ToCreature()->ToTempSummon()->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN);
  3929. + if (m_target->GetEntry() == ENTRY_DOOMGUARD && m_target->isSummon())
  3930. + {
  3931. + m_target->ToTempSummon()->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN);
  3932. + //the damage bonus used for pets is either fire or shadow damage, whatever is higher
  3933. + int32 fire = int32(GetCaster()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - GetCaster()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  3934. + int32 shadow = int32(GetCaster()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) - GetCaster()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
  3935. + int32 maximum = (fire > shadow) ? fire : shadow;
  3936. + if (maximum < 0)
  3937. + maximum = 0;
  3938. + float bonusDamage = maximum * 0.15f;
  3939. + m_target->ToTempSummon()->SetBonusDamage(bonusDamage);
  3940. + m_target->CastSpell(m_target, WARLOCK_AVOIDANCE_PASSIVE, true);
  3941. + }
  3942.  
  3943. - if (Unit* m_caster = GetCaster())
  3944. - m_caster->SetPetGUID(m_target->GetGUID());
  3945. + GetCaster()->SetPetGUID(m_target->GetGUID());
  3946. + AuraEffect* aurEffect = GetCaster()->GetAuraEffectOfRankedSpell(WARLOCK_DEMONIC_TACTICS, EFFECT_0);
  3947. + if (aurEffect)
  3948. + {
  3949. + int32 basePoints0 = aurEffect->GetAmount();
  3950. + int32 basePoints1 = aurEffect->GetAmount();
  3951. + m_target->CastCustomSpell(m_target, WARLOCK_PET_PASSIVE, &basePoints0, &basePoints1, NULL, true);
  3952. + }
  3953. }
  3954. }
  3955.  
  3956. @@ -345,15 +372,24 @@ public:
  3957.  
  3958. void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
  3959. {
  3960. + if (GetCaster()->GetTypeId() != TYPEID_PLAYER)
  3961. + return;
  3962. +
  3963. if (Unit* m_target = GetTarget())
  3964. + {
  3965. if (m_target->GetTypeId() == TYPEID_UNIT)
  3966. {
  3967. - if (m_target->GetEntry() == NPC_DOOMGUARD && m_target->isSummon())
  3968. - m_target->ToCreature()->ToTempSummon()->SetTempSummonType(TEMPSUMMON_TIMED_DESPAWN);
  3969. -
  3970. - if (Unit* m_caster = GetCaster())
  3971. - m_caster->SetPetGUID(0);
  3972. + if (m_target->GetEntry() == ENTRY_DOOMGUARD && m_target->isSummon())
  3973. + {
  3974. + m_target->RemoveAurasDueToSpell(WARLOCK_AVOIDANCE_PASSIVE);
  3975. + m_target->ToTempSummon()->SetTempSummonType(TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
  3976. + }
  3977. +
  3978. + m_target->RemoveAurasDueToSpell(WARLOCK_PET_PASSIVE);
  3979. +
  3980. + GetCaster()->SetPetGUID(0);
  3981. }
  3982. + }
  3983. }
  3984.  
  3985. void Register()
  3986. @@ -370,14 +406,14 @@ public:
  3987. };
  3988.  
  3989. // Shadowflame
  3990. -class spell_shadowflame : public SpellScriptLoader
  3991. +class spell_warl_shadowflame : public SpellScriptLoader
  3992. {
  3993. public:
  3994. - spell_shadowflame() : SpellScriptLoader("spell_shadowflame") { }
  3995. + spell_warl_shadowflame() : SpellScriptLoader("spell_warl_shadowflame") { }
  3996.  
  3997. - class spell_shadowflame_SpellScript : public SpellScript
  3998. + class spell_warl_shadowflame_SpellScript : public SpellScript
  3999. {
  4000. - PrepareSpellScript(spell_shadowflame_SpellScript);
  4001. + PrepareSpellScript(spell_warl_shadowflame_SpellScript);
  4002.  
  4003. void HandleAdditionnalEffect(SpellEffIndex /*effIndex*/)
  4004. {
  4005. @@ -394,16 +430,560 @@ public:
  4006.  
  4007. void Register()
  4008. {
  4009. - OnEffectHitTarget += SpellEffectFn(spell_shadowflame_SpellScript::HandleAdditionnalEffect, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
  4010. + OnEffectHitTarget += SpellEffectFn(spell_warl_shadowflame_SpellScript::HandleAdditionnalEffect, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
  4011. }
  4012. };
  4013.  
  4014. SpellScript* GetSpellScript() const
  4015. {
  4016. - return new spell_shadowflame_SpellScript();
  4017. + return new spell_warl_shadowflame_SpellScript();
  4018. }
  4019. };
  4020.  
  4021. +class spell_warl_pet_scaling_01 : public SpellScriptLoader
  4022. +{
  4023. + public:
  4024. + spell_warl_pet_scaling_01() : SpellScriptLoader("spell_warl_pet_scaling_01") { }
  4025. +
  4026. + class spell_warl_pet_scaling_01_AuraScript : public AuraScript
  4027. + {
  4028. + PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript);
  4029. +
  4030. + void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4031. + {
  4032. + if (Unit* pet = GetUnitOwner())
  4033. + {
  4034. + if (!pet->isPet())
  4035. + return;
  4036. +
  4037. + Unit* owner = pet->ToPet()->GetOwner();
  4038. + if (!owner)
  4039. + return;
  4040. +
  4041. + float ownerBonus = 0.0f;
  4042. +
  4043. + ownerBonus = CalculatePctN(owner->GetStat(STAT_STAMINA), 75);
  4044. +
  4045. + amount += ownerBonus;
  4046. + }
  4047. + }
  4048. +
  4049. + void CalculateAttackPowerAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4050. + {
  4051. + if (Unit* pet = GetUnitOwner())
  4052. + {
  4053. + if (!pet->isPet())
  4054. + return;
  4055. +
  4056. + Unit* owner = pet->ToPet()->GetOwner();
  4057. + if (!owner)
  4058. + return;
  4059. +
  4060. + int32 fire = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  4061. + int32 shadow = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
  4062. + int32 maximum = (fire > shadow) ? fire : shadow;
  4063. + if (maximum < 0)
  4064. + maximum = 0;
  4065. + float bonusAP = maximum * 0.57f;
  4066. +
  4067. + amount += bonusAP;
  4068. +
  4069. + // Glyph of felguard
  4070. + if (pet->GetEntry() == ENTRY_FELGUARD)
  4071. + {
  4072. + if (AuraEffect* aurEffect = owner->GetAuraEffect(56246, EFFECT_0))
  4073. + {
  4074. + float base_attPower = pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT);
  4075. + amount += CalculatePctN(amount+base_attPower, aurEffect->GetAmount());
  4076. + }
  4077. + }
  4078. + }
  4079. + }
  4080. +
  4081. + void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4082. + {
  4083. + if (Unit* pet = GetUnitOwner())
  4084. + {
  4085. + if (!pet->isPet())
  4086. + return;
  4087. +
  4088. + Unit* owner = pet->ToPet()->GetOwner();
  4089. + if (!owner)
  4090. + return;
  4091. +
  4092. + //the damage bonus used for pets is either fire or shadow damage, whatever is higher
  4093. + int32 fire = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
  4094. + int32 shadow = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
  4095. + int32 maximum = (fire > shadow) ? fire : shadow;
  4096. + if (maximum < 0)
  4097. + maximum = 0;
  4098. + float bonusDamage = maximum * 0.15f;
  4099. +
  4100. + amount += bonusDamage;
  4101. + }
  4102. + }
  4103. +
  4104. + void Register()
  4105. + {
  4106. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_01_AuraScript::CalculateStaminaAmount, EFFECT_0, SPELL_AURA_MOD_STAT);
  4107. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_01_AuraScript::CalculateAttackPowerAmount, EFFECT_1, SPELL_AURA_MOD_ATTACK_POWER);
  4108. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_01_AuraScript::CalculateDamageDoneAmount, EFFECT_2, SPELL_AURA_MOD_DAMAGE_DONE);
  4109. + }
  4110. + };
  4111. +
  4112. + AuraScript* GetAuraScript() const
  4113. + {
  4114. + return new spell_warl_pet_scaling_01_AuraScript();
  4115. + }
  4116. +};
  4117. +
  4118. +class spell_warl_pet_scaling_02 : public SpellScriptLoader
  4119. +{
  4120. + public:
  4121. + spell_warl_pet_scaling_02() : SpellScriptLoader("spell_warl_pet_scaling_02") { }
  4122. +
  4123. + class spell_warl_pet_scaling_02_AuraScript : public AuraScript
  4124. + {
  4125. + PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript);
  4126. +
  4127. + void CalculateIntellectAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4128. + {
  4129. + if (Unit* pet = GetUnitOwner())
  4130. + {
  4131. + if (!pet->isPet())
  4132. + return;
  4133. +
  4134. + Unit* owner = pet->ToPet()->GetOwner();
  4135. + if (!owner)
  4136. + return;
  4137. +
  4138. + float ownerBonus = 0.0f;
  4139. +
  4140. + ownerBonus = CalculatePctN(owner->GetStat(STAT_INTELLECT), 30);
  4141. +
  4142. + amount += ownerBonus;
  4143. + }
  4144. + }
  4145. +
  4146. + void CalculateArmorAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4147. + {
  4148. + if (Unit* pet = GetUnitOwner())
  4149. + {
  4150. + if (!pet->isPet())
  4151. + return;
  4152. +
  4153. + Unit* owner = pet->ToPet()->GetOwner();
  4154. + if (!owner)
  4155. + return;
  4156. +
  4157. + float ownerBonus = 0.0f;
  4158. +
  4159. + ownerBonus = CalculatePctN(owner->GetArmor(), 35);
  4160. +
  4161. + amount += ownerBonus;
  4162. + }
  4163. + }
  4164. +
  4165. + void CalculateFireResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4166. + {
  4167. + if (Unit* pet = GetUnitOwner())
  4168. + {
  4169. + if (!pet->isPet())
  4170. + return;
  4171. +
  4172. + Unit* owner = pet->ToPet()->GetOwner();
  4173. + if (!owner)
  4174. + return;
  4175. +
  4176. + float ownerBonus = 0.0f;
  4177. +
  4178. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
  4179. +
  4180. + amount += ownerBonus;
  4181. + }
  4182. + }
  4183. +
  4184. + void Register()
  4185. + {
  4186. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_02_AuraScript::CalculateIntellectAmount, EFFECT_0, SPELL_AURA_MOD_STAT);
  4187. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_02_AuraScript::CalculateArmorAmount, EFFECT_1, SPELL_AURA_MOD_RESISTANCE);
  4188. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_02_AuraScript::CalculateFireResistanceAmount, EFFECT_2, SPELL_AURA_MOD_RESISTANCE);
  4189. + }
  4190. + };
  4191. +
  4192. + AuraScript* GetAuraScript() const
  4193. + {
  4194. + return new spell_warl_pet_scaling_02_AuraScript();
  4195. + }
  4196. +};
  4197. +
  4198. +class spell_warl_pet_scaling_03 : public SpellScriptLoader
  4199. +{
  4200. + public:
  4201. + spell_warl_pet_scaling_03() : SpellScriptLoader("spell_warl_pet_scaling_03") { }
  4202. +
  4203. + class spell_warl_pet_scaling_03_AuraScript : public AuraScript
  4204. + {
  4205. + PrepareAuraScript(spell_warl_pet_scaling_03_AuraScript);
  4206. +
  4207. + void CalculateFrostResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4208. + {
  4209. + if (Unit* pet = GetUnitOwner())
  4210. + {
  4211. + if (!pet->isPet())
  4212. + return;
  4213. +
  4214. + Unit* owner = pet->ToPet()->GetOwner();
  4215. + if (!owner)
  4216. + return;
  4217. +
  4218. + float ownerBonus = 0.0f;
  4219. +
  4220. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
  4221. +
  4222. + amount += ownerBonus;
  4223. + }
  4224. + }
  4225. +
  4226. + void CalculateArcaneResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4227. + {
  4228. + if (Unit* pet = GetUnitOwner())
  4229. + {
  4230. + if (!pet->isPet())
  4231. + return;
  4232. +
  4233. + Unit* owner = pet->ToPet()->GetOwner();
  4234. + if (!owner)
  4235. + return;
  4236. +
  4237. + float ownerBonus = 0.0f;
  4238. +
  4239. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
  4240. +
  4241. + amount += ownerBonus;
  4242. + }
  4243. + }
  4244. +
  4245. + void CalculateNatureResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4246. + {
  4247. + if (Unit* pet = GetUnitOwner())
  4248. + {
  4249. + if (!pet->isPet())
  4250. + return;
  4251. +
  4252. + Unit* owner = pet->ToPet()->GetOwner();
  4253. + if (!owner)
  4254. + return;
  4255. +
  4256. + float ownerBonus = 0.0f;
  4257. +
  4258. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
  4259. +
  4260. + amount += ownerBonus;
  4261. + }
  4262. + }
  4263. +
  4264. + void Register()
  4265. + {
  4266. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_03_AuraScript::CalculateFrostResistanceAmount, EFFECT_0, SPELL_AURA_MOD_RESISTANCE);
  4267. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount, EFFECT_1, SPELL_AURA_MOD_RESISTANCE);
  4268. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_03_AuraScript::CalculateNatureResistanceAmount, EFFECT_2, SPELL_AURA_MOD_RESISTANCE);
  4269. + }
  4270. + };
  4271. +
  4272. + AuraScript* GetAuraScript() const
  4273. + {
  4274. + return new spell_warl_pet_scaling_03_AuraScript();
  4275. + }
  4276. +};
  4277. +
  4278. +
  4279. +class spell_warl_pet_scaling_04 : public SpellScriptLoader
  4280. +{
  4281. + public:
  4282. + spell_warl_pet_scaling_04() : SpellScriptLoader("spell_warl_pet_scaling_04") { }
  4283. +
  4284. + class spell_warl_pet_scaling_04_AuraScript : public AuraScript
  4285. + {
  4286. + PrepareAuraScript(spell_warl_pet_scaling_04_AuraScript);
  4287. +
  4288. + void CalculateShadowResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4289. + {
  4290. + if (Unit* pet = GetUnitOwner())
  4291. + {
  4292. + if (!pet->isPet())
  4293. + return;
  4294. +
  4295. + Unit* owner = pet->ToPet()->GetOwner();
  4296. + if (!owner)
  4297. + return;
  4298. +
  4299. + float ownerBonus = 0.0f;
  4300. +
  4301. + ownerBonus = CalculatePctN(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
  4302. +
  4303. + amount += ownerBonus;
  4304. + }
  4305. + }
  4306. +
  4307. + void Register()
  4308. + {
  4309. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_04_AuraScript::CalculateShadowResistanceAmount, EFFECT_0, SPELL_AURA_MOD_RESISTANCE);
  4310. + }
  4311. + };
  4312. +
  4313. + AuraScript* GetAuraScript() const
  4314. + {
  4315. + return new spell_warl_pet_scaling_04_AuraScript();
  4316. + }
  4317. +};
  4318. +
  4319. +class spell_warl_pet_scaling_05 : public SpellScriptLoader
  4320. +{
  4321. + public:
  4322. + spell_warl_pet_scaling_05() : SpellScriptLoader("spell_warl_pet_scaling_05") { }
  4323. +
  4324. + class spell_warl_pet_scaling_05_AuraScript : public AuraScript
  4325. + {
  4326. + PrepareAuraScript(spell_warl_pet_scaling_05_AuraScript);
  4327. +
  4328. + bool Load()
  4329. + {
  4330. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  4331. + return false;
  4332. + return true;
  4333. + }
  4334. +
  4335. + void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4336. + {
  4337. + if (!GetCaster() || !GetCaster()->GetOwner())
  4338. + return;
  4339. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4340. + {
  4341. + // For others recalculate it from:
  4342. + float HitMelee = 0.0f;
  4343. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  4344. + HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  4345. + // Increase hit spell from spell hit ratings
  4346. + HitMelee += owner->GetRatingBonusValue(CR_HIT_SPELL);
  4347. +
  4348. + amount += int32(HitMelee);
  4349. + }
  4350. + }
  4351. +
  4352. + void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4353. + {
  4354. + if (!GetCaster() || !GetCaster()->GetOwner())
  4355. + return;
  4356. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4357. + {
  4358. + // For others recalculate it from:
  4359. + float HitSpell = 0.0f;
  4360. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  4361. + HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  4362. + // Increase hit spell from spell hit ratings
  4363. + HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
  4364. +
  4365. + amount += int32(HitSpell);
  4366. + }
  4367. + }
  4368. +
  4369. + void CalculateAmountExpertise(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4370. + {
  4371. + if (!GetCaster() || !GetCaster()->GetOwner())
  4372. + return;
  4373. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4374. + {
  4375. + // For others recalculate it from:
  4376. + float Expertise = 0.0f;
  4377. + // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
  4378. + Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  4379. + // Increase hit spell from spell hit ratings
  4380. + Expertise += owner->GetRatingBonusValue(CR_HIT_SPELL);
  4381. +
  4382. + amount += int32(Expertise);
  4383. + }
  4384. + }
  4385. +
  4386. + void Register()
  4387. + {
  4388. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_05_AuraScript::CalculateAmountMeleeHit, EFFECT_0, SPELL_AURA_MOD_HIT_CHANCE);
  4389. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_05_AuraScript::CalculateAmountSpellHit, EFFECT_1, SPELL_AURA_MOD_SPELL_HIT_CHANCE);
  4390. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_scaling_05_AuraScript::CalculateAmountExpertise, EFFECT_2, SPELL_AURA_MOD_EXPERTISE);
  4391. + }
  4392. + };
  4393. +
  4394. + AuraScript* GetAuraScript() const
  4395. + {
  4396. + return new spell_warl_pet_scaling_05_AuraScript();
  4397. + }
  4398. +};
  4399. +
  4400. +class spell_warl_pet_passive : public SpellScriptLoader
  4401. +{
  4402. + public:
  4403. + spell_warl_pet_passive() : SpellScriptLoader("spell_warl_pet_passive") { }
  4404. +
  4405. + class spell_warl_pet_passive_AuraScript : public AuraScript
  4406. + {
  4407. + PrepareAuraScript(spell_warl_pet_passive_AuraScript);
  4408. +
  4409. + bool Load()
  4410. + {
  4411. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  4412. + return false;
  4413. + return true;
  4414. + }
  4415. +
  4416. + void CalculateAmountCritSpell(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4417. + {
  4418. + if (!GetCaster() || !GetCaster()->GetOwner())
  4419. + return;
  4420. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4421. + {
  4422. + // For others recalculate it from:
  4423. + float CritSpell = 0.0f;
  4424. + // Crit from Intellect
  4425. + CritSpell += owner->GetSpellCritFromIntellect();
  4426. + // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
  4427. + CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
  4428. + // Increase crit from SPELL_AURA_MOD_CRIT_PCT
  4429. + CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
  4430. + // Increase crit spell from spell crit ratings
  4431. + CritSpell += owner->GetRatingBonusValue(CR_CRIT_SPELL);
  4432. +
  4433. + if (AuraApplication* improvedDemonicTacticsApp = owner->GetAuraApplicationOfRankedSpell(54347))
  4434. + if (Aura* improvedDemonicTactics = improvedDemonicTacticsApp->GetBase())
  4435. + if (AuraEffect* improvedDemonicTacticsEffect = improvedDemonicTactics->GetEffect(EFFECT_0))
  4436. + amount += CalculatePctN(CritSpell, improvedDemonicTacticsEffect->GetAmount());
  4437. + }
  4438. + }
  4439. +
  4440. + void CalculateAmountCritMelee(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4441. + {
  4442. + if (!GetCaster() || !GetCaster()->GetOwner())
  4443. + return;
  4444. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4445. + {
  4446. + // For others recalculate it from:
  4447. + float CritMelee = 0.0f;
  4448. + // Crit from Agility
  4449. + CritMelee += owner->GetMeleeCritFromAgility();
  4450. + // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
  4451. + CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
  4452. + // Increase crit from SPELL_AURA_MOD_CRIT_PCT
  4453. + CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
  4454. + // Increase crit melee from melee crit ratings
  4455. + CritMelee += owner->GetRatingBonusValue(CR_CRIT_MELEE);
  4456. +
  4457. + if (AuraApplication* improvedDemonicTacticsApp = owner->GetAuraApplicationOfRankedSpell(54347))
  4458. + if (Aura* improvedDemonicTactics = improvedDemonicTacticsApp->GetBase())
  4459. + if (AuraEffect* improvedDemonicTacticsEffect = improvedDemonicTactics->GetEffect(EFFECT_0))
  4460. + amount += CalculatePctN(CritMelee, improvedDemonicTacticsEffect->GetAmount());
  4461. + }
  4462. + }
  4463. +
  4464. + void Register()
  4465. + {
  4466. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_passive_AuraScript::CalculateAmountCritSpell, EFFECT_0, SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
  4467. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_passive_AuraScript::CalculateAmountCritMelee, EFFECT_1, SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
  4468. + }
  4469. + };
  4470. +
  4471. + AuraScript* GetAuraScript() const
  4472. + {
  4473. + return new spell_warl_pet_passive_AuraScript();
  4474. + }
  4475. +};
  4476. +
  4477. +class spell_warl_pet_passive_damage_done : public SpellScriptLoader
  4478. +{
  4479. + public:
  4480. + spell_warl_pet_passive_damage_done() : SpellScriptLoader("spell_warl_pet_passive_damage_done") { }
  4481. +
  4482. + class spell_warl_pet_passive_damage_done_AuraScript : public AuraScript
  4483. + {
  4484. + PrepareAuraScript(spell_warl_pet_passive_damage_done_AuraScript);
  4485. +
  4486. + bool Load()
  4487. + {
  4488. + if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
  4489. + return false;
  4490. + return true;
  4491. + }
  4492. +
  4493. + void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
  4494. + {
  4495. + if (!GetCaster() || !GetCaster()->GetOwner())
  4496. + return;
  4497. + if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
  4498. + {
  4499. + switch (GetCaster()->GetEntry())
  4500. + {
  4501. + case ENTRY_VOIDWALKER:
  4502. + amount += -16;
  4503. + break;
  4504. + case ENTRY_FELHUNTER:
  4505. + amount += -20;
  4506. + break;
  4507. + case ENTRY_SUCCUBUS:
  4508. + case ENTRY_FELGUARD:
  4509. + amount += 5;
  4510. + break;
  4511. + }
  4512. + }
  4513. + }
  4514. +
  4515. + void Register()
  4516. + {
  4517. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_passive_damage_done_AuraScript::CalculateAmountDamageDone, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
  4518. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_passive_damage_done_AuraScript::CalculateAmountDamageDone, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
  4519. + }
  4520. + };
  4521. +
  4522. + AuraScript* GetAuraScript() const
  4523. + {
  4524. + return new spell_warl_pet_passive_damage_done_AuraScript();
  4525. + }
  4526. +};
  4527. +
  4528. +class spell_warl_pet_passive_voidwalker : public SpellScriptLoader
  4529. +{
  4530. + public:
  4531. + spell_warl_pet_passive_voidwalker() : SpellScriptLoader("spell_warl_pet_passive_voidwalker") { }
  4532. +
  4533. + class spell_warl_pet_passive_voidwalker_AuraScript : public AuraScript
  4534. + {
  4535. + PrepareAuraScript(spell_warl_pet_passive_voidwalker_AuraScript);
  4536. +
  4537. + void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
  4538. + {
  4539. + if (Unit* pet = GetUnitOwner())
  4540. + {
  4541. + if (!pet->isPet())
  4542. + return;
  4543. +
  4544. + Unit* owner = pet->ToPet()->GetOwner();
  4545. + if (!owner)
  4546. + return;
  4547. +
  4548. + if (AuraEffect* aurEffect = owner->GetAuraEffect(56247, EFFECT_0))
  4549. + amount += aurEffect->GetAmount();
  4550. + }
  4551. + }
  4552. +
  4553. + void Register()
  4554. + {
  4555. + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_pet_passive_voidwalker_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
  4556. + }
  4557. + };
  4558. +
  4559. + AuraScript* GetAuraScript() const
  4560. + {
  4561. + return new spell_warl_pet_passive_voidwalker_AuraScript();
  4562. + }
  4563. +};
  4564. +
  4565. void AddSC_warlock_spell_scripts()
  4566. {
  4567. new spell_warl_banish();
  4568. @@ -413,5 +993,13 @@ void AddSC_warlock_spell_scripts()
  4569. new spell_warl_ritual_of_doom_effect();
  4570. new spell_warl_seed_of_corruption();
  4571. new spell_warl_enslave_demon();
  4572. - new spell_shadowflame();
  4573. + new spell_warl_shadowflame();
  4574. + new spell_warl_pet_scaling_01();
  4575. + new spell_warl_pet_scaling_02();
  4576. + new spell_warl_pet_scaling_03();
  4577. + new spell_warl_pet_scaling_04();
  4578. + new spell_warl_pet_scaling_05();
  4579. + new spell_warl_pet_passive();
  4580. + new spell_warl_pet_passive_voidwalker();
  4581. + new spell_warl_pet_passive_damage_done();
  4582. }
  4583. diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
  4584. index 0caf1c8..9da41e9 100644
  4585. --- a/src/server/scripts/World/npcs_special.cpp
  4586. +++ b/src/server/scripts/World/npcs_special.cpp
  4587. @@ -1980,6 +1980,10 @@ public:
  4588. }
  4589. }
  4590.  
  4591. + void EnterEvadeMode()
  4592. + {
  4593. + }
  4594. +
  4595. void JustDied(Unit* /*killer*/)
  4596. {
  4597. // Stop Feeding Gargoyle when it dies
Advertisement
Add Comment
Please, Sign In to add comment