Показать сообщение отдельно
Старый 14.05.2012, 13:06   #3
partizanes
Пользователь
 
Аватар для partizanes
 
Регистрация: 15.03.2010
Адрес: Беларусь,Витебск
Сообщений: 93
Сказал(а) спасибо: 97
Поблагодарили 36 раз(а) в 11 сообщениях
partizanes На верном пути
Отправить сообщение для partizanes с помощью ICQ Отправить сообщение для partizanes с помощью Skype™
По умолчанию

подсмотрено и пока сделано так
Код:
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);
Вложения
Тип файла: patch FakeInebriation (2).patch (2.8 Кб, 1 просмотров)
__________________
Когда-нибудь на оффе поставят Mangos...
partizanes вне форума  
3 пользователя(ей) сказали cпасибо:
KiriX (13.06.2012), schmoozerd (13.06.2012), Vladimir (13.06.2012)