diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 58fada2f5..2071944b5 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -339,7 +339,7 @@ enum AuraType SPELL_AURA_HEAL_ABSORB = 301, SPELL_AURA_302 = 302, SPELL_AURA_303 = 303, - SPELL_AURA_304 = 304, + SPELL_AURA_FAKE_INEBRIATE = 304, SPELL_AURA_MOD_MINIMUM_SPEED = 305, SPELL_AURA_306 = 306, SPELL_AURA_307 = 307, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 35e323634..9b7562456 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -355,7 +355,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNULL, //301 SPELL_AURA_HEAL_ABSORB 5 spells &Aura::HandleUnused, //302 unused (3.2.2a) &Aura::HandleNULL, //303 17 spells - &Aura::HandleNULL, //304 2 spells (alcohol effect?) + &Aura::HandleAuraFakeInebriation, //304 SPELL_AURA_FAKE_INEBRIATE &Aura::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED &Aura::HandleNULL, //306 1 spell &Aura::HandleNULL, //307 absorb healing? @@ -4835,6 +4835,25 @@ void Aura::HandleModTaunt(bool apply, bool Real) } } +void Aura::HandleAuraFakeInebriation(bool apply, bool Real) +{ + // all applied/removed only at real aura add/remove + if (!Real) + return; + + Unit* target = GetTarget(); + + if (target->GetTypeId() == TYPEID_PLAYER) + { + int32 point = target->GetInt32Value(PLAYER_FAKE_INEBRIATION); + point += (apply ? 1 : -1) * GetBasePoints(); + + target->SetInt32Value(PLAYER_FAKE_INEBRIATION, point); + } + + target->UpdateObjectVisibility(); +} + /*********************************************************/ /*** MODIFY SPEED ***/ /*********************************************************/ diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 440f80f4d..1b9460064 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -269,6 +269,7 @@ class MANGOS_DLL_SPEC Aura void HandleAuraModSilence(bool Apply, bool Real); void HandleAuraModStat(bool Apply, bool Real); void HandleDetectAmore(bool Apply, bool Real); + void HandleAuraFakeInebriation(bool Apply, bool Real); void HandleAuraModIncreaseSpeed(bool Apply, bool Real); void HandleAuraModIncreaseMountedSpeed(bool Apply, bool Real); void HandleAuraModIncreaseFlightSpeed(bool Apply, bool Real); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 14c52875c..e76a4a124 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12005" + #define REVISION_NR "12006" #endif // __REVISION_NR_H__