diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e3ea54733..75d8ae0e1 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5015,11 +5015,9 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real) if(!Real) return; - if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0) - return; - // Recalculate bonus - ((Player*)m_target)->UpdateAttackPowerAndDamage(true); + if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)) + ((Player*)m_target)->UpdateAttackPowerAndDamage(true); } void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real) @@ -5028,11 +5026,9 @@ void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real) if(!Real) return; - if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0) - return; - // Recalculate bonus - ((Player*)m_target)->UpdateAttackPowerAndDamage(false); + if(m_target->GetTypeId() == TYPEID_PLAYER) + ((Player*)m_target)->UpdateAttackPowerAndDamage(false); } /********************************/ diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index f7d071b99..a369bc3ec 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -318,21 +318,21 @@ void Player::UpdateAttackPowerAndDamage(bool ranged ) float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE); //add dynamic flat mods - if ((getClassMask() & CLASSMASK_WAND_USERS)==0) + if( ranged ) { - if( ranged ) + if ((getClassMask() & CLASSMASK_WAND_USERS)==0) { - AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT); - for(AuraList::const_iterator i = mRAPbyIntellect.begin();i != mRAPbyIntellect.end(); ++i) - attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f); - } - else - { - AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT); - for(AuraList::const_iterator i = mRAPbyIntellect.begin();i != mRAPbyIntellect.end(); ++i) + AuraList const& mRAPbyStat = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT); + for(AuraList::const_iterator i = mRAPbyStat.begin();i != mRAPbyStat.end(); ++i) attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f); } } + else + { + AuraList const& mAPbyStat = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT); + for(AuraList::const_iterator i = mAPbyStat.begin();i != mAPbyStat.end(); ++i) + attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f); + } float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f01cb63b6..5ab363fd6 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 "7018" + #define REVISION_NR "7019" #endif // __REVISION_NR_H__