*Fix Death Strike.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-04 00:19:55 +01:00
parent d06e75e0a8
commit 454f882cf2
3 changed files with 30 additions and 0 deletions
+2
View File
@@ -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);
+10
View File
@@ -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
+18
View File
@@ -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: