diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 32 | ||||
-rw-r--r-- | src/game/SpellAuraDefines.h | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 25 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 4 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
6 files changed, 48 insertions, 18 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8e7c4762270..52e16a4c396 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19453,20 +19453,24 @@ void Player::UpdateZoneDependentAuras( uint32 newZone ) } // Some spells applied at enter into zone (with subzones) - // Human Illusion - // NOTE: these are removed by RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP); - if ( newZone == 2367 ) // Old Hillsbrad Foothills - { - uint32 spellid = 0; - // all horde races - if( GetTeam() == HORDE ) - spellid = getGender() == GENDER_FEMALE ? 35481 : 35480; - // and some alliance races - else if( getRace() == RACE_NIGHTELF || getRace() == RACE_DRAENEI ) - spellid = getGender() == GENDER_FEMALE ? 35483 : 35482; - - if(spellid && !HasAura(spellid,0) ) - CastSpell(this,spellid,true); + switch(newZone) + { + case 2367: // Old Hillsbrad Foothills + { + // Human Illusion + // NOTE: these are removed by RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP); + uint32 spellid = 0; + // all horde races + if( GetTeam() == HORDE ) + spellid = getGender() == GENDER_FEMALE ? 35481 : 35480; + // and some alliance races + else if( getRace() == RACE_NIGHTELF || getRace() == RACE_DRAENEI ) + spellid = getGender() == GENDER_FEMALE ? 35483 : 35482; + + if(spellid && !HasAura(spellid,0) ) + CastSpell(this,spellid,true); + break; + } } } diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index eb23306b5b1..fec7a295ac8 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -305,7 +305,7 @@ enum AuraType SPELL_AURA_258 = 258, SPELL_AURA_259 = 259, SPELL_AURA_SCREEN_EFFECT = 260, - SPELL_AURA_261 = 261, + SPELL_AURA_PHASE = 261, SPELL_AURA_262 = 262, SPELL_AURA_ALLOW_ONLY_ABILITY = 263, SPELL_AURA_264 = 264, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8af4f59124f..718b07a2012 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -315,9 +315,9 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL &Aura::HandleNULL, //259 corrupt healing over time spell &Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code - &Aura::HandleNULL, //261 out of phase? + &Aura::HandlePhase, //261 SPELL_AURA_PHASE undetactable invisibility? implemented in Unit::isVisibleForOrDetect &Aura::HandleNULL, //262 - &Aura::HandleNULL, //263 SPELL_AURA_ALLOW_ONLY_ABILITY player can use only abilites set in SpellClassMask + &Aura::HandleNULL, //263 SPELL_AURA_ALLOW_ONLY_ABILITY player can use only abilities set in SpellClassMask &Aura::HandleNULL, //264 unused &Aura::HandleNULL, //265 unused &Aura::HandleNULL, //266 unused @@ -6547,3 +6547,24 @@ void Aura::HandleModCharm(bool apply, bool Real) else m_target->RemoveCharmedOrPossessedBy(caster); } + +void Aura::HandlePhase(bool apply, bool Real) +{ + // no-phase is also phase state so same code for apply and remove + + // phase auras normaly not expected at BG but anyway better check + if(Real && m_target->GetTypeId()==TYPEID_PLAYER) + { + // drop flag at invisible in bg + if(((Player*)m_target)->InBattleGround()) + if(BattleGround *bg = ((Player*)m_target)->GetBattleGround()) + bg->EventPlayerDroppedFlag((Player*)m_target); + } + + // apply/remove only if not in GM invisibility + if(m_target->GetVisibility()!=VISIBILITY_OFF) + { + // just need triggering visibility update base at aura presence + m_target->SetVisibility(m_target->GetVisibility()); + } +} diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 4cbb531ea6d..8d9f32f4fc2 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -211,6 +211,7 @@ class TRINITY_DLL_SPEC Aura void HandleAuraIncreaseBaseHealthPercent(bool Apply, bool Real); void HandleNoReagentUseAura(bool Apply, bool Real); void HandleModAttackerSpellHitChance(bool apply, bool Real); + void HandlePhase(bool Apply, bool Real); virtual ~Aura(); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 0e7fe1380f0..baf40d24350 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2587,6 +2587,10 @@ uint8 GetSpellAllowedInLocationError(SpellEntry const *spellInfo,uint32 map_id,u case 51721: // Dominion Over Acherus case 54055: // Dominion Over Acherus return area_id == 4281 || area_id == 4342 ? 0 : SPELL_FAILED_INCORRECT_AREA; + case 51852: // The Eye of Acherus + { + return map_id == 609 ? 0 : SPELL_FAILED_REQUIRES_AREA; + } case 54119: // Mist of the Kvaldir return area_id == 4028 || area_id == 4029 || area_id == 4106 || area_id == 4031 ? 0 : SPELL_FAILED_INCORRECT_AREA; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f2e3c0e71e0..3784904ebf4 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 "7194" + #define REVISION_NR "7195" #endif // __REVISION_NR_H__ |