mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Core/Auras: Update aura type to its new meaning
This commit is contained in:
@@ -364,15 +364,6 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
|
||||
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
|
||||
|
||||
//add dynamic flat mods
|
||||
if (!ranged)
|
||||
{
|
||||
AuraEffectList const& mAPbyArmor = GetAuraEffectsByType(SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR);
|
||||
for (AuraEffectList::const_iterator iter = mAPbyArmor.begin(); iter != mAPbyArmor.end(); ++iter)
|
||||
// always: ((*i)->GetModifier()->m_miscvalue == 1 == SPELL_SCHOOL_MASK_NORMAL)
|
||||
attPowerMod += int32(GetArmor() / (*iter)->GetAmount());
|
||||
}
|
||||
|
||||
if (ranged)
|
||||
{
|
||||
SetRangedAttackPower(int32(base_attPower));
|
||||
|
||||
@@ -355,7 +355,7 @@ enum AuraType : uint32
|
||||
SPELL_AURA_MOD_BASE_HEALTH_PCT = 282,
|
||||
SPELL_AURA_MOD_HEALING_RECEIVED = 283, // Possibly only for some spell family class spells
|
||||
SPELL_AURA_LINKED = 284,
|
||||
SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR = 285,
|
||||
SPELL_AURA_LINKED_2 = 285,
|
||||
SPELL_AURA_ABILITY_PERIODIC_CRIT = 286,
|
||||
SPELL_AURA_DEFLECT_SPELLS = 287,
|
||||
SPELL_AURA_IGNORE_HIT_DIRECTION = 288,
|
||||
@@ -395,7 +395,7 @@ enum AuraType : uint32
|
||||
SPELL_AURA_INTERFERE_TARGETTING = 322,
|
||||
SPELL_AURA_323 = 323, // Not used in 4.3.4
|
||||
SPELL_AURA_324 = 324, // spell critical chance (probably by school mask)
|
||||
SPELL_AURA_325 = 325, // Not used in 4.3.4
|
||||
SPELL_AURA_LEARN_PVP_TALENT = 325, // NYI
|
||||
SPELL_AURA_PHASE_GROUP = 326, // Puts the player in all the phases that are in the group with id = miscB
|
||||
SPELL_AURA_327 = 327, // Not used in 4.3.4
|
||||
SPELL_AURA_TRIGGER_SPELL_ON_POWER_PCT = 328, // NYI Triggers spell when power goes above (MiscB = 0) or falls below (MiscB = 1) specified percent value (once, not every time condition has meet)
|
||||
|
||||
@@ -351,7 +351,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
|
||||
&AuraEffect::HandleNoImmediateEffect, //283 SPELL_AURA_MOD_HEALING_RECEIVED implemented in Unit::SpellHealingBonus
|
||||
&AuraEffect::HandleAuraLinked, //284 SPELL_AURA_LINKED
|
||||
&AuraEffect::HandleAuraModAttackPowerOfArmor, //285 SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR implemented in Player::UpdateAttackPowerAndDamage
|
||||
&AuraEffect::HandleAuraLinked, //285 SPELL_AURA_LINKED_2
|
||||
&AuraEffect::HandleNoImmediateEffect, //286 SPELL_AURA_ABILITY_PERIODIC_CRIT implemented in AuraEffect::PeriodicTick
|
||||
&AuraEffect::HandleNoImmediateEffect, //287 SPELL_AURA_DEFLECT_SPELLS implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult
|
||||
&AuraEffect::HandleNoImmediateEffect, //288 SPELL_AURA_IGNORE_HIT_DIRECTION implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult Unit::RollMeleeOutcomeAgainst
|
||||
@@ -391,7 +391,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNoImmediateEffect, //322 SPELL_AURA_INTERFERE_TARGETTING implemented in Spell::CheckCast
|
||||
&AuraEffect::HandleUnused, //323 unused (4.3.4)
|
||||
&AuraEffect::HandleNULL, //324 SPELL_AURA_324
|
||||
&AuraEffect::HandleUnused, //325 unused (4.3.4)
|
||||
&AuraEffect::HandleUnused, //325 SPELL_AURA_LEARN_PVP_TALENT
|
||||
&AuraEffect::HandlePhaseGroup, //326 SPELL_AURA_PHASE_GROUP
|
||||
&AuraEffect::HandleUnused, //327 unused (4.3.4)
|
||||
&AuraEffect::HandleNULL, //328 SPELL_AURA_TRIGGER_SPELL_ON_POWER_PCT
|
||||
@@ -4178,18 +4178,6 @@ void AuraEffect::HandleAuraModRangedAttackPowerPercent(AuraApplication const* au
|
||||
target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(GetAmount()), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModAttackPowerOfArmor(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
|
||||
{
|
||||
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
|
||||
return;
|
||||
|
||||
Unit* target = aurApp->GetTarget();
|
||||
|
||||
// Recalculate bonus
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->ToPlayer()->UpdateAttackPowerAndDamage(false);
|
||||
}
|
||||
|
||||
/********************************/
|
||||
/*** DAMAGE BONUS ***/
|
||||
/********************************/
|
||||
|
||||
@@ -286,7 +286,6 @@ class TC_GAME_API AuraEffect
|
||||
void HandleAuraModRangedAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraModAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraModRangedAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraModAttackPowerOfArmor(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
// damage bonus
|
||||
void HandleModDamageDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
|
||||
Reference in New Issue
Block a user