Merge pull request #2920 from Chaplain/cleanup
Core/Auras: Improvements in SPELL_AURA_MOD_DAMAGE_PERCENT_DONE handling: * Weapon specific case for MOD_DAMAGE_DONE_PCT shouldn't change PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, because PLAYER_FIELD_MOD_DAMAGE_DONE_PCT applyed for _all_ damage that deal target. * Fixed applying SPELL_AURA_MOD_DAMAGE_PERCENT_DONE for SpellDamageBonus.
This commit is contained in:
@@ -8090,8 +8090,6 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att
|
|||||||
HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()), apply);
|
HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()), apply);
|
||||||
if (unitModType == TOTAL_VALUE)
|
if (unitModType == TOTAL_VALUE)
|
||||||
ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
|
ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
|
||||||
else
|
|
||||||
ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float (aura->GetAmount()), apply);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10368,7 +10368,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
|||||||
|
|
||||||
AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||||
for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||||
if ((*i)->GetMiscValue() & spellProto->GetSchoolMask() && !(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_NORMAL))
|
if ((*i)->GetMiscValue() & spellProto->GetSchoolMask())
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
||||||
AddPctN(DoneTotalMod, (*i)->GetAmount());
|
AddPctN(DoneTotalMod, (*i)->GetAmount());
|
||||||
|
|||||||
@@ -4522,7 +4522,7 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// done in Player::_ApplyWeaponDependentAuraMods for !SPELL_SCHOOL_MASK_NORMAL and also for wand case
|
// done in Player::_ApplyWeaponDependentAuraMods for SPELL_SCHOOL_MASK_NORMAL && EquippedItemClass != -1 and also for wand case
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user