aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-04 09:54:21 -0600
committermegamage <none@none>2009-01-04 09:54:21 -0600
commit3797d15426846d258075742448858f834259e4c5 (patch)
treeae9770a84bb7a39fe632ed6f56855756dd80d964 /src/game/StatSystem.cpp
parentf1d613432047ad4106f4fbbd5f8875a223b60d15 (diff)
*Mangos [7019] Fix AP/RAP bonus from stat at aura apply/remove. Not use CLASSMASK_WAND_USERS mask for AP bonus. By DiSlord.
*Mangos [7020] Initilize glyph order at loading/reset. This must fix problems with glyph use for old(converted) characters. By VladimirMangos. --HG-- branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index fec6d6f9ddb..2cfac58f962 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -320,21 +320,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;