diff options
-rw-r--r-- | sql/updates/1671_world.sql | 2 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 10 | ||||
-rw-r--r-- | src/game/Unit.cpp | 18 |
3 files changed, 30 insertions, 0 deletions
diff --git a/sql/updates/1671_world.sql b/sql/updates/1671_world.sql new file mode 100644 index 00000000000..55a7ef6aae4 --- /dev/null +++ b/sql/updates/1671_world.sql @@ -0,0 +1,2 @@ +--Death Strike +INSERT INTO `spell_proc_event` VALUES (45469, 0x00, 15, 0x00000010, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0.000000, 0.000000, 0); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b3f997d249f..ba063c20da4 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1830,6 +1830,16 @@ void Spell::EffectDummy(uint32 i) return; } break; + case SPELLFAMILY_DEATHKNIGHT: + // Death strike dummy aura apply + // Used to proc healing later + if (m_spellInfo->SpellFamilyFlags[0] & 0x00000010) + { + spell_id=45469; + m_caster->CastSpell(m_caster,spell_id,true); + return; + } + } //spells triggered by dummy effect should not miss diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3b1763887dd..425eddae924 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6333,6 +6333,24 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 50526; break; } + // Death Strike healing effect + if (dummySpell->Id == 45469) + { + uint8 n=0; + Unit::AuraList const& decSpeedList = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(Unit::AuraList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter) + { + if((*iter)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DEATHKNIGHT + && (*iter)->GetCasterGUID() == GetGUID() + && (*iter)->GetSpellProto()->Dispel == DISPEL_DISEASE) + { + n++; + } + } + int32 heal=0.5f*n*damage+damage; + CastCustomSpell(this,45470,&heal,NULL,NULL,true); + return true; + } break; } case SPELLFAMILY_POTION: |