From fccf6fb72b60b08dfbe6d5fb17fba55239944fca Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 9 Mar 2024 00:54:27 +0100 Subject: Core/Objects: Implemented vignettes --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 10 +++++++++- src/server/game/Spells/Auras/SpellAuraEffects.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/server/game/Spells') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 65894bf3ec7..f21ebb30e61 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -334,7 +334,7 @@ NonDefaultConstructible AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleNoImmediateEffect, //263 SPELL_AURA_DISABLE_CASTING_EXCEPT_ABILITIES implemented in Spell::CheckCast &AuraEffect::HandleNoImmediateEffect, //264 SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES implemented in Spell::CheckCast, Unit::AttackerStateUpdate &AuraEffect::HandleUnused, //265 unused (4.3.4) - &AuraEffect::HandleNULL, //266 SPELL_AURA_SET_VIGNETTE + &AuraEffect::HandleSetVignette, //266 SPELL_AURA_SET_VIGNETTE &AuraEffect::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmunedToSpellEffect &AuraEffect::HandleModArmorPctFromStat, //268 SPELL_AURA_MOD_ARMOR_PCT_FROM_STAT also implemented in Player::UpdateArmor() &AuraEffect::HandleNoImmediateEffect, //269 SPELL_AURA_MOD_IGNORE_TARGET_RESIST implemented in Unit::CalcAbsorbResist and CalcArmorReducedDamage @@ -5322,6 +5322,14 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode, target->ToPlayer()->SendOnCancelExpectedVehicleRideAura(); } +void AuraEffect::HandleSetVignette(AuraApplication const* aurApp, uint8 mode, bool apply) const +{ + if (!(mode & AURA_EFFECT_HANDLE_REAL)) + return; + + aurApp->GetTarget()->SetVignette(apply ? GetMiscValue() : 0); +} + void AuraEffect::HandlePreventResurrection(AuraApplication const* aurApp, uint8 mode, bool apply) const { if (!(mode & AURA_EFFECT_HANDLE_REAL)) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 8260d96f621..810af0fc8a7 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -314,6 +314,7 @@ class TC_GAME_API AuraEffect void HandleAuraModFakeInebriation(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode, bool apply) const; + void HandleSetVignette(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandlePreventResurrection(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleMastery(AuraApplication const* aurApp, uint8 mode, bool apply) const; void HandleAuraForceWeather(AuraApplication const* aurApp, uint8 mode, bool apply) const; -- cgit v1.2.3