From 1fea8a321fee40bbc3db8ea207afe1d23fa668c6 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Fri, 1 Apr 2011 22:01:44 +0400 Subject: [PATCH] [11304] Restore school check for weapon in SPELL_AURA_MOD_DAMAGE_*DONE Broken in [10692]. --- src/game/Unit.cpp | 16 ++++++++-------- src/shared/revision_nr.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 8e855d374..5bbcfa2c9 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7205,10 +7205,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType AuraList const& mModDamageDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE); for(AuraList::const_iterator i = mModDamageDone.begin(); i != mModDamageDone.end(); ++i) { - if (((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school - (*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells) - ((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent - (pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements + if ((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school + (*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells) + (((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent + (pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements { DoneFlat += (*i)->GetModifier()->m_amount; } @@ -7244,10 +7244,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); for(AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i) { - if (((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school - (*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells) - ((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent - (pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements + if ((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school + (*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells) + (((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent + (pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements { DonePercent *= ((*i)->GetModifier()->m_amount+100.0f) / 100.0f; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d75d13a1d..14520c748 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11303" + #define REVISION_NR "11304" #endif // __REVISION_NR_H__