diff options
| author | ModoX <moardox@gmail.com> | 2023-12-15 09:57:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-15 09:57:52 +0100 |
| commit | 8b9eaf0bdf9c6ae463c78d6a952330daaa1dcb63 (patch) | |
| tree | 72c00bc026c4bca22d2271f5f7a86907939a6179 /src | |
| parent | 5c59e2a248c9b2132f4e863de56c981cfa83ec0b (diff) | |
Core/Spells: Implemented SPELL_AURA_MOD_FIXATE (#29488)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 19 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.h | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b5da0699a0e..e9e0c7b2cce 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -195,7 +195,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleNoImmediateEffect, //125 SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus &AuraEffect::HandleNoImmediateEffect, //126 SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus &AuraEffect::HandleNoImmediateEffect, //127 SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus - &AuraEffect::HandleNULL, //128 SPELL_AURA_MOD_FIXATE + &AuraEffect::HandleAuraModFixate, //128 SPELL_AURA_MOD_FIXATE &AuraEffect::HandleAuraModIncreaseSpeed, //129 SPELL_AURA_MOD_SPEED_ALWAYS &AuraEffect::HandleAuraModIncreaseMountedSpeed, //130 SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS &AuraEffect::HandleNoImmediateEffect, //131 SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS implemented in Unit::MeleeDamageBonus @@ -2894,6 +2894,23 @@ void AuraEffect::HandleModDetaunt(AuraApplication const* aurApp, uint8 mode, boo caster->GetThreatManager().TauntUpdate(); } +void AuraEffect::HandleAuraModFixate(AuraApplication const* aurApp, uint8 mode, bool apply) const +{ + if (!(mode & AURA_EFFECT_HANDLE_REAL)) + return; + + Unit* caster = GetCaster(); + Unit* target = aurApp->GetTarget(); + + if (!caster || !caster->IsAlive() || !target->IsAlive() || !caster->CanHaveThreatList()) + return; + + if (apply) + caster->GetThreatManager().FixateTarget(target); + else + caster->GetThreatManager().ClearFixate(); +} + /*****************************/ /*** CONTROL ***/ /*****************************/ diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index ba5e771f456..8260d96f621 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -193,6 +193,7 @@ class TC_GAME_API AuraEffect void HandleAuraModTotalThreat(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleModTaunt(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleModDetaunt(AuraApplication const* aurApp, uint8 mode, bool apply) const; + void HandleAuraModFixate(AuraApplication const* aurApp, uint8 mode, bool apply) const; // control void HandleModConfuse(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleModFear(AuraApplication const* aurApp, uint8 mode, bool apply) const; |
