mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8312] Fixed bonus damage for some DK spells.
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
58764efabd
commit
7dccfe768f
2 changed files with 33 additions and 1 deletions
|
|
@ -4502,6 +4502,38 @@ void Spell::EffectWeaponDmg(uint32 i)
|
|||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Blood Strike, Heart Strike, Obliterate
|
||||
// Blood-Caked Strike, Scourge Strike
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0002000001400000) ||
|
||||
m_spellInfo->SpellIconID == 1736 || m_spellInfo->SpellIconID == 3143)
|
||||
{
|
||||
uint32 count = 0;
|
||||
Unit::AuraMap const& auras = unitTarget->GetAuras();
|
||||
for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
{
|
||||
if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE &&
|
||||
itr->second->GetCasterGUID() == m_caster->GetGUID() &&
|
||||
IsSpellLastAuraEffect(itr->second->GetSpellProto(), itr->second->GetEffIndex()))
|
||||
++count;
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
// Effect 1(for Blood-Caked Strike)/3(other) damage is bonus
|
||||
double bonus = count * CalculateDamage(m_spellInfo->SpellIconID == 1736 ? 0 : 2, unitTarget) / 100.0f;
|
||||
// Blood Strike, Blood-Caked Strike and Obliterate store bonus*2
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0002000000400000) ||
|
||||
m_spellInfo->SpellIconID == 1736)
|
||||
bonus /= 2.0f;
|
||||
|
||||
totalDamagePercentMod += bonus;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue