aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-14 00:35:13 -0600
committermegamage <none@none>2009-01-14 00:35:13 -0600
commit83e7f653fe6a1aad6121fa7606da620d14938e0c (patch)
tree3c470663f44d1b7949ead9091a615a81f8d14128
parent78e92e9023eff0bffb1bdb1a4f110ba9fcb3c5a8 (diff)
*Update to Mangos 7083.
--HG-- branch : trunk
-rw-r--r--sql/TBC-WLK converter/TBC-WLK_characters.sql213
-rw-r--r--sql/characters.sql2
-rw-r--r--sql/mangos.sql7
-rw-r--r--sql/updates/7077_01_characters_character_spell.sql214
-rw-r--r--sql/updates/7078_01_mangos_spell_proc_event.sql23
-rw-r--r--src/game/Creature.h4
-rw-r--r--src/game/NPCHandler.cpp36
-rw-r--r--src/game/ObjectMgr.cpp31
-rw-r--r--src/game/Player.cpp23
-rw-r--r--src/game/SpellEffects.cpp155
-rw-r--r--src/game/SpellMgr.cpp7
-rw-r--r--src/game/SpellMgr.h6
-rw-r--r--src/game/Unit.cpp110
-rw-r--r--src/shared/Database/DBCStructure.h8
-rw-r--r--src/shared/Database/DBCfmt.cpp2
-rw-r--r--src/shared/revision_nr.h2
16 files changed, 697 insertions, 146 deletions
diff --git a/sql/TBC-WLK converter/TBC-WLK_characters.sql b/sql/TBC-WLK converter/TBC-WLK_characters.sql
index 1e72e2340a9..bc381e0f964 100644
--- a/sql/TBC-WLK converter/TBC-WLK_characters.sql
+++ b/sql/TBC-WLK converter/TBC-WLK_characters.sql
@@ -12,6 +12,219 @@ DELETE FROM character_spell WHERE `spell` IN (
DELETE FROM character_spell USING character_spell INNER JOIN characters ON character_spell.guid = characters.guid
WHERE character_spell.spell = 20579 AND characters.race <> 5;
+UPDATE IGNORE character_spell SET spell = 2018 WHERE spell = 2020;
+DELETE FROM character_spell WHERE spell = 2020;
+
+UPDATE IGNORE character_spell SET spell = 2018 WHERE spell = 2020;
+DELETE FROM character_spell WHERE spell = 2020;
+
+UPDATE IGNORE character_spell SET spell = 3100 WHERE spell = 2021;
+DELETE FROM character_spell WHERE spell = 2021;
+
+UPDATE IGNORE character_spell SET spell = 3104 WHERE spell = 2154;
+DELETE FROM character_spell WHERE spell = 2154;
+
+UPDATE IGNORE character_spell SET spell = 2108 WHERE spell = 2155;
+DELETE FROM character_spell WHERE spell = 2155;
+
+UPDATE IGNORE character_spell SET spell = 2259 WHERE spell = 2275;
+DELETE FROM character_spell WHERE spell = 2275;
+
+UPDATE IGNORE character_spell SET spell = 3101 WHERE spell = 2280;
+DELETE FROM character_spell WHERE spell = 2280;
+
+UPDATE IGNORE character_spell SET spell = 2366 WHERE spell = 2372;
+DELETE FROM character_spell WHERE spell = 2372;
+
+UPDATE IGNORE character_spell SET spell = 2368 WHERE spell = 2373;
+DELETE FROM character_spell WHERE spell = 2373;
+
+UPDATE IGNORE character_spell SET spell = 2550 WHERE spell = 2551;
+DELETE FROM character_spell WHERE spell = 2551;
+
+UPDATE IGNORE character_spell SET spell = 2575 WHERE spell = 2581;
+DELETE FROM character_spell WHERE spell = 2581;
+
+UPDATE IGNORE character_spell SET spell = 2576 WHERE spell = 2582;
+DELETE FROM character_spell WHERE spell = 2582;
+
+UPDATE IGNORE character_spell SET spell = 3273 WHERE spell = 3279;
+DELETE FROM character_spell WHERE spell = 3279;
+
+UPDATE IGNORE character_spell SET spell = 3274 WHERE spell = 3280;
+DELETE FROM character_spell WHERE spell = 3280;
+
+UPDATE IGNORE character_spell SET spell = 3102 WHERE spell = 3412;
+DELETE FROM character_spell WHERE spell = 3412;
+
+UPDATE IGNORE character_spell SET spell = 3464 WHERE spell = 3465;
+DELETE FROM character_spell WHERE spell = 3465;
+
+UPDATE IGNORE character_spell SET spell = 3538 WHERE spell = 3539;
+DELETE FROM character_spell WHERE spell = 3539;
+
+UPDATE IGNORE character_spell SET spell = 3564 WHERE spell = 3568;
+DELETE FROM character_spell WHERE spell = 3568;
+
+UPDATE IGNORE character_spell SET spell = 3570 WHERE spell = 3571;
+DELETE FROM character_spell WHERE spell = 3571;
+
+UPDATE IGNORE character_spell SET spell = 3811 WHERE spell = 3812;
+DELETE FROM character_spell WHERE spell = 3812;
+
+UPDATE IGNORE character_spell SET spell = 3908 WHERE spell = 3911;
+DELETE FROM character_spell WHERE spell = 3911;
+
+UPDATE IGNORE character_spell SET spell = 3909 WHERE spell = 3912;
+DELETE FROM character_spell WHERE spell = 3912;
+
+UPDATE IGNORE character_spell SET spell = 3910 WHERE spell = 3913;
+DELETE FROM character_spell WHERE spell = 3913;
+
+UPDATE IGNORE character_spell SET spell = 4036 WHERE spell = 4039;
+DELETE FROM character_spell WHERE spell = 4039;
+
+UPDATE IGNORE character_spell SET spell = 4037 WHERE spell = 4040;
+DELETE FROM character_spell WHERE spell = 4040;
+
+UPDATE IGNORE character_spell SET spell = 4038 WHERE spell = 4041;
+DELETE FROM character_spell WHERE spell = 4041;
+
+UPDATE IGNORE character_spell SET spell = 7620 WHERE spell = 7733;
+DELETE FROM character_spell WHERE spell = 7733;
+
+UPDATE IGNORE character_spell SET spell = 7731 WHERE spell = 7734;
+DELETE FROM character_spell WHERE spell = 7734;
+
+UPDATE IGNORE character_spell SET spell = 8613 WHERE spell = 8615;
+DELETE FROM character_spell WHERE spell = 8615;
+
+UPDATE IGNORE character_spell SET spell = 8617 WHERE spell = 8619;
+DELETE FROM character_spell WHERE spell = 8619;
+
+UPDATE IGNORE character_spell SET spell = 8618 WHERE spell = 8620;
+DELETE FROM character_spell WHERE spell = 8620;
+
+UPDATE IGNORE character_spell SET spell = 9785 WHERE spell = 9786;
+DELETE FROM character_spell WHERE spell = 9786;
+
+UPDATE IGNORE character_spell SET spell = 10248 WHERE spell = 10249;
+DELETE FROM character_spell WHERE spell = 10249;
+
+UPDATE IGNORE character_spell SET spell = 10662 WHERE spell = 10663;
+DELETE FROM character_spell WHERE spell = 10663;
+
+UPDATE IGNORE character_spell SET spell = 10768 WHERE spell = 10769;
+DELETE FROM character_spell WHERE spell = 10769;
+
+UPDATE IGNORE character_spell SET spell = 11611 WHERE spell = 11612;
+DELETE FROM character_spell WHERE spell = 11612;
+
+UPDATE IGNORE character_spell SET spell = 11993 WHERE spell = 11994;
+DELETE FROM character_spell WHERE spell = 11994;
+
+UPDATE IGNORE character_spell SET spell = 12180 WHERE spell = 12181;
+DELETE FROM character_spell WHERE spell = 12181;
+
+UPDATE IGNORE character_spell SET spell = 12656 WHERE spell = 12657;
+DELETE FROM character_spell WHERE spell = 12657;
+
+UPDATE IGNORE character_spell SET spell = 25229 WHERE spell = 25245;
+DELETE FROM character_spell WHERE spell = 25245;
+
+UPDATE IGNORE character_spell SET spell = 25230 WHERE spell = 25246;
+DELETE FROM character_spell WHERE spell = 25246;
+
+UPDATE IGNORE character_spell SET spell = 26790 WHERE spell = 26791;
+DELETE FROM character_spell WHERE spell = 26791;
+
+UPDATE IGNORE character_spell SET spell = 28596 WHERE spell = 28597;
+DELETE FROM character_spell WHERE spell = 28597;
+
+UPDATE IGNORE character_spell SET spell = 28695 WHERE spell = 28696;
+DELETE FROM character_spell WHERE spell = 28696;
+
+UPDATE IGNORE character_spell SET spell = 28894 WHERE spell = 28896;
+DELETE FROM character_spell WHERE spell = 28896;
+
+UPDATE IGNORE character_spell SET spell = 28895 WHERE spell = 28899;
+DELETE FROM character_spell WHERE spell = 28899;
+
+UPDATE IGNORE character_spell SET spell = 28897 WHERE spell = 28901;
+DELETE FROM character_spell WHERE spell = 28901;
+
+UPDATE IGNORE character_spell SET spell = 29354 WHERE spell = 29355;
+DELETE FROM character_spell WHERE spell = 29355;
+
+UPDATE IGNORE character_spell SET spell = 29844 WHERE spell = 29845;
+DELETE FROM character_spell WHERE spell = 29845;
+
+UPDATE IGNORE character_spell SET spell = 30350 WHERE spell = 30351;
+DELETE FROM character_spell WHERE spell = 30351;
+
+UPDATE IGNORE character_spell SET spell = 32549 WHERE spell = 32550;
+DELETE FROM character_spell WHERE spell = 32550;
+
+UPDATE IGNORE character_spell SET spell = 32678 WHERE spell = 32679;
+DELETE FROM character_spell WHERE spell = 32679;
+
+UPDATE IGNORE character_spell SET spell = 45357 WHERE spell = 45375;
+DELETE FROM character_spell WHERE spell = 45375;
+
+UPDATE IGNORE character_spell SET spell = 45358 WHERE spell = 45376;
+DELETE FROM character_spell WHERE spell = 45376;
+
+UPDATE IGNORE character_spell SET spell = 45359 WHERE spell = 45377;
+DELETE FROM character_spell WHERE spell = 45377;
+
+UPDATE IGNORE character_spell SET spell = 45360 WHERE spell = 45378;
+DELETE FROM character_spell WHERE spell = 45378;
+
+UPDATE IGNORE character_spell SET spell = 45361 WHERE spell = 45379;
+DELETE FROM character_spell WHERE spell = 45379;
+
+UPDATE IGNORE character_spell SET spell = 45363 WHERE spell = 45380;
+DELETE FROM character_spell WHERE spell = 45380;
+
+UPDATE IGNORE character_spell SET spell = 45542 WHERE spell = 50299;
+DELETE FROM character_spell WHERE spell = 50299;
+
+UPDATE IGNORE character_spell SET spell = 50305 WHERE spell = 50307;
+DELETE FROM character_spell WHERE spell = 50307;
+
+UPDATE IGNORE character_spell SET spell = 50310 WHERE spell = 50309;
+DELETE FROM character_spell WHERE spell = 50309;
+
+UPDATE IGNORE character_spell SET spell = 51294 WHERE spell = 51293;
+DELETE FROM character_spell WHERE spell = 51293;
+
+UPDATE IGNORE character_spell SET spell = 51296 WHERE spell = 51295;
+DELETE FROM character_spell WHERE spell = 51295;
+
+UPDATE IGNORE character_spell SET spell = 51300 WHERE spell = 51298;
+DELETE FROM character_spell WHERE spell = 51298;
+
+UPDATE IGNORE character_spell SET spell = 51302 WHERE spell = 51301;
+DELETE FROM character_spell WHERE spell = 51301;
+
+UPDATE IGNORE character_spell SET spell = 51304 WHERE spell = 51303;
+DELETE FROM character_spell WHERE spell = 51303;
+
+UPDATE IGNORE character_spell SET spell = 51306 WHERE spell = 51305;
+DELETE FROM character_spell WHERE spell = 51305;
+
+UPDATE IGNORE character_spell SET spell = 51309 WHERE spell = 51308;
+DELETE FROM character_spell WHERE spell = 51308;
+
+UPDATE IGNORE character_spell SET spell = 51311 WHERE spell = 51310;
+DELETE FROM character_spell WHERE spell = 51310;
+
+UPDATE IGNORE character_spell SET spell = 51313 WHERE spell = 51312;
+DELETE FROM character_spell WHERE spell = 51312;
+
+UPDATE IGNORE character_spell SET spell = 33095 WHERE spell = 54084;
+DELETE FROM character_spell WHERE spell = 54084;
+
alter table `character_pet`
drop column `trainpoint`,
drop column `loyaltypoints`,
diff --git a/sql/characters.sql b/sql/characters.sql
index b0ed36d0a7c..89703b0f369 100644
--- a/sql/characters.sql
+++ b/sql/characters.sql
@@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` (
- `required_7075_01_characters_character_spell` bit(1) default NULL
+ `required_7077_01_characters_character_spell` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
diff --git a/sql/mangos.sql b/sql/mangos.sql
index 1854d14927c..4d75aad4d6b 100644
--- a/sql/mangos.sql
+++ b/sql/mangos.sql
@@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
- `required_7075_02_mangos_spell_learn_spell` bit(1) default NULL
+ `required_7078_01_mangos_spell_proc_event` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@@ -16548,6 +16548,8 @@ INSERT INTO `spell_proc_event` VALUES
(31833, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(31835, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(31836, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
+(31871, 0x00000000, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0),
+(31872, 0x00000000, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0),
(31876, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(31877, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(31878, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
@@ -16722,6 +16724,9 @@ INSERT INTO `spell_proc_event` VALUES
(43748, 0x00000000, 11, 0x90100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(43750, 0x00000000, 11, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(43819, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0),
+(44394, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0),
+(44395, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0),
+(44396, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0),
(44404, 0x00000000, 3, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44445, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44446, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
diff --git a/sql/updates/7077_01_characters_character_spell.sql b/sql/updates/7077_01_characters_character_spell.sql
new file mode 100644
index 00000000000..b68f99b1d39
--- /dev/null
+++ b/sql/updates/7077_01_characters_character_spell.sql
@@ -0,0 +1,214 @@
+ALTER TABLE character_db_version CHANGE COLUMN required_7075_01_characters_character_spell required_7077_01_characters_character_spell bit;
+
+UPDATE IGNORE character_spell SET spell = 2018 WHERE spell = 2020;
+DELETE FROM character_spell WHERE spell = 2020;
+
+UPDATE IGNORE character_spell SET spell = 2018 WHERE spell = 2020;
+DELETE FROM character_spell WHERE spell = 2020;
+
+UPDATE IGNORE character_spell SET spell = 3100 WHERE spell = 2021;
+DELETE FROM character_spell WHERE spell = 2021;
+
+UPDATE IGNORE character_spell SET spell = 3104 WHERE spell = 2154;
+DELETE FROM character_spell WHERE spell = 2154;
+
+UPDATE IGNORE character_spell SET spell = 2108 WHERE spell = 2155;
+DELETE FROM character_spell WHERE spell = 2155;
+
+UPDATE IGNORE character_spell SET spell = 2259 WHERE spell = 2275;
+DELETE FROM character_spell WHERE spell = 2275;
+
+UPDATE IGNORE character_spell SET spell = 3101 WHERE spell = 2280;
+DELETE FROM character_spell WHERE spell = 2280;
+
+UPDATE IGNORE character_spell SET spell = 2366 WHERE spell = 2372;
+DELETE FROM character_spell WHERE spell = 2372;
+
+UPDATE IGNORE character_spell SET spell = 2368 WHERE spell = 2373;
+DELETE FROM character_spell WHERE spell = 2373;
+
+UPDATE IGNORE character_spell SET spell = 2550 WHERE spell = 2551;
+DELETE FROM character_spell WHERE spell = 2551;
+
+UPDATE IGNORE character_spell SET spell = 2575 WHERE spell = 2581;
+DELETE FROM character_spell WHERE spell = 2581;
+
+UPDATE IGNORE character_spell SET spell = 2576 WHERE spell = 2582;
+DELETE FROM character_spell WHERE spell = 2582;
+
+UPDATE IGNORE character_spell SET spell = 3273 WHERE spell = 3279;
+DELETE FROM character_spell WHERE spell = 3279;
+
+UPDATE IGNORE character_spell SET spell = 3274 WHERE spell = 3280;
+DELETE FROM character_spell WHERE spell = 3280;
+
+UPDATE IGNORE character_spell SET spell = 3102 WHERE spell = 3412;
+DELETE FROM character_spell WHERE spell = 3412;
+
+UPDATE IGNORE character_spell SET spell = 3464 WHERE spell = 3465;
+DELETE FROM character_spell WHERE spell = 3465;
+
+UPDATE IGNORE character_spell SET spell = 3538 WHERE spell = 3539;
+DELETE FROM character_spell WHERE spell = 3539;
+
+UPDATE IGNORE character_spell SET spell = 3564 WHERE spell = 3568;
+DELETE FROM character_spell WHERE spell = 3568;
+
+UPDATE IGNORE character_spell SET spell = 3570 WHERE spell = 3571;
+DELETE FROM character_spell WHERE spell = 3571;
+
+UPDATE IGNORE character_spell SET spell = 3811 WHERE spell = 3812;
+DELETE FROM character_spell WHERE spell = 3812;
+
+UPDATE IGNORE character_spell SET spell = 3908 WHERE spell = 3911;
+DELETE FROM character_spell WHERE spell = 3911;
+
+UPDATE IGNORE character_spell SET spell = 3909 WHERE spell = 3912;
+DELETE FROM character_spell WHERE spell = 3912;
+
+UPDATE IGNORE character_spell SET spell = 3910 WHERE spell = 3913;
+DELETE FROM character_spell WHERE spell = 3913;
+
+UPDATE IGNORE character_spell SET spell = 4036 WHERE spell = 4039;
+DELETE FROM character_spell WHERE spell = 4039;
+
+UPDATE IGNORE character_spell SET spell = 4037 WHERE spell = 4040;
+DELETE FROM character_spell WHERE spell = 4040;
+
+UPDATE IGNORE character_spell SET spell = 4038 WHERE spell = 4041;
+DELETE FROM character_spell WHERE spell = 4041;
+
+UPDATE IGNORE character_spell SET spell = 7620 WHERE spell = 7733;
+DELETE FROM character_spell WHERE spell = 7733;
+
+UPDATE IGNORE character_spell SET spell = 7731 WHERE spell = 7734;
+DELETE FROM character_spell WHERE spell = 7734;
+
+UPDATE IGNORE character_spell SET spell = 8613 WHERE spell = 8615;
+DELETE FROM character_spell WHERE spell = 8615;
+
+UPDATE IGNORE character_spell SET spell = 8617 WHERE spell = 8619;
+DELETE FROM character_spell WHERE spell = 8619;
+
+UPDATE IGNORE character_spell SET spell = 8618 WHERE spell = 8620;
+DELETE FROM character_spell WHERE spell = 8620;
+
+UPDATE IGNORE character_spell SET spell = 9785 WHERE spell = 9786;
+DELETE FROM character_spell WHERE spell = 9786;
+
+UPDATE IGNORE character_spell SET spell = 10248 WHERE spell = 10249;
+DELETE FROM character_spell WHERE spell = 10249;
+
+UPDATE IGNORE character_spell SET spell = 10662 WHERE spell = 10663;
+DELETE FROM character_spell WHERE spell = 10663;
+
+UPDATE IGNORE character_spell SET spell = 10768 WHERE spell = 10769;
+DELETE FROM character_spell WHERE spell = 10769;
+
+UPDATE IGNORE character_spell SET spell = 11611 WHERE spell = 11612;
+DELETE FROM character_spell WHERE spell = 11612;
+
+UPDATE IGNORE character_spell SET spell = 11993 WHERE spell = 11994;
+DELETE FROM character_spell WHERE spell = 11994;
+
+UPDATE IGNORE character_spell SET spell = 12180 WHERE spell = 12181;
+DELETE FROM character_spell WHERE spell = 12181;
+
+UPDATE IGNORE character_spell SET spell = 12656 WHERE spell = 12657;
+DELETE FROM character_spell WHERE spell = 12657;
+
+UPDATE IGNORE character_spell SET spell = 25229 WHERE spell = 25245;
+DELETE FROM character_spell WHERE spell = 25245;
+
+UPDATE IGNORE character_spell SET spell = 25230 WHERE spell = 25246;
+DELETE FROM character_spell WHERE spell = 25246;
+
+UPDATE IGNORE character_spell SET spell = 26790 WHERE spell = 26791;
+DELETE FROM character_spell WHERE spell = 26791;
+
+UPDATE IGNORE character_spell SET spell = 28596 WHERE spell = 28597;
+DELETE FROM character_spell WHERE spell = 28597;
+
+UPDATE IGNORE character_spell SET spell = 28695 WHERE spell = 28696;
+DELETE FROM character_spell WHERE spell = 28696;
+
+UPDATE IGNORE character_spell SET spell = 28894 WHERE spell = 28896;
+DELETE FROM character_spell WHERE spell = 28896;
+
+UPDATE IGNORE character_spell SET spell = 28895 WHERE spell = 28899;
+DELETE FROM character_spell WHERE spell = 28899;
+
+UPDATE IGNORE character_spell SET spell = 28897 WHERE spell = 28901;
+DELETE FROM character_spell WHERE spell = 28901;
+
+UPDATE IGNORE character_spell SET spell = 29354 WHERE spell = 29355;
+DELETE FROM character_spell WHERE spell = 29355;
+
+UPDATE IGNORE character_spell SET spell = 29844 WHERE spell = 29845;
+DELETE FROM character_spell WHERE spell = 29845;
+
+UPDATE IGNORE character_spell SET spell = 30350 WHERE spell = 30351;
+DELETE FROM character_spell WHERE spell = 30351;
+
+UPDATE IGNORE character_spell SET spell = 32549 WHERE spell = 32550;
+DELETE FROM character_spell WHERE spell = 32550;
+
+UPDATE IGNORE character_spell SET spell = 32678 WHERE spell = 32679;
+DELETE FROM character_spell WHERE spell = 32679;
+
+UPDATE IGNORE character_spell SET spell = 45357 WHERE spell = 45375;
+DELETE FROM character_spell WHERE spell = 45375;
+
+UPDATE IGNORE character_spell SET spell = 45358 WHERE spell = 45376;
+DELETE FROM character_spell WHERE spell = 45376;
+
+UPDATE IGNORE character_spell SET spell = 45359 WHERE spell = 45377;
+DELETE FROM character_spell WHERE spell = 45377;
+
+UPDATE IGNORE character_spell SET spell = 45360 WHERE spell = 45378;
+DELETE FROM character_spell WHERE spell = 45378;
+
+UPDATE IGNORE character_spell SET spell = 45361 WHERE spell = 45379;
+DELETE FROM character_spell WHERE spell = 45379;
+
+UPDATE IGNORE character_spell SET spell = 45363 WHERE spell = 45380;
+DELETE FROM character_spell WHERE spell = 45380;
+
+UPDATE IGNORE character_spell SET spell = 45542 WHERE spell = 50299;
+DELETE FROM character_spell WHERE spell = 50299;
+
+UPDATE IGNORE character_spell SET spell = 50305 WHERE spell = 50307;
+DELETE FROM character_spell WHERE spell = 50307;
+
+UPDATE IGNORE character_spell SET spell = 50310 WHERE spell = 50309;
+DELETE FROM character_spell WHERE spell = 50309;
+
+UPDATE IGNORE character_spell SET spell = 51294 WHERE spell = 51293;
+DELETE FROM character_spell WHERE spell = 51293;
+
+UPDATE IGNORE character_spell SET spell = 51296 WHERE spell = 51295;
+DELETE FROM character_spell WHERE spell = 51295;
+
+UPDATE IGNORE character_spell SET spell = 51300 WHERE spell = 51298;
+DELETE FROM character_spell WHERE spell = 51298;
+
+UPDATE IGNORE character_spell SET spell = 51302 WHERE spell = 51301;
+DELETE FROM character_spell WHERE spell = 51301;
+
+UPDATE IGNORE character_spell SET spell = 51304 WHERE spell = 51303;
+DELETE FROM character_spell WHERE spell = 51303;
+
+UPDATE IGNORE character_spell SET spell = 51306 WHERE spell = 51305;
+DELETE FROM character_spell WHERE spell = 51305;
+
+UPDATE IGNORE character_spell SET spell = 51309 WHERE spell = 51308;
+DELETE FROM character_spell WHERE spell = 51308;
+
+UPDATE IGNORE character_spell SET spell = 51311 WHERE spell = 51310;
+DELETE FROM character_spell WHERE spell = 51310;
+
+UPDATE IGNORE character_spell SET spell = 51313 WHERE spell = 51312;
+DELETE FROM character_spell WHERE spell = 51312;
+
+UPDATE IGNORE character_spell SET spell = 33095 WHERE spell = 54084;
+DELETE FROM character_spell WHERE spell = 54084;
diff --git a/sql/updates/7078_01_mangos_spell_proc_event.sql b/sql/updates/7078_01_mangos_spell_proc_event.sql
new file mode 100644
index 00000000000..b5df2f7faa3
--- /dev/null
+++ b/sql/updates/7078_01_mangos_spell_proc_event.sql
@@ -0,0 +1,23 @@
+ALTER TABLE db_version CHANGE COLUMN required_7075_02_mangos_spell_learn_spell required_7078_01_mangos_spell_proc_event bit;
+
+-- (31871) Divine Purpose (Rank 1)
+DELETE FROM `spell_proc_event` WHERE `entry` IN (31871);
+INSERT INTO `spell_proc_event` VALUES (31871, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0);
+
+-- (31872) Divine Purpose (Rank 2)
+DELETE FROM `spell_proc_event` WHERE `entry` IN (31872);
+INSERT INTO `spell_proc_event` VALUES (31872, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0);
+
+-- (44394) Incanter's Absorption (Rank 1)
+DELETE FROM `spell_proc_event` WHERE `entry` IN (44394);
+INSERT INTO `spell_proc_event` VALUES (44394, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0);
+
+-- (44395) Incanter's Absorption (Rank 2)
+DELETE FROM `spell_proc_event` WHERE `entry` IN (44395);
+INSERT INTO `spell_proc_event` VALUES (44395, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0);
+
+-- (44396) Incanter's Absorption (Rank 3)
+DELETE FROM `spell_proc_event` WHERE `entry` IN (44396);
+INSERT INTO `spell_proc_event` VALUES (44396, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0);
+
+ \ No newline at end of file
diff --git a/src/game/Creature.h b/src/game/Creature.h
index 9d963d80a1f..a667120d408 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -372,6 +372,10 @@ struct TrainerSpell
uint32 reqskill;
uint32 reqskillvalue;
uint32 reqlevel;
+ uint32 learned_spell;
+
+ // helpers
+ bool IsCastable() const { return learned_spell != spell; }
};
typedef std::vector<TrainerSpell*> TrainerSpellList;
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index c6751512e02..19de60c6b53 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -166,17 +166,17 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
{
TrainerSpell const* tSpell = *itr;
- if(!_player->IsSpellFitByClassAndRace(tSpell->spell))
+ if(!_player->IsSpellFitByClassAndRace(tSpell->learned_spell))
continue;
++count;
- bool primary_prof_first_rank = spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->spell);
+ bool primary_prof_first_rank = spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->learned_spell);
- SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->spell);
+ SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->learned_spell);
uint32 req_spell = spellmgr.GetSpellRequired(tSpell->spell);
- data << uint32(tSpell->spell);
+ data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case)
data << uint8(_player->GetTrainerSpellState(tSpell));
data << uint32(floor(tSpell->spellcost * fDiscountMod));
@@ -241,21 +241,27 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
if(_player->GetMoney() < nSpellCost )
return;
- WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
- data << uint64(guid) << uint32(0xB3);
- SendPacket(&data);
+ _player->ModifyMoney( -int32(nSpellCost) );
- data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player
- data << uint64(_player->GetGUID()) << uint32(0x016A);
- SendPacket(&data);
+ // learn explicitly or cast explicitly
+ if(trainer_spell->IsCastable ())
+ //FIXME: prof. spell entry in trainer list not marked gray until list re-open.
+ unit->CastSpell(_player,trainer_spell->spell,true);
+ else
+ {
+ WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
+ data << uint64(guid) << uint32(0xB3);
+ SendPacket(&data);
- _player->ModifyMoney( -int32(nSpellCost) );
+ data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player
+ data << uint64(_player->GetGUID()) << uint32(0x016A);
+ SendPacket(&data);
- // learn explicitly to prevent lost money at lags, learning spell will be only show spell animation
- _player->learnSpell(trainer_spell->spell);
+ _player->learnSpell(spellId);
+ }
- data.Initialize(SMSG_TRAINER_BUY_SUCCEEDED, 12);
- data << uint64(guid) << uint32(spellId);
+ WorldPacket data(SMSG_TRAINER_BUY_SUCCEEDED, 12);
+ data << uint64(guid) << uint32(trainer_spell->spell);
SendPacket(&data);
}
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 9206fe0acd3..61f1203f58a 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -1693,6 +1693,24 @@ void ObjectMgr::LoadItemPrototypes()
if(dbcitem)
{
+ if(proto->Class != dbcitem->Class || proto->SubClass != dbcitem->SubClass)
+ {
+ sLog.outErrorDb("Item (Entry: %u) not correct (Class: %u, Sub: %u) pair, must be (Class: %u, Sub: %u) (still using DB value).",i,proto->Class,proto->SubClass,dbcitem->Class,dbcitem->SubClass);
+ // It safe let use Class/Subclass from DB
+ }
+
+ if(proto->Unk0 != dbcitem->Unk0)
+ {
+ sLog.outErrorDb("Item (Entry: %u) not correct %u Unk0, must be %u (still using DB value).",i,proto->Unk0,dbcitem->Unk0);
+ // It safe let use Unk0 from DB
+ }
+
+ if(proto->Material != dbcitem->Material)
+ {
+ sLog.outErrorDb("Item (Entry: %u) not correct %u material, must be %u (still using DB value).",i,proto->Material,dbcitem->Material);
+ // It safe let use Material from DB
+ }
+
if(proto->InventoryType != dbcitem->InventoryType)
{
sLog.outErrorDb("Item (Entry: %u) not correct %u inventory type, must be %u (still using DB value).",i,proto->InventoryType,dbcitem->InventoryType);
@@ -7267,6 +7285,19 @@ void ObjectMgr::LoadTrainerSpell()
if(!pTrainerSpell->reqlevel)
pTrainerSpell->reqlevel = spellinfo->spellLevel;
+ // calculate learned spell for profession case when stored cast-spell
+ pTrainerSpell->learned_spell = spell;
+ for(int i = 0; i <3; ++i)
+ {
+ if(spellinfo->Effect[i]!=SPELL_EFFECT_LEARN_SPELL)
+ continue;
+
+ if(SpellMgr::IsProfessionOrRidingSpell(spellinfo->EffectTriggerSpell[i]))
+ {
+ pTrainerSpell->learned_spell = spellinfo->EffectTriggerSpell[i];
+ break;
+ }
+ }
TrainerSpellData& data = m_mCacheTrainerSpellMap[entry];
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index e1e7c0b9e44..bd1fedd7625 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3566,22 +3566,22 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
if (!trainer_spell)
return TRAINER_SPELL_RED;
- if (!trainer_spell->spell)
+ if (!trainer_spell->learned_spell)
return TRAINER_SPELL_RED;
// known spell
- if(HasSpell(trainer_spell->spell))
+ if(HasSpell(trainer_spell->learned_spell))
return TRAINER_SPELL_GRAY;
// check race/class requirement
- if(!IsSpellFitByClassAndRace(trainer_spell->spell))
+ if(!IsSpellFitByClassAndRace(trainer_spell->learned_spell))
return TRAINER_SPELL_RED;
// check level requirement
if(getLevel() < trainer_spell->reqlevel)
return TRAINER_SPELL_RED;
- if(SpellChainNode const* spell_chain = spellmgr.GetSpellChainNode(trainer_spell->spell))
+ if(SpellChainNode const* spell_chain = spellmgr.GetSpellChainNode(trainer_spell->learned_spell))
{
// check prev.rank requirement
if(spell_chain->prev && !HasSpell(spell_chain->prev))
@@ -3600,7 +3600,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
return TRAINER_SPELL_RED;
// exist, already checked at loading
- SpellEntry const* spell = sSpellStore.LookupEntry(trainer_spell->spell);
+ SpellEntry const* spell = sSpellStore.LookupEntry(trainer_spell->learned_spell);
// secondary prof. or not prof. spell
uint32 skill = spell->EffectMiscValue[1];
@@ -5049,7 +5049,7 @@ void Player::UpdateSkillsToMaxSkillsForLevel()
if (GetUInt32Value(PLAYER_SKILL_INDEX(i)))
{
uint32 pskill = GetUInt32Value(PLAYER_SKILL_INDEX(i)) & 0x0000FFFF;
- if( IsProfessionSkill(pskill) || pskill == SKILL_RIDING )
+ if( IsProfessionOrRidingSkill(pskill))
continue;
uint32 data = GetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i));
@@ -18756,18 +18756,23 @@ bool Player::IsSpellFitByClassAndRace( uint32 spell_id ) const
SkillLineAbilityMap::const_iterator lower = spellmgr.GetBeginSkillLineAbilityMap(spell_id);
SkillLineAbilityMap::const_iterator upper = spellmgr.GetEndSkillLineAbilityMap(spell_id);
+ if(lower==upper)
+ return true;
for(SkillLineAbilityMap::const_iterator _spell_idx = lower; _spell_idx != upper; ++_spell_idx)
{
// skip wrong race skills
if( _spell_idx->second->racemask && (_spell_idx->second->racemask & racemask) == 0)
- return false;
+ continue;
// skip wrong class skills
if( _spell_idx->second->classmask && (_spell_idx->second->classmask & classmask) == 0)
- return false;
+ continue;
+
+ return true;
}
- return true;
+
+ return false;
}
bool Player::HasQuestForGO(int32 GOId)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 0a73fd43514..3f8b79398fe 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -869,30 +869,6 @@ void Spell::EffectDummy(uint32 i)
}
return;
}
- case 14185: // Preparation Rogue
- {
- if(m_caster->GetTypeId()!=TYPEID_PLAYER)
- return;
-
- //immediately finishes the cooldown on certain Rogue abilities
- const PlayerSpellMap& sp_list = ((Player *)m_caster)->GetSpellMap();
- for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
- {
- uint32 classspell = itr->first;
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
-
- if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & 0x26000000860LL))
- {
- ((Player*)m_caster)->RemoveSpellCooldown(classspell);
-
- WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
- data << uint32(classspell);
- data << uint64(m_caster->GetGUID());
- ((Player*)m_caster)->GetSession()->SendPacket(&data);
- }
- }
- return;
- }
case 15998: // Capture Worg Pup
case 29435: // Capture Female Kaliri Hatchling
{
@@ -969,7 +945,7 @@ void Spell::EffectDummy(uint32 i)
return;
}
- case 23074: // Arc. Dragonling
+ case 23074: // Arcanite Dragonling
if (!m_CastItem) return;
m_caster->CastSpell(m_caster,19804,true,m_CastItem);
return;
@@ -1378,7 +1354,13 @@ void Spell::EffectDummy(uint32 i)
if(!unitTarget)
return;
- int32 basePoints0 = damage+int32(m_caster->GetPower(POWER_RAGE) * m_spellInfo->DmgMultiplier[i]);
+ uint32 rage = m_caster->GetPower(POWER_RAGE);
+ // Glyph of Execution bonus
+ if (Aura *aura = m_caster->GetDummyAura(58367))
+ rage+=aura->GetModifier()->m_amount;
+
+ int32 basePoints0 = damage+int32(rage * m_spellInfo->DmgMultiplier[i] +
+ m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0);
m_caster->SetPower(POWER_RAGE,0);
return;
@@ -1514,11 +1496,6 @@ void Spell::EffectDummy(uint32 i)
case SPELLFAMILY_ROGUE:
switch(m_spellInfo->Id )
{
- case 31231: // Cheat Death
- {
- m_caster->CastSpell(m_caster,45182,true);
- return;
- }
case 5938: // Shiv
{
if(m_caster->GetTypeId() != TYPEID_PLAYER)
@@ -1554,6 +1531,35 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(unitTarget, 5940, true);
return;
}
+ case 14185: // Preparation Rogue
+ {
+ if(m_caster->GetTypeId()!=TYPEID_PLAYER)
+ return;
+
+ //immediately finishes the cooldown on certain Rogue abilities
+ const PlayerSpellMap& sp_list = ((Player *)m_caster)->GetSpellMap();
+ for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
+ {
+ uint32 classspell = itr->first;
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
+
+ if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & 0x0000024000000860LL))
+ {
+ ((Player*)m_caster)->RemoveSpellCooldown(classspell);
+
+ WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
+ data << uint32(classspell);
+ data << uint64(m_caster->GetGUID());
+ ((Player*)m_caster)->GetSession()->SendPacket(&data);
+ }
+ }
+ return;
+ }
+ case 31231: // Cheat Death
+ {
+ m_caster->CastSpell(m_caster,45182,true);
+ return;
+ }
}
break;
case SPELLFAMILY_HUNTER:
@@ -2841,7 +2847,7 @@ void Spell::EffectEnergisePct(uint32 i)
uint32 gain = damage * maxPower / 100;
unitTarget->ModifyPower(power, gain);
- m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, damage, power);
+ m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, gain, power);
}
void Spell::SendLoot(uint64 guid, LootType loottype)
@@ -5141,57 +5147,46 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
else if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN )
{
- switch(m_spellInfo->SpellFamilyFlags)
+ // Judgement
+ if (m_spellInfo->SpellFamilyFlags & 0x0000000000800000LL)
{
- // Judgement
- case 0x800000:
- {
- uint32 spellId2 = 0;
-
- // all seals have aura dummy
- Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr)
- {
- SpellEntry const *spellInfo = (*itr)->GetSpellProto();
-
- // search seal (all seals have judgement's aura dummy spell id in 2 effect
- if ( !spellInfo || !IsSealSpell((*itr)->GetSpellProto()) || (*itr)->GetEffIndex() != 2 )
- continue;
-
- // must be calculated base at raw base points in spell proto, GetModifier()->m_value for S.Righteousness modified by SPELLMOD_DAMAGE
- spellId2 = (*itr)->GetSpellProto()->EffectBasePoints[2]+1;
-
- if(spellId2 <= 1)
- continue;
-
- // found, remove seal
- m_caster->RemoveAurasDueToSpell((*itr)->GetId());
-
- // Sanctified Judgement
- Unit::AuraList const& m_auras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraList::const_iterator i = m_auras.begin(); i != m_auras.end(); ++i)
- {
- if ((*i)->GetSpellProto()->SpellIconID == 205 && (*i)->GetSpellProto()->Attributes == 0x01D0LL)
- {
- int32 chance = (*i)->GetModifier()->m_amount;
- if ( roll_chance_i(chance) )
- {
- int32 mana = spellInfo->manaCost;
- if ( Player* modOwner = m_caster->GetSpellModOwner() )
- modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COST, mana);
- mana = int32(mana* 0.8f);
- m_caster->CastCustomSpell(m_caster,31930,&mana,NULL,NULL,true,NULL,*i);
- }
- break;
- }
- }
-
- break;
- }
-
- m_caster->CastSpell(unitTarget,spellId2,true);
+ if(!unitTarget || !unitTarget->isAlive())
return;
+ uint32 spellId1 = 0;
+ uint32 spellId2 = 0;
+
+ // Judgement self add switch
+ switch (m_spellInfo->Id)
+ {
+ case 41467: break; // Judgement
+ case 53407: spellId1 = 20184; break; // Judgement of Justice
+ case 20271: // Judgement of Light
+ case 57774: spellId1 = 20185; break; // Judgement of Light
+ case 53408: spellId1 = 20186; break; // Judgement of Wisdom
+ default:
+ return;
}
+ // all seals have aura dummy in 2 effect
+ Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
+ for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr)
+ {
+ SpellEntry const *spellInfo = (*itr)->GetSpellProto();
+ // search seal (all seals have judgement's aura dummy spell id in 2 effect
+ if ((*itr)->GetEffIndex() != 2 || !spellInfo || !IsSealSpell(spellInfo))
+ continue;
+ spellId2 = (*itr)->GetModifier()->m_amount;
+ SpellEntry const *judge = sSpellStore.LookupEntry(spellId2);
+ if (!judge)
+ continue;
+ // found, remove seal
+ m_caster->RemoveAurasDueToSpell(spellInfo->Id);
+ break;
+ }
+ if (spellId1)
+ m_caster->CastSpell(unitTarget, spellId1, true);
+ if (spellId2)
+ m_caster->CastSpell(unitTarget, spellId2, true);
+ return;
}
}
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 474bf8eae52..3bfc6503cb3 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1225,7 +1225,7 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
{
if(spellInfo->powerType != POWER_MANA && spellInfo->powerType != POWER_HEALTH)
return false;
- if(IsProfessionSpell(spellInfo->Id))
+ if(IsProfessionOrRidingSpell(spellInfo->Id))
return false;
// All stance spells. if any better way, change it.
@@ -1327,7 +1327,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
return true;
}
-bool SpellMgr::IsProfessionSpell(uint32 spellId)
+
+bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if(!spellInfo)
@@ -1338,7 +1339,7 @@ bool SpellMgr::IsProfessionSpell(uint32 spellId)
uint32 skill = spellInfo->EffectMiscValue[1];
- return IsProfessionSkill(skill);
+ return IsProfessionOrRidingSkill(skill);
}
bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId)
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 7cf41480f9a..76bffbce1dd 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -757,6 +757,11 @@ typedef std::vector<uint32> SpellCustomAttribute;
typedef std::map<int32, std::vector<int32> > SpellLinkedMap;
+inline bool IsProfessionOrRidingSkill(uint32 skill)
+{
+ return IsProfessionSkill(skill) || skill == SKILL_RIDING;
+}
+
class SpellMgr
{
// Constructors
@@ -935,6 +940,7 @@ class SpellMgr
return false;
}
+ static bool IsProfessionOrRidingSpell(uint32 spellId);
static bool IsProfessionSpell(uint32 spellId);
static bool IsPrimaryProfessionSpell(uint32 spellId);
bool IsPrimaryProfessionFirstRankSpell(uint32 spellId) const;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 165a459649a..bfab6c85254 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1285,17 +1285,6 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
return;
}
- // update at damage Judgement aura duration that applied by attacker at victim
- if(damageInfo->damage && spellProto->Id == 35395)
- {
- AuraMap& vAuras = pVictim->GetAuras();
- for(AuraMap::iterator itr = vAuras.begin(); itr != vAuras.end(); ++itr)
- {
- SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
- if( spellInfo->AttributesEx3 & 0x40000 && spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && ((*itr).second->GetCasterGUID() == GetGUID()))
- (*itr).second->RefreshAura();
- }
- }
// Call default DealDamage
CleanDamage cleanDamage(damageInfo->cleanDamage, BASE_ATTACK, MELEE_HIT_NORMAL);
DealDamage(pVictim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss);
@@ -4882,6 +4871,30 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
target = this;
break;
}
+ // Divine purpose
+ case 31871:
+ case 31872:
+ {
+ // Roll chane
+ if (!roll_chance_i(triggeredByAura->GetModifier()->m_amount))
+ return false;
+
+ // Remove any stun effect on target
+ AuraMap& Auras = pVictim->GetAuras();
+ for(AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
+ {
+ SpellEntry const *spell = iter->second->GetSpellProto();
+ if( spell->Mechanic == MECHANIC_STUN ||
+ spell->EffectMechanic[iter->second->GetEffIndex()] == MECHANIC_STUN)
+ {
+ pVictim->RemoveAurasDueToSpell(spell->Id);
+ iter = Auras.begin();
+ }
+ else
+ ++iter;
+ }
+ return true;
+ }
}
break;
}
@@ -5384,29 +5397,30 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
basepoints0 = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000;
break;
}
- // Seal of Blood do damage trigger
- if(dummySpell->SpellFamilyFlags & 0x0000040000000000LL)
- {
- switch(triggeredByAura->GetEffIndex())
- {
- case 0:
- triggered_spell_id = 31893;
- break;
- case 1:
- {
- // damage
- damage += CalculateDamage(BASE_ATTACK, false) * 35 / 100; // add spell damage from prev effect (35%)
- basepoints0 = triggeredByAura->GetModifier()->m_amount * damage / 100;
-
- target = this;
- triggered_spell_id = 32221;
- break;
- }
- }
- }
switch(dummySpell->Id)
{
+ // Judgement of Light
+ case 20185:
+ {
+ // Get judgement caster
+ Unit *caster = triggeredByAura->GetCaster();
+ if (!caster)
+ return false;
+ float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
+ int32 holy = caster->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_HOLY) +
+ caster->SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_HOLY, this);
+ basepoints0 = int32(ap*0.10f + 0.10f*holy);
+ pVictim->CastCustomSpell(pVictim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
+ return true;
+ }
+ // Judgement of Wisdom
+ case 20186:
+ {
+ if (pVictim->getPowerType() == POWER_MANA)
+ pVictim->CastSpell(pVictim, 20268, true, 0, triggeredByAura);
+ return true;
+ }
// Holy Power (Redemption Armor set)
case 28789:
{
@@ -5461,6 +5475,40 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 31786;
break;
}
+ // Seal of Blood do damage trigger
+ case 31892:
+ {
+ if (triggeredByAura->GetEffIndex() == 0) // 0 effect - is proc on enemy
+ triggered_spell_id = 31893;
+ else if (triggeredByAura->GetEffIndex() == 1) // 1 effect - is proc on self
+ {
+ // add spell damage from prev effect (27%)
+ damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100;
+ basepoints0 = triggeredByAura->GetModifier()->m_amount * damage / 100;
+ target = this;
+ triggered_spell_id = 32221;
+ }
+ else
+ return true;
+ break;
+ }
+ // Seal of the Martyr do damage trigger
+ case 53720:
+ {
+ if (triggeredByAura->GetEffIndex() == 0) // 0 effect - is proc on enemy
+ triggered_spell_id = 53719;
+ else if (triggeredByAura->GetEffIndex() == 1) // 1 effect - is proc on self
+ {
+ // add spell damage from prev effect (27%)
+ damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100;
+ basepoints0 = triggeredByAura->GetModifier()->m_amount * damage / 100;
+ target = this;
+ triggered_spell_id = 53718;
+ }
+ else
+ return true;
+ break;
+ }
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)
case 40470:
{
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h
index 5890f5c48f5..92839c9a35f 100644
--- a/src/shared/Database/DBCStructure.h
+++ b/src/shared/Database/DBCStructure.h
@@ -815,10 +815,10 @@ struct GtRegenMPPerSptEntry
struct ItemEntry
{
uint32 ID;
- //uint32 Class;
- //uint32 SubClass;
- //uint32 Unk0;
- //uint32 Material;
+ uint32 Class;
+ uint32 SubClass;
+ uint32 Unk0;
+ uint32 Material;
uint32 DisplayId;
uint32 InventoryType;
uint32 Sheath;
diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp
index fffe3f98124..480b38c6b94 100644
--- a/src/shared/Database/DBCfmt.cpp
+++ b/src/shared/Database/DBCfmt.cpp
@@ -53,7 +53,7 @@ const char GtOCTRegenHPfmt[]="f";
//const char GtOCTRegenMPfmt[]="f";
const char GtRegenHPPerSptfmt[]="f";
const char GtRegenMPPerSptfmt[]="f";
-const char Itemfmt[]="nxxxxiii";
+const char Itemfmt[]="niiiiiii";
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
//const char ItemCondExtCostsEntryfmt[]="xiii";
const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix";
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index f8037402772..fc1f9a18e57 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7076"
+ #define REVISION_NR "7083"
#endif // __REVISION_NR_H__