mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9834] Fix damage bonus applying from 49471 and ranks to 49143 and ranks
This commit is contained in:
parent
8a4b520979
commit
9c6b53aca9
2 changed files with 33 additions and 3 deletions
|
|
@ -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
|
||||
// =================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue