aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-07-02 00:04:58 +0200
committerShauren <shauren.trinity@gmail.com>2023-07-02 00:04:58 +0200
commit36ecc2d8cb8d913a6ac0936031de47b18c69a90d (patch)
tree9273a16dcdefe71d30d70f8c861deb9cec7ede41 /src/server/game
parent9e9f67d6bd6dcaabbf52f5c6809ca69440736f47 (diff)
Core/Auras: Removed triggering aura effect from SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL handling (paladin Crusading Strikes combines this with a proc aura on another effect on the same spell)
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 46b0f9bc681..63b8ad8f6c2 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -2123,15 +2123,11 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
victim = GetMeleeHitRedirectTarget(victim);
AuraEffectList const& meleeAttackOverrides = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL);
- AuraEffect const* meleeAttackAuraEffect = nullptr;
uint32 meleeAttackSpellId = 0;
if (attType == BASE_ATTACK)
{
if (!meleeAttackOverrides.empty())
- {
- meleeAttackAuraEffect = meleeAttackOverrides.front();
- meleeAttackSpellId = meleeAttackAuraEffect->GetSpellEffectInfo().TriggerSpell;
- }
+ meleeAttackSpellId = meleeAttackOverrides.front()->GetSpellEffectInfo().TriggerSpell;
}
else
{
@@ -2140,13 +2136,10 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
return aurEff->GetSpellEffectInfo().MiscValue != 0;
});
if (itr != meleeAttackOverrides.end())
- {
- meleeAttackAuraEffect = *itr;
- meleeAttackSpellId = meleeAttackAuraEffect->GetSpellEffectInfo().MiscValue;
- }
+ meleeAttackSpellId = (*itr)->GetSpellEffectInfo().MiscValue;
}
- if (!meleeAttackAuraEffect)
+ if (!meleeAttackSpellId)
{
CalcDamageInfo damageInfo;
CalculateMeleeDamage(victim, &damageInfo, attType);
@@ -2174,7 +2167,7 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
}
else
{
- CastSpell(victim, meleeAttackSpellId, meleeAttackAuraEffect);
+ CastSpell(victim, meleeAttackSpellId, true);
uint32 hitInfo = HITINFO_AFFECTS_VICTIM | HITINFO_NO_ANIMATION;
if (attType == OFF_ATTACK)