aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/3956_world_spell_proc_event.sql1
-rw-r--r--sql/world_spell_full.sql2
-rw-r--r--src/game/Unit.cpp36
3 files changed, 37 insertions, 2 deletions
diff --git a/sql/updates/3956_world_spell_proc_event.sql b/sql/updates/3956_world_spell_proc_event.sql
new file mode 100644
index 00000000000..a7dcc25e025
--- /dev/null
+++ b/sql/updates/3956_world_spell_proc_event.sql
@@ -0,0 +1 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (49531,49532);
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index e0b88fcd5cd..50978990ced 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -1282,8 +1282,6 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
(49504, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Bloody Vengeance (Rank 3)
(49529, 0x00, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sudden Doom (Rank 2)
(49530, 0x00, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sudden Doom (Rank 3)
-(49531, 0x00, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sudden Doom (Rank 4)
-(49532, 0x00, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sudden Doom (Rank 5)
(49622, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 60), -- Bonus Mana Regen
(49657, 0x00, 15, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Endless Winter (Rank 2)
(50781, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Fate Rune of Primal Energy
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d369426e1cb..a7fdab050e0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6731,6 +6731,42 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
CastCustomSpell(this,45470,&heal,NULL,NULL,true);
return true;
}
+ // Sudden Doom
+ if (dummySpell->SpellIconID == 1939 && GetTypeId() == TYPEID_PLAYER)
+ {
+ SpellChainNode const* chain = NULL;
+ // get highest rank of the Death Coil spell
+ const PlayerSpellMap& sp_list = ((Player*)this)->GetSpellMap();
+ for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
+ {
+ // check if shown in spell book
+ if(!itr->second->active || itr->second->disabled || itr->second->state == PLAYERSPELL_REMOVED)
+ continue;
+
+ SpellEntry const *spellProto = sSpellStore.LookupEntry(itr->first);
+ if (!spellProto)
+ continue;
+
+ if (spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT
+ && spellProto->SpellFamilyFlags[0] & 0x2000)
+ {
+ SpellChainNode const* newChain = spellmgr.GetSpellChainNode(itr->first);
+
+ // No chain entry or entry lower than found entry
+ if (!chain || !newChain || (chain->rank < newChain->rank))
+ {
+ triggered_spell_id = itr->first;
+ chain = newChain;
+ }
+ else
+ continue;
+ // Found spell is last in chain - do not need to look more
+ // Optimisation for most common case
+ if (chain && chain->last == itr->first)
+ break;
+ }
+ }
+ }
break;
}
case SPELLFAMILY_POTION: