[11144] Prevents abilities that are 'usable while stunned' being usable while in non-stun effects. The usability while stunned is restricted only to stun auras with mechanic stun

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
darkstalker 2011-02-12 15:59:09 +02:00 committed by Ambal
parent 01e4f25888
commit 3d4caa275b
4 changed files with 29 additions and 4 deletions

View file

@ -8180,6 +8180,12 @@ bool Aura::IsLastAuraOnHolder()
return true;
}
bool Aura::HasMechanic(uint32 mechanic) const
{
return GetSpellProto()->Mechanic == mechanic ||
GetSpellProto()->EffectMechanic[m_effIndex] == mechanic;
}
SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, WorldObject *caster, Item *castItem) :
m_target(target), m_castItemGuid(castItem ? castItem->GetObjectGuid() : ObjectGuid()),
m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0),