Core/Spells: Bladestorm will now cause the caster to drop flag on battleground

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-09-05 15:25:33 +02:00
parent 77130c910f
commit 43e4e1f786

View File

@@ -4321,19 +4321,18 @@ void AuraEffect::HandleModStateImmunityMask(AuraApplication const * aurApp, uint
immunity_list.pop_back(); // delete Disarm
target->RemoveAurasByType(SPELL_AURA_MOD_ROOT);
target->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
// also drop flag
if (Player* player = target->ToPlayer())
if (Battleground* bg = player->GetBattleground())
bg->EventPlayerDroppedFlag(player);
}
if (apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
{
for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end(); ++iter)
{
target->RemoveAurasByType(*iter);
}
}
for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end(); ++iter)
{
target->ApplySpellImmune(GetId(),IMMUNITY_STATE,*iter, apply);
}
target->ApplySpellImmune(GetId(), IMMUNITY_STATE, *iter, apply);
}
void AuraEffect::HandleModMechanicImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const