mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Implement SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT aura
Remove redurant check m_miscvalue on Intelect for SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
061e73492e
commit
4090872bfa
3 changed files with 29 additions and 13 deletions
|
|
@ -224,7 +224,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||||
&Aura::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
&Aura::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
||||||
&Aura::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
&Aura::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
||||||
&Aura::HandleUnused, //173 SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
|
&Aura::HandleUnused, //173 SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
|
||||||
&Aura::HandleModSpellDamagePercentFromStat, //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT implemented in Unit::SpellBaseDamageBonus (by default intellect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT)
|
&Aura::HandleModSpellDamagePercentFromStat, //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT implemented in Unit::SpellBaseDamageBonus
|
||||||
&Aura::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonus
|
&Aura::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonus
|
||||||
&Aura::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end
|
&Aura::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end
|
||||||
&Aura::HandleNULL, //177 SPELL_AURA_AOE_CHARM
|
&Aura::HandleNULL, //177 SPELL_AURA_AOE_CHARM
|
||||||
|
|
@ -318,7 +318,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||||
&Aura::HandleNULL, //265 unused
|
&Aura::HandleNULL, //265 unused
|
||||||
&Aura::HandleNULL, //266 unused
|
&Aura::HandleNULL, //266 unused
|
||||||
&Aura::HandleNULL, //267 some immunity?
|
&Aura::HandleNULL, //267 some immunity?
|
||||||
&Aura::HandleNULL, //268 SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
|
&Aura::HandleAuraModAttackPowerOfStatPercent, //268 SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
|
||||||
&Aura::HandleNULL, //269 ignore DR effects?
|
&Aura::HandleNULL, //269 ignore DR effects?
|
||||||
&Aura::HandleNULL, //270
|
&Aura::HandleNULL, //270
|
||||||
&Aura::HandleNULL, //271 increase damage done?
|
&Aura::HandleNULL, //271 increase damage done?
|
||||||
|
|
@ -5014,17 +5014,23 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
|
||||||
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_modifier.m_miscvalue != STAT_INTELLECT)
|
|
||||||
{
|
|
||||||
// support required adding UpdateAttackPowerAndDamage calls at stat update
|
|
||||||
sLog.outError("Aura SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT (212) need support non-intelect stats!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recalculate bonus
|
// Recalculate bonus
|
||||||
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
|
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
|
||||||
|
{
|
||||||
|
// spells required only Real aura add/remove
|
||||||
|
if(!Real)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Recalculate bonus
|
||||||
|
((Player*)m_target)->UpdateAttackPowerAndDamage(false);
|
||||||
|
}
|
||||||
|
|
||||||
/********************************/
|
/********************************/
|
||||||
/*** DAMAGE BONUS ***/
|
/*** DAMAGE BONUS ***/
|
||||||
/********************************/
|
/********************************/
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,7 @@ class MANGOS_DLL_SPEC Aura
|
||||||
void HandleAuraModAttackPowerPercent(bool apply, bool Real);
|
void HandleAuraModAttackPowerPercent(bool apply, bool Real);
|
||||||
void HandleAuraModRangedAttackPowerPercent(bool apply, bool Real);
|
void HandleAuraModRangedAttackPowerPercent(bool apply, bool Real);
|
||||||
void HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real);
|
void HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real);
|
||||||
|
void HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real);
|
||||||
void HandleSpiritOfRedemption(bool apply, bool Real);
|
void HandleSpiritOfRedemption(bool apply, bool Real);
|
||||||
void HandleModManaRegen(bool apply, bool Real);
|
void HandleModManaRegen(bool apply, bool Real);
|
||||||
void HandleComprehendLanguage(bool apply, bool Real);
|
void HandleComprehendLanguage(bool apply, bool Real);
|
||||||
|
|
|
||||||
|
|
@ -308,11 +308,20 @@ 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( ranged && (getClassMask() & CLASSMASK_WAND_USERS)==0)
|
if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
|
||||||
{
|
{
|
||||||
AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT);
|
if( ranged )
|
||||||
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);
|
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)
|
||||||
|
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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue