diff options
author | win32 <none@none> | 2009-12-21 15:52:02 +0200 |
---|---|---|
committer | win32 <none@none> | 2009-12-21 15:52:02 +0200 |
commit | 636018ca7e5a76edc9f39a0672861e630374ec07 (patch) | |
tree | 05f75aedefd45227e6eed6fc6667003dc3e0fb49 | |
parent | c92fbc0dfbe4218f9fad46e9a2b7164df7bd7049 (diff) |
Implement aura 304.
--HG--
branch : trunk
-rw-r--r-- | src/game/SpellAuraDefines.h | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 12 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 633a81bf362..e95c1bb9620 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -349,7 +349,7 @@ enum AuraType SPELL_AURA_301 = 301, SPELL_AURA_302 = 302, SPELL_AURA_303 = 303, - SPELL_AURA_304 = 304, + SPELL_AURA_MOD_INEBRIATION = 304, SPELL_AURA_MOD_MINIMUM_SPEED = 305, SPELL_AURA_306 = 306, TOTAL_AURAS = 307 diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 382f55b3291..e7295fd7e74 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -347,7 +347,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest &Aura::HandleNULL, //292 call stabled pet &Aura::HandleNULL, //293 2 test spells - &Aura::HandleNoImmediateEffect, //294 SPELL_AURA_PREVENT_REGENERATE_POWER implemented in Player::Regenerate(Powers power) + &Aura::HandleNoImmediateEffect, //294 SPELL_AURA_PREVENT_REGENERATE_POWER implemented in Player::Regenerate(Powers power) &Aura::HandleNULL, //295 unused &Aura::HandleNULL, //296 2 spells &Aura::HandleNULL, //297 1 spell (counter spell school?) @@ -357,7 +357,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNULL, //301 5 spells &Aura::HandleNULL, //302 unused &Aura::HandleNULL, //303 17 spells - &Aura::HandleNULL, //304 2 spells (alcohol effect?) + &Aura::HandleAuraModInebriation, //304 2 spells &Aura::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED &Aura::HandleNULL //306 1 spell }; @@ -7302,3 +7302,11 @@ bool AuraEffect::IsPeriodicTickCrit(Unit const * pCaster) const } return false; } + +void AuraEffect::HandleAuraModInebriation(bool apply, bool Real, bool /*changeAmount*/) +{ + if(m_target->GetTypeId() != TYPEID_PLAYER) + return; + + m_target->SetUInt32Value(PLAYER_FAKE_INEBRIATION, apply ? ((uint32)1)<<(GetMiscValue()-1) : 0 ); +} diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 3730107461a..83576d6be34 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -333,6 +333,7 @@ class TRINITY_DLL_SPEC AuraEffect void HandleAuraCloneCaster(bool Apply, bool Real, bool changeAmount); void HandleAuraModCritPct(bool Apply, bool Real, bool changeAmount); void HandleAuraLinked(bool Apply, bool Real, bool changeAmount); + void HandleAuraModInebriation(bool apply, bool Real, bool changeAmount); void HandleAuraEffectSpecificMods(bool apply, bool Real, bool changeAmount); int32 CalculateCrowdControlAuraAmount(Unit * caster); |