Core/Units: Implement hasted power regen and separated spell haste from casting speed

This commit is contained in:
luis
2026-10-07 11:45:18 -03:00
parent 66fc171381
commit 05856b586d
16 changed files with 288 additions and 123 deletions
@@ -593,6 +593,7 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
SetName(creatureInfo->Name); // at normal entry always
SetModCastingSpeed(1.0f);
SetModCastingSpeedNeg(1.0f);
SetModSpellHaste(1.0f);
SetModHaste(1.0f);
SetModRangedHaste(1.0f);
+20 -18
View File
@@ -2394,6 +2394,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
// set default cast time multiplier
SetModCastingSpeed(1.0f);
SetModCastingSpeedNeg(1.0f);
SetModSpellHaste(1.0f);
SetModHaste(1.0f);
SetModRangedHaste(1.0f);
@@ -5400,6 +5401,7 @@ void Player::UpdateRating(CombatRating cr)
float const multiplier = GetRatingMultiplier(cr);
float const oldVal = ApplyRatingDiminishing(cr, oldRating * multiplier);
float const newVal = ApplyRatingDiminishing(cr, amount * multiplier);
int32 highestOtherRating = 0;
switch (cr)
{
case CR_HASTE_MELEE:
@@ -5407,20 +5409,30 @@ void Player::UpdateRating(CombatRating cr)
ApplyAttackTimePercentMod(OFF_ATTACK, oldVal, false);
ApplyAttackTimePercentMod(BASE_ATTACK, newVal, true);
ApplyAttackTimePercentMod(OFF_ATTACK, newVal, true);
if (GetClass() == CLASS_DEATH_KNIGHT)
UpdatePowerRegen(POWER_RUNES);
highestOtherRating = std::max({ m_activePlayerData->CombatRatings[CR_HASTE_RANGED], m_activePlayerData->CombatRatings[CR_HASTE_SPELL] });
break;
case CR_HASTE_RANGED:
ApplyAttackTimePercentMod(RANGED_ATTACK, oldVal, false);
ApplyAttackTimePercentMod(RANGED_ATTACK, newVal, true);
highestOtherRating = std::max(m_activePlayerData->CombatRatings[CR_HASTE_MELEE], m_activePlayerData->CombatRatings[CR_HASTE_SPELL]);
break;
case CR_HASTE_SPELL:
ApplyCastTimePercentMod(oldVal, false);
ApplySpellHastePercentMod(oldVal, false);
ApplyCastTimePercentMod(newVal, true);
ApplySpellHastePercentMod(newVal, true);
highestOtherRating = std::max(m_activePlayerData->CombatRatings[CR_HASTE_MELEE], m_activePlayerData->CombatRatings[CR_HASTE_RANGED]);
break;
default:
break;
}
float oldHasteRegenVal = ApplyRatingDiminishing(cr, std::max(oldRating, highestOtherRating) * multiplier);
float newHasteRegenVal = ApplyRatingDiminishing(cr, std::max(amount, highestOtherRating) * multiplier);
if (oldHasteRegenVal != newHasteRegenVal)
{
ApplyHasteRegenPercentMod(oldHasteRegenVal, false);
ApplyHasteRegenPercentMod(newHasteRegenVal, true);
}
break;
}
case CR_AVOIDANCE:
@@ -28546,24 +28558,14 @@ uint8 Player::GetRunesState() const
uint32 Player::GetRuneBaseCooldown() const
{
double cooldown = RUNE_BASE_COOLDOWN;
PowerTypeEntry const* powerType = sDB2Manager.GetPowerTypeEntry(POWER_RUNES);
float regen = powerType->RegenPeace;
AuraEffectList const& regenAura = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
for (AuraEffectList::const_iterator i = regenAura.begin(); i != regenAura.end(); ++i)
if ((*i)->GetMiscValue() == POWER_RUNES)
cooldown *= 1.0 - (*i)->GetAmount() / 100.0;
uint32 powerIndex = GetPowerIndex(POWER_RUNES);
if (powerIndex <= MAX_POWERS_PER_CLASS)
regen += m_unitData->PowerRegenFlatModifier[powerIndex];
// Runes cooldown are now affected by player's haste from equipment ...
float hastePct = GetRatingBonusValue(CR_HASTE_MELEE);
// ... and some auras.
hastePct += GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_HASTE);
hastePct += GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_HASTE_2);
hastePct += GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_HASTE_3);
cooldown *= 1.0f - (hastePct / 100.0f);
return static_cast<float>(cooldown);
return 1.0f / regen * uint32(IN_MILLISECONDS);
}
void Player::SetRuneCooldown(uint8 index, uint32 cooldown)
-5
View File
@@ -496,11 +496,6 @@ struct Areas
#define MAX_RUNES 7
#define MAX_RECHARGING_RUNES 3
enum RuneCooldowns
{
RUNE_BASE_COOLDOWN = 10000
};
struct Runes
{
std::deque<uint8> CooldownOrder;
+3 -8
View File
@@ -891,14 +891,6 @@ void Player::UpdatePowerRegen(Powers power)
result_regen_interrupted += base_regen;
break;
}
case POWER_RUNES:
{
float base_regen = float(1 * IN_MILLISECONDS) / float(GetRuneBaseCooldown());
result_regen = base_regen;
result_regen_interrupted = base_regen;
break;
}
default:
break;
}
@@ -906,6 +898,9 @@ void Player::UpdatePowerRegen(Powers power)
if (PowerRegenInfo[AsUnderlyingType(power)])
pct_modifier *= sWorld->getRate(*PowerRegenInfo[AsUnderlyingType(power)]); // Config rate
if (powerType->GetFlags().HasFlag(PowerTypeFlags::RegenAffectedByHaste))
pct_modifier /= m_unitData->ModHasteRegen;
pct_modifier *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, AsUnderlyingType(power));
flat_modifier += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, AsUnderlyingType(power)) / 5.f;
+24 -4
View File
@@ -11382,17 +11382,37 @@ void Unit::ApplyCastTimePercentMod(float val, bool apply)
if (val > 0.f)
{
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModCastingSpeed), val, !apply);
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModSpellHaste), val, !apply);
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModHasteRegen), val, !apply);
}
else
{
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModCastingSpeed), -val, apply);
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModSpellHaste), -val, apply);
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModHasteRegen), -val, apply);
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModCastingSpeedNeg), -val, apply);
}
}
void Unit::ApplySpellHastePercentMod(float val, bool apply)
{
if (val > 0.f)
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModSpellHaste), val, !apply);
else
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModSpellHaste), -val, apply);
}
void Unit::ApplyHasteRegenPercentMod(float val, bool apply)
{
if (val > 0.f)
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModHasteRegen), val, !apply);
else if (val < 0.0f)
ApplyPercentModUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModHasteRegen), -val, apply);
else
return;
if (Player* player = ToPlayer())
for (Powers power : GetPowerTypes())
if (sDB2Manager.GetPowerTypeEntry(power)->GetFlags().HasFlag(PowerTypeFlags::RegenAffectedByHaste))
player->UpdatePowerRegen(power);
}
void Unit::UpdateAuraForGroup()
{
if (Player* player = ToPlayer())
+3
View File
@@ -850,8 +850,11 @@ class TC_GAME_API Unit : public WorldObject
void UpdateAttackTimeField(WeaponAttackType att);
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply);
void ApplyCastTimePercentMod(float val, bool apply);
void ApplySpellHastePercentMod(float val, bool apply);
void ApplyHasteRegenPercentMod(float val, bool apply);
void SetModCastingSpeed(float castingSpeed) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModCastingSpeed), castingSpeed); }
void SetModCastingSpeedNeg(float castingSpeedNeg) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModCastingSpeedNeg), castingSpeedNeg); }
void SetModSpellHaste(float spellHaste) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModSpellHaste), spellHaste); }
void SetModHaste(float haste) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModHaste), haste); }
void SetModRangedHaste(float rangedHaste) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ModRangedHaste), rangedHaste); }
+10 -10
View File
@@ -149,7 +149,7 @@ enum AuraType : uint32
SPELL_AURA_PERIODIC_HEALTH_FUNNEL = 62,
SPELL_AURA_MOD_ADDITIONAL_POWER_COST = 63,
SPELL_AURA_PERIODIC_MANA_LEECH = 64,
SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK = 65,
SPELL_AURA_MOD_CASTING_SPEED = 65,
SPELL_AURA_FEIGN_DEATH = 66,
SPELL_AURA_MOD_DISARM = 67,
SPELL_AURA_MOD_STALKED = 68,
@@ -277,7 +277,7 @@ enum AuraType : uint32
SPELL_AURA_MOD_FACTION_REPUTATION_GAIN = 190,
SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED = 191,
SPELL_AURA_MOD_MELEE_RANGED_HASTE = 192,
SPELL_AURA_MELEE_SLOW = 193,
SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE = 193,
SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL = 194,
SPELL_AURA_LEARN_SPELL = 195,
SPELL_AURA_MOD_COOLDOWN = 196, // only 24818 Noxious Breath
@@ -300,8 +300,8 @@ enum AuraType : uint32
SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT = 213,
SPELL_AURA_214 = 214,
SPELL_AURA_ARENA_PREPARATION = 215,
SPELL_AURA_HASTE_SPELLS = 216,
SPELL_AURA_MOD_MELEE_HASTE_2 = 217,
SPELL_AURA_MOD_SPELL_SLOW_NO_STACK = 216,
SPELL_AURA_MOD_MELEE_SLOW_NO_STACK = 217,
SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL = 218,
SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL = 219,
SPELL_AURA_MOD_ABILITY_SCHOOL_MASK = 220, // NYI
@@ -336,7 +336,7 @@ enum AuraType : uint32
SPELL_AURA_MOD_DAMAGE_PERCENT_DONE_BY_TARGET_AURA_MECHANIC = 249,
SPELL_AURA_MOD_INCREASE_HEALTH_2 = 250,
SPELL_AURA_MOD_ENEMY_DODGE = 251,
SPELL_AURA_MOD_SPEED_SLOW_ALL = 252,
SPELL_AURA_MOD_MELEE_RANGED_CASTING_SLOW_NO_STACK = 252,
SPELL_AURA_MOD_BLOCK_CRIT_CHANCE = 253,
SPELL_AURA_MOD_DISARM_OFFHAND = 254,
SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT = 255,
@@ -403,7 +403,7 @@ enum AuraType : uint32
SPELL_AURA_SCHOOL_ABSORB_OVERKILL = 316,
SPELL_AURA_MOD_SPELL_POWER_PCT = 317,
SPELL_AURA_MASTERY = 318,
SPELL_AURA_MOD_MELEE_HASTE_3 = 319,
SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN = 319,
SPELL_AURA_320 = 320,
SPELL_AURA_MOD_NO_ACTIONS = 321,
SPELL_AURA_INTERFERE_ENEMY_TARGETING = 322,
@@ -426,7 +426,7 @@ enum AuraType : uint32
SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER_PET = 339,
SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER = 340, // Increases health gained when resurrected by a guild member by X
SPELL_AURA_MOD_SPELL_CATEGORY_COOLDOWN = 341, // Modifies cooldown of all spells using affected category
SPELL_AURA_MOD_MELEE_RANGED_HASTE_2 = 342,
SPELL_AURA_MOD_MELEE_RANGED_HASTE_NO_REGEN = 342,
SPELL_AURA_MOD_MELEE_DAMAGE_FROM_CASTER = 343,
SPELL_AURA_MOD_AUTOATTACK_DAMAGE = 344,
SPELL_AURA_BYPASS_ARMOR_FOR_CASTER = 345,
@@ -439,7 +439,7 @@ enum AuraType : uint32
SPELL_AURA_352 = 352,
SPELL_AURA_MOD_CAMOUFLAGE = 353, // NYI
SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH = 354, // Restoration Shaman mastery - mod healing based on target's health (less = more healing)
SPELL_AURA_MOD_CASTING_SPEED = 355, // NYI
SPELL_AURA_MOD_CASTING_SLOW_NO_STACK = 355,
SPELL_AURA_PROVIDE_TOTEM_CATEGORY = 356,
SPELL_AURA_ENABLE_BOSS1_UNIT_FRAME = 357,
SPELL_AURA_WORGEN_ALTERED_FORM = 358,
@@ -665,7 +665,7 @@ enum AuraType : uint32
SPELL_AURA_578 = 578,
SPELL_AURA_579 = 579,
SPELL_AURA_580 = 580,
SPELL_AURA_581 = 581,
SPELL_AURA_MOD_RANGED_SLOW_NO_STACK = 581,
SPELL_AURA_582 = 582,
SPELL_AURA_583 = 583,
SPELL_AURA_584 = 584,
@@ -699,7 +699,7 @@ enum AuraType : uint32
SPELL_AURA_612 = 612,
SPELL_AURA_613 = 613,
SPELL_AURA_614 = 614,
SPELL_AURA_615 = 615,
SPELL_AURA_MOD_RANGED_HASTE_NO_REGEN = 615,
SPELL_AURA_616 = 616,
SPELL_AURA_617 = 617,
SPELL_AURA_618 = 618,
+197 -62
View File
@@ -134,7 +134,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, // 62 SPELL_AURA_PERIODIC_HEALTH_FUNNEL implemented in AuraEffect::PeriodicTick
&AuraEffect::HandleNoImmediateEffect, // 63 SPELL_AURA_MOD_ADDITIONAL_POWER_COST implemented in SpellInfo::CalcPowerCost
&AuraEffect::HandleNoImmediateEffect, // 64 SPELL_AURA_PERIODIC_MANA_LEECH implemented in AuraEffect::PeriodicTick
&AuraEffect::HandleModCastingSpeed, // 65 SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK
&AuraEffect::HandleModCastingSpeed, // 65 SPELL_AURA_MOD_CASTING_SPEED
&AuraEffect::HandleFeignDeath, // 66 SPELL_AURA_FEIGN_DEATH
&AuraEffect::HandleAuraModDisarm, // 67 SPELL_AURA_MOD_DISARM
&AuraEffect::HandleAuraModStalked, // 68 SPELL_AURA_MOD_STALKED
@@ -207,9 +207,9 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleModHealingDone, //135 SPELL_AURA_MOD_HEALING_DONE
&AuraEffect::HandleModHealingDonePct, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT
&AuraEffect::HandleModTotalPercentStat, //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
&AuraEffect::HandleModMeleeSpeedPct, //138 SPELL_AURA_MOD_MELEE_HASTE
&AuraEffect::HandleModMeleeHaste, //138 SPELL_AURA_MOD_MELEE_HASTE
&AuraEffect::HandleForceReaction, //139 SPELL_AURA_FORCE_REACTION
&AuraEffect::HandleAuraModRangedHaste, //140 SPELL_AURA_MOD_RANGED_HASTE
&AuraEffect::HandleModRangedHaste, //140 SPELL_AURA_MOD_RANGED_HASTE
&AuraEffect::HandleUnused, //141 SPELL_AURA_141
&AuraEffect::HandleAuraModBaseResistancePCT, //142 SPELL_AURA_MOD_BASE_RESISTANCE_PCT
&AuraEffect::HandleModRecoveryRateBySpellLabel, //143 SPELL_AURA_MOD_RECOVERY_RATE_BY_SPELL_LABEL also implemented in SpellHistory::StartCooldown
@@ -261,8 +261,8 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleModRating, //189 SPELL_AURA_MOD_RATING
&AuraEffect::HandleNoImmediateEffect, //190 SPELL_AURA_MOD_FACTION_REPUTATION_GAIN implemented in Player::CalculateReputationGain
&AuraEffect::HandleAuraModUseNormalSpeed, //191 SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED
&AuraEffect::HandleModMeleeRangedSpeedPct, //192 SPELL_AURA_MOD_MELEE_RANGED_HASTE
&AuraEffect::HandleModCombatSpeedPct, //193 SPELL_AURA_MELEE_SLOW (in fact combat (any type attack) speed pct)
&AuraEffect::HandleModMeleeRangedHaste, //192 SPELL_AURA_MOD_MELEE_RANGED_HASTE
&AuraEffect::HandleModMeleeRangedCastingHaste, //193 SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE
&AuraEffect::HandleNoImmediateEffect, //194 SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL implemented in Unit::CalcAbsorbResist
&AuraEffect::HandleLearnSpell, //195 SPELL_AURA_LEARN_SPELL
&AuraEffect::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN - flat mod of spell cooldowns
@@ -285,8 +285,8 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //213 SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT implemented in Player::RewardRage
&AuraEffect::HandleNULL, //214 Tamed Pet Passive
&AuraEffect::HandleArenaPreparation, //215 SPELL_AURA_ARENA_PREPARATION
&AuraEffect::HandleModCastingSpeed, //216 SPELL_AURA_HASTE_SPELLS
&AuraEffect::HandleModMeleeSpeedPct, //217 SPELL_AURA_MOD_MELEE_HASTE_2
&AuraEffect::HandleModSpellSlowNoStack, //216 SPELL_AURA_MOD_SPELL_SLOW_NO_STACK
&AuraEffect::HandleModMeleeSlowNoStack, //217 SPELL_AURA_MOD_MELEE_SLOW_NO_STACK
&AuraEffect::HandleNoImmediateEffect, //218 SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL implemented in AuraEffect::CalculateSpellMod()
&AuraEffect::HandleNoImmediateEffect, //219 SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL implemented in AuraEffect::CalculateSpellMod()
&AuraEffect::HandleNULL, //220 SPELL_AURA_MOD_ABILITY_SCHOOL_MASK
@@ -321,7 +321,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //249 SPELL_AURA_MOD_DAMAGE_PERCENT_DONE_BY_TARGET_AURA_MECHANIC implemented in Unit::SpellDamagePctDone and Unit::MeleeDamagePctDone
&AuraEffect::HandleAuraModIncreaseHealth, //250 SPELL_AURA_MOD_INCREASE_HEALTH_2
&AuraEffect::HandleNoImmediateEffect, //251 SPELL_AURA_MOD_ENEMY_DODGE implemented in Unit::GetUnitDodgeChance
&AuraEffect::HandleModCombatSpeedPct, //252 SPELL_AURA_252 Is there any difference between this and SPELL_AURA_MELEE_SLOW ? maybe not stacking mod?
&AuraEffect::HandleModMeleeRangedCastingSlowNoStack, //252 SPELL_AURA_MOD_MELEE_RANGED_CASTING_SLOW_NO_STACK
&AuraEffect::HandleNoImmediateEffect, //253 SPELL_AURA_MOD_BLOCK_CRIT_CHANCE implemented in Unit::isBlockCritical
&AuraEffect::HandleAuraModDisarm, //254 SPELL_AURA_MOD_DISARM_OFFHAND
&AuraEffect::HandleNoImmediateEffect, //255 SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT implemented in Unit::SpellDamageBonus
@@ -388,7 +388,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_SCHOOL_ABSORB_OVERKILL implemented in Unit::DealDamage()
&AuraEffect::HandleNULL, //317 SPELL_AURA_MOD_SPELL_POWER_PCT
&AuraEffect::HandleMastery, //318 SPELL_AURA_MASTERY
&AuraEffect::HandleModMeleeSpeedPct, //319 SPELL_AURA_MOD_MELEE_HASTE_3
&AuraEffect::HandleModMeleeHasteNoRegen, //319 SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN
&AuraEffect::HandleNULL, //320 SPELL_AURA_320
&AuraEffect::HandleAuraModNoActions, //321 SPELL_AURA_MOD_NO_ACTIONS
&AuraEffect::HandleNoImmediateEffect, //322 SPELL_AURA_INTERFERE_ENEMY_TARGETING implemented in Spell::CheckCast
@@ -411,7 +411,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //339 SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER_PET implemented in Unit::GetUnitCriticalChance and Unit::GetUnitSpellCriticalChance
&AuraEffect::HandleNULL, //340 SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER
&AuraEffect::HandleModSpellCategoryCooldown, //341 SPELL_AURA_MOD_SPELL_CATEGORY_COOLDOWN
&AuraEffect::HandleModMeleeRangedSpeedPct, //342 SPELL_AURA_MOD_MELEE_RANGED_HASTE_2
&AuraEffect::HandleModMeleeRangedHasteNoRegen, //342 SPELL_AURA_MOD_MELEE_RANGED_HASTE_NO_REGEN
&AuraEffect::HandleNoImmediateEffect, //343 SPELL_AURA_MOD_MELEE_DAMAGE_FROM_CASTER - Implemented in Unit::MeleeDamageBonusTaken
&AuraEffect::HandleNoImmediateEffect, //344 SPELL_AURA_MOD_AUTOATTACK_DAMAGE - Implemented in Unit::MeleeDamageBonusDone
&AuraEffect::HandleNoImmediateEffect, //345 SPELL_AURA_BYPASS_ARMOR_FOR_CASTER
@@ -424,7 +424,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //352 SPELL_AURA_352
&AuraEffect::HandleNULL, //353 SPELL_AURA_MOD_CAMOUFLAGE
&AuraEffect::HandleNoImmediateEffect, //354 SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH implemented in Unit::SpellHealingPctDone
&AuraEffect::HandleNULL, //355 SPELL_AURA_MOD_CASTING_SPEED
&AuraEffect::HandleModCastingSlowNoStack, //355 SPELL_AURA_MOD_CASTING_SLOW_NO_STACK
&AuraEffect::HandleNoImmediateEffect, //356 SPELL_AURA_PROVIDE_TOTEM_CATEGORY implemented in Player::HasItemTotemCategory
&AuraEffect::HandleNULL, //357 SPELL_AURA_ENABLE_BOSS1_UNIT_FRAME
&AuraEffect::HandleNULL, //358 SPELL_AURA_358
@@ -650,7 +650,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //578
&AuraEffect::HandleNULL, //579
&AuraEffect::HandleNULL, //580
&AuraEffect::HandleNULL, //581
&AuraEffect::HandleModRangedSlowNoStack, //581 SPELL_AURA_MOD_RANGED_SLOW_NO_STACK
&AuraEffect::HandleNULL, //582
&AuraEffect::HandleNULL, //583
&AuraEffect::HandleNULL, //584
@@ -684,7 +684,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //612
&AuraEffect::HandleNULL, //613
&AuraEffect::HandleNULL, //614
&AuraEffect::HandleNULL, //615
&AuraEffect::HandleModRangedHasteNoRegen, //615 SPELL_AURA_MOD_RANGED_HASTE_NO_REGEN
&AuraEffect::HandleNULL, //616
&AuraEffect::HandleNULL, //617
&AuraEffect::HandleNULL, //618
@@ -1400,7 +1400,7 @@ bool AuraEffect::CheckEffectProc(AuraApplication* aurApp, ProcEventInfo& eventIn
if (!spellInfo || !(spellInfo->GetAllEffectsMechanicMask() & (UI64LIT(1) << GetMiscValue())))
return false;
break;
case SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK:
case SPELL_AURA_MOD_CASTING_SPEED:
// skip melee hits and instant cast spells
if (!eventInfo.GetProcSpell() || !eventInfo.GetProcSpell()->GetCastTime())
return false;
@@ -4716,7 +4716,7 @@ void AuraEffect::HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode
// it's some rare case that you have 2 auras like that, but just in case ;)
bool remove = true;
Unit::AuraEffectList const& castingSpeedNotStack = target->GetAuraEffectsByType(SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK);
Unit::AuraEffectList const& castingSpeedNotStack = target->GetAuraEffectsByType(SPELL_AURA_MOD_CASTING_SPEED);
for (AuraEffect const* aurEff : castingSpeedNotStack)
{
if (aurEff != this && aurEff->GetAmount() >= 1000)
@@ -4738,42 +4738,208 @@ void AuraEffect::HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode
return;
if (spellGroupVal)
{
target->ApplyCastTimePercentMod(float(spellGroupVal), !apply);
target->ApplySpellHastePercentMod(float(spellGroupVal), !apply);
}
target->ApplyCastTimePercentMod((float)GetAmount(), apply);
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
target->ApplySpellHastePercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeRangedSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
//! ToDo: Haste auras with the same handler _CAN'T_ stack together
Unit* target = aurApp->GetTarget();
target->ApplyAttackTimePercentMod(BASE_ATTACK, (float)GetAmount(), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, (float)GetAmount(), apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, (float)GetAmount(), apply);
}
void AuraEffect::HandleModCombatSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const
void AuraEffect::HandleModMeleeHaste(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();
SpellEffectValue spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MELEE_SLOW);
SpellEffectValue spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, GetAuraType());
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)
{
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply);
target->ApplyHasteRegenPercentMod(float(spellGroupVal), !apply);
}
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
target->ApplyHasteRegenPercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModRangedHaste(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();
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
target->ApplyHasteRegenPercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeRangedHaste(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();
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
target->ApplyHasteRegenPercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeRangedCastingHaste(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();
SpellEffectValue spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE);
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)
{
target->ApplyCastTimePercentMod(float(spellGroupVal), !apply);
target->ApplySpellHastePercentMod(float(spellGroupVal), !apply);
target->ApplyHasteRegenPercentMod(float(spellGroupVal), !apply);
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(spellGroupVal), !apply);
}
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
target->ApplySpellHastePercentMod(float(GetAmount()), apply);
target->ApplyHasteRegenPercentMod(float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeSlowNoStack(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();
float minOtherValue = target->GetMaxNegativeAuraModifier(GetAuraType(), [this](AuraEffect const* aurEff) { return aurEff != this; });
if (GetAmount() >= minOtherValue)
return;
if (minOtherValue)
{
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(minOtherValue), !apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(minOtherValue), !apply);
}
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModRangedSlowNoStack(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();
float minOtherValue = target->GetMaxNegativeAuraModifier(GetAuraType(), [this](AuraEffect const* aurEff) { return aurEff != this; });
if (GetAmount() >= minOtherValue)
return;
if (minOtherValue)
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(minOtherValue), !apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModSpellSlowNoStack(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();
float minOtherValue = target->GetMaxNegativeAuraModifier(GetAuraType(), [this](AuraEffect const* aurEff) { return aurEff != this; });
if (GetAmount() >= minOtherValue)
return;
if (minOtherValue)
{
target->ApplyCastTimePercentMod(float(minOtherValue), !apply);
target->ApplySpellHastePercentMod(float(minOtherValue), !apply);
}
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
target->ApplySpellHastePercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModCastingSlowNoStack(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();
float minOtherValue = target->GetMaxNegativeAuraModifier(GetAuraType(), [this](AuraEffect const* aurEff) { return aurEff != this; });
if (GetAmount() >= minOtherValue)
return;
if (minOtherValue)
target->ApplyCastTimePercentMod(float(minOtherValue), !apply);
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeRangedCastingSlowNoStack(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();
float minOtherValue = target->GetMaxNegativeAuraModifier(GetAuraType(), [this](AuraEffect const* aurEff) { return aurEff != this; });
if (GetAmount() >= minOtherValue)
return;
if (minOtherValue)
{
target->ApplyCastTimePercentMod(float(minOtherValue), !apply);
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(minOtherValue), !apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(minOtherValue), !apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(minOtherValue), !apply);
}
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeHasteNoRegen(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();
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModRangedHasteNoRegen(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();
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleModMeleeRangedHasteNoRegen(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();
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
@@ -4790,37 +4956,6 @@ void AuraEffect::HandleModAttackSpeed(AuraApplication const* aurApp, uint8 mode,
target->UpdateDamagePhysical(BASE_ATTACK);
}
void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
//! ToDo: Haste auras with the same handler _CAN'T_ stack together
Unit* target = aurApp->GetTarget();
SpellEffectValue spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_MELEE_HASTE);
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)
{
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply);
}
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
}
void AuraEffect::HandleAuraModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
//! ToDo: Haste auras with the same handler _CAN'T_ stack together
Unit* target = aurApp->GetTarget();
target->ApplyAttackTimePercentMod(RANGED_ATTACK, (float)GetAmount(), apply);
}
/********************************/
/*** COMBAT RATING ***/
/********************************/
@@ -292,11 +292,19 @@ class TC_GAME_API AuraEffect
void HandleAuraModCritPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// attack speed
void HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModCombatSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedCastingHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeSlowNoStack(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModRangedSlowNoStack(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellSlowNoStack(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModCastingSlowNoStack(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedCastingSlowNoStack(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeHasteNoRegen(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModRangedHasteNoRegen(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedHasteNoRegen(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModAttackSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// combat rating
void HandleModRating(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModRatingPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
+10 -4
View File
@@ -4885,9 +4885,14 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef
case SPELL_AURA_MOD_SPELL_HIT_CHANCE:
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
case SPELL_AURA_MOD_RANGED_HASTE:
case SPELL_AURA_MOD_RANGED_HASTE_NO_REGEN:
case SPELL_AURA_MOD_MELEE_RANGED_HASTE:
case SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK:
case SPELL_AURA_HASTE_SPELLS:
case SPELL_AURA_MOD_MELEE_RANGED_HASTE_NO_REGEN:
case SPELL_AURA_MOD_CASTING_SPEED:
case SPELL_AURA_MOD_CASTING_SLOW_NO_STACK:
case SPELL_AURA_MOD_MELEE_SLOW_NO_STACK:
case SPELL_AURA_MOD_RANGED_SLOW_NO_STACK:
case SPELL_AURA_MOD_SPELL_SLOW_NO_STACK:
case SPELL_AURA_MOD_RECOVERY_RATE_BY_SPELL_LABEL:
case SPELL_AURA_MOD_DETECT_RANGE:
case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT:
@@ -4901,6 +4906,7 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef
break;
case SPELL_AURA_MOD_ATTACKSPEED: // some buffs have negative bp, check both target and bp
case SPELL_AURA_MOD_MELEE_HASTE:
case SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN:
case SPELL_AURA_MOD_DAMAGE_DONE:
case SPELL_AURA_MOD_RESISTANCE:
case SPELL_AURA_MOD_RESISTANCE_PCT:
@@ -4908,8 +4914,8 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef
case SPELL_AURA_MOD_ATTACK_POWER:
case SPELL_AURA_MOD_RANGED_ATTACK_POWER:
case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
case SPELL_AURA_MOD_SPEED_SLOW_ALL:
case SPELL_AURA_MELEE_SLOW:
case SPELL_AURA_MOD_MELEE_RANGED_CASTING_SLOW_NO_STACK:
case SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE:
case SPELL_AURA_MOD_ATTACK_POWER_PCT:
case SPELL_AURA_MOD_HEALING_DONE_PERCENT:
case SPELL_AURA_MOD_HEALING_PCT:
+2 -2
View File
@@ -1775,7 +1775,7 @@ void SpellMgr::LoadSpellProcs()
isTriggerAura[SPELL_AURA_DAMAGE_IMMUNITY] = true;
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL] = true;
isTriggerAura[SPELL_AURA_PROC_TRIGGER_DAMAGE] = true;
isTriggerAura[SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK] = true;
isTriggerAura[SPELL_AURA_MOD_CASTING_SPEED] = true;
isTriggerAura[SPELL_AURA_SCHOOL_ABSORB] = true; // Savage Defense untested
isTriggerAura[SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT] = true;
isTriggerAura[SPELL_AURA_MOD_POWER_COST_SCHOOL] = true;
@@ -1790,7 +1790,7 @@ void SpellMgr::LoadSpellProcs()
isTriggerAura[SPELL_AURA_MOD_MECHANIC_RESISTANCE] = true;
isTriggerAura[SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS] = true;
isTriggerAura[SPELL_AURA_MOD_MELEE_HASTE] = true;
isTriggerAura[SPELL_AURA_MOD_MELEE_HASTE_3] = true;
isTriggerAura[SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN] = true;
isTriggerAura[SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE] = true;
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
isTriggerAura[SPELL_AURA_MOD_SCHOOL_MASK_DAMAGE_FROM_CASTER] = true;
@@ -2248,7 +2248,7 @@ class spell_fel_lord_caza_disarmed : public AuraScript
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_fel_lord_caza_disarmed::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_fel_lord_caza_disarmed::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -2087,7 +2087,7 @@ class spell_thorim_aura_of_celerity : public AuraScript
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_thorim_aura_of_celerity::AfterRemove, EFFECT_0, SPELL_AURA_MELEE_SLOW, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_thorim_aura_of_celerity::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE, AURA_EFFECT_HANDLE_REAL);
}
};
+1 -1
View File
@@ -3081,7 +3081,7 @@ class spell_dh_void_metamorphosis_devourer : public AuraScript
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dh_void_metamorphosis_devourer::HandleFuryDrain, EFFECT_6, SPELL_AURA_PERIODIC_DUMMY);
AfterEffectRemove += AuraEffectRemoveFn(spell_dh_void_metamorphosis_devourer::HandleRemove, EFFECT_0, SPELL_AURA_MELEE_SLOW, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_dh_void_metamorphosis_devourer::HandleRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE, AURA_EFFECT_HANDLE_REAL);
}
};
+2 -2
View File
@@ -1497,7 +1497,7 @@ public:
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MELEE_SLOW);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_pet_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE);
}
};
@@ -1615,7 +1615,7 @@ public:
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_rune_weapon_scaling_02_AuraScript::CalculateDamageDoneAmount, EFFECT_0, SPELL_AURA_MOD_DAMAGE_DONE);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_rune_weapon_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MELEE_SLOW);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_rune_weapon_scaling_02_AuraScript::CalculateAmountMeleeHaste, EFFECT_1, SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE);
}
};
+1 -1
View File
@@ -1045,7 +1045,7 @@ class spell_warr_frenzied_enrage : public SpellScript
{
return ValidateSpellInfo({ SPELL_WARRIOR_FRENZIED_ENRAGE })
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
&& spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_MELEE_SLOW)
&& spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE)
&& spellInfo->GetEffect(EFFECT_1).IsAura(SPELL_AURA_MOD_INCREASE_SPEED);
}