[9834] Fix damage bonus applying from 49471 and ranks to 49143 and ranks

This commit is contained in:
Laise 2010-05-04 17:11:27 +03:00
parent 8a4b520979
commit 9c6b53aca9
2 changed files with 33 additions and 3 deletions

View file

@ -9107,8 +9107,8 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
}
case SPELLFAMILY_DEATHKNIGHT:
{
// Icy Touch, Howling Blast and Frost Strike
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000600000002))
// Icy Touch and Howling Blast
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000200000002))
{
// search disease
bool found = false;
@ -10179,6 +10179,36 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType
}
}
// Frost Strike
if (spellProto && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000))
{
// search disease
bool found = false;
Unit::AuraMap const& auras = pVictim->GetAuras();
for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
{
if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE)
{
found = true;
break;
}
}
if(found)
{
// search for Glacier Rot dummy aura
Unit::AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
{
if ((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()] == 7244)
{
DonePercent *= ((*i)->GetModifier()->m_amount+100.0f) / 100.0f;
break;
}
}
}
}
// final calculation
// =================

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9833"
#define REVISION_NR "9834"
#endif // __REVISION_NR_H__