diff options
| author | QAston <none@none> | 2009-04-09 18:49:48 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-04-09 18:49:48 +0200 |
| commit | ba4e54f2f7d411eb60c8927e358d2835019a657a (patch) | |
| tree | 470d1233b882ff79e657b9dc6d7ffab627543d16 /src/game | |
| parent | 2b9d09255ea80ae1fbf345368d24128318ed3a0f (diff) | |
*Allow to use ice block while affected by CC and fix compile warning.
--HG--
branch : trunk
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/Spell.cpp | 2 | ||||
| -rw-r--r-- | src/game/SpellAuras.cpp | 10 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index e6b7499f813..a2c6ae6dfee 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4580,7 +4580,7 @@ SpellCastResult Spell::CheckCasterAuras() const { if( GetAllSpellMechanicMask(itr->second->GetSpellProto()) & mechanic_immune ) continue; - if( GetAllSpellMechanicMask(itr->second->GetSpellProto()) & school_immune ) + if( GetSpellSchoolMask(itr->second->GetSpellProto()) & school_immune ) continue; if( (1<<(itr->second->GetSpellProto()->Dispel)) & dispel_immune) continue; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 247a72a30a4..c4857fc9ccf 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3987,7 +3987,7 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real) //Players on flying mounts must be immune to polymorph if (m_target->GetTypeId()==TYPEID_PLAYER) - m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,1<<(MECHANIC_POLYMORPH-1),apply); + m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,1<<MECHANIC_POLYMORPH,apply); // Dragonmaw Illusion (overwrite mount model, mounted aura already applied) if( apply && m_target->HasAuraEffect(42016,0) && m_target->GetMountID()) @@ -4036,7 +4036,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real) { uint32 mechanic; if (GetSpellProto()->EffectApplyAuraName[GetEffIndex()]==SPELL_AURA_MECHANIC_IMMUNITY) - mechanic = 1 << (GetMiscValue()-1); + mechanic = 1 << GetMiscValue(); else //SPELL_AURA_MECHANIC_IMMUNITY_MASK mechanic = GetMiscValue(); //immune movement impairment and loss of control @@ -4067,10 +4067,10 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real) // Patch 3.0.3 Bladestorm now breaks all snares and roots on the warrior when activated. // however not all mechanic specified in immunity - if (apply & GetId()==46924) + if (apply && GetId()==46924) { - RemoveAurasByType(SPELL_AURA_MOD_ROOT); - RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); + m_target->RemoveAurasByType(SPELL_AURA_MOD_ROOT); + m_target->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); } m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,mechanic,apply); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 46c93c97ccb..eb5bd306511 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9137,7 +9137,7 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo) SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for(SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) { - if(itr->type & (1<<(spellInfo->Mechanic-1))) + if(itr->type & (1<<spellInfo->Mechanic)) { return true; } @@ -9170,7 +9170,7 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con { SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) - if(itr->type & 1<<(spellInfo->EffectMechanic[index]-1)) + if(itr->type & 1<<(spellInfo->EffectMechanic[index])) return true; } |
