подсмотрено и пока сделано так
Код:
diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h
index 58fada2..2071944 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 38be231..9a0b02d 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?
@@ -4830,6 +4830,37 @@ 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)
+ return;
+
+ if (target->GetTypeId() == TYPEID_PLAYER)
+ {
+ int32 point = target->GetInt32Value(PLAYER_FAKE_INEBRIATION);
+
+ if (apply)
+ {
+ target->SetInt32Value(PLAYER_FAKE_INEBRIATION,point + GetBasePoints());
+ }
+
+ else
+ {
+ target->SetInt32Value(PLAYER_FAKE_INEBRIATION, point - GetBasePoints());
+ }
+
+ target->UpdateObjectVisibility();
+ }
+
+}
+
+
/*********************************************************/
/*** MODIFY SPEED ***/
/*********************************************************/
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 440f80f..1b94600 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);