mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7019] Fix AP/RAP bonus from stat at aura apply/remove
Not use CLASSMASK_WAND_USERS mask for AP bonus Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
409ea262a5
commit
f893214e2b
3 changed files with 15 additions and 19 deletions
|
|
@ -5015,10 +5015,8 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
|
||||||
if(!Real)
|
if(!Real)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Recalculate bonus
|
// Recalculate bonus
|
||||||
|
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS))
|
||||||
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
|
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5028,10 +5026,8 @@ void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
|
||||||
if(!Real)
|
if(!Real)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Recalculate bonus
|
// Recalculate bonus
|
||||||
|
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||||
((Player*)m_target)->UpdateAttackPowerAndDamage(false);
|
((Player*)m_target)->UpdateAttackPowerAndDamage(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,21 +318,21 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
|
||||||
float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
|
float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
|
||||||
|
|
||||||
//add dynamic flat mods
|
//add dynamic flat mods
|
||||||
if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
|
|
||||||
{
|
|
||||||
if( ranged )
|
if( ranged )
|
||||||
{
|
{
|
||||||
AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT);
|
if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
|
||||||
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);
|
attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
|
AuraList const& mAPbyStat = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
|
||||||
for(AuraList::const_iterator i = mRAPbyIntellect.begin();i != mRAPbyIntellect.end(); ++i)
|
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);
|
attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
|
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7018"
|
#define REVISION_NR "7019"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue