*Allow to use ice block while affected by CC and fix compile warning.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-09 18:49:48 +02:00
parent 2b9d09255e
commit ba4e54f2f7
4 changed files with 10 additions and 10 deletions
@@ -267,7 +267,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
m_creature->RemoveAurasDueToSpell(AURA_BANISH); m_creature->RemoveAurasDueToSpell(AURA_BANISH);
// Leotheras is getting immune again // Leotheras is getting immune again
m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<(MECHANIC_BANISH-1), true); m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<MECHANIC_BANISH, true);
// changing model to bloodelf // changing model to bloodelf
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
@@ -288,7 +288,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
{ {
// channelers != 0 apply banish aura // channelers != 0 apply banish aura
// removing Leotheras banish immune to apply AURA_BANISH // removing Leotheras banish immune to apply AURA_BANISH
m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<(MECHANIC_BANISH-1), false); m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<MECHANIC_BANISH, false);
DoCast(m_creature, AURA_BANISH); DoCast(m_creature, AURA_BANISH);
// changing model // changing model
+1 -1
View File
@@ -4580,7 +4580,7 @@ SpellCastResult Spell::CheckCasterAuras() const
{ {
if( GetAllSpellMechanicMask(itr->second->GetSpellProto()) & mechanic_immune ) if( GetAllSpellMechanicMask(itr->second->GetSpellProto()) & mechanic_immune )
continue; continue;
if( GetAllSpellMechanicMask(itr->second->GetSpellProto()) & school_immune ) if( GetSpellSchoolMask(itr->second->GetSpellProto()) & school_immune )
continue; continue;
if( (1<<(itr->second->GetSpellProto()->Dispel)) & dispel_immune) if( (1<<(itr->second->GetSpellProto()->Dispel)) & dispel_immune)
continue; continue;
+5 -5
View File
@@ -3987,7 +3987,7 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
//Players on flying mounts must be immune to polymorph //Players on flying mounts must be immune to polymorph
if (m_target->GetTypeId()==TYPEID_PLAYER) 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) // Dragonmaw Illusion (overwrite mount model, mounted aura already applied)
if( apply && m_target->HasAuraEffect(42016,0) && m_target->GetMountID()) if( apply && m_target->HasAuraEffect(42016,0) && m_target->GetMountID())
@@ -4036,7 +4036,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real)
{ {
uint32 mechanic; uint32 mechanic;
if (GetSpellProto()->EffectApplyAuraName[GetEffIndex()]==SPELL_AURA_MECHANIC_IMMUNITY) if (GetSpellProto()->EffectApplyAuraName[GetEffIndex()]==SPELL_AURA_MECHANIC_IMMUNITY)
mechanic = 1 << (GetMiscValue()-1); mechanic = 1 << GetMiscValue();
else //SPELL_AURA_MECHANIC_IMMUNITY_MASK else //SPELL_AURA_MECHANIC_IMMUNITY_MASK
mechanic = GetMiscValue(); mechanic = GetMiscValue();
//immune movement impairment and loss of control //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. // Patch 3.0.3 Bladestorm now breaks all snares and roots on the warrior when activated.
// however not all mechanic specified in immunity // however not all mechanic specified in immunity
if (apply & GetId()==46924) if (apply && GetId()==46924)
{ {
RemoveAurasByType(SPELL_AURA_MOD_ROOT); m_target->RemoveAurasByType(SPELL_AURA_MOD_ROOT);
RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); m_target->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
} }
m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,mechanic,apply); m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,mechanic,apply);
+2 -2
View File
@@ -9137,7 +9137,7 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
for(SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) 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; return true;
} }
@@ -9170,7 +9170,7 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con
{ {
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) 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; return true;
} }