Make passive auras always visible when they've got some area effect.
--HG-- branch : trunk
This commit is contained in:
@@ -754,10 +754,7 @@ bool Aura::CanBeSaved() const
|
||||
|
||||
bool Aura::IsVisible() const
|
||||
{
|
||||
// Is this blizzlike? show totem passive auras
|
||||
if (GetOwner()->GetTypeId() == TYPEID_UNIT && m_owner->ToCreature()->isTotem() && IsPassive())
|
||||
return true;
|
||||
return !IsPassive() || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
return !IsPassive() || HasAreaAuraEffect(GetSpellProto()) || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
}
|
||||
|
||||
void Aura::UnregisterSingleTarget()
|
||||
|
||||
@@ -408,6 +408,14 @@ inline bool IsAreaAuraEffect(uint32 effect)
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool HasAreaAuraEffect(SpellEntry const *spellInfo)
|
||||
{
|
||||
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
|
||||
if (IsAreaAuraEffect(spellInfo->Effect[i]))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsUnitOwnedAuraEffect(uint32 effect)
|
||||
{
|
||||
return (IsAreaAuraEffect(effect) || effect == SPELL_EFFECT_APPLY_AURA);
|
||||
|
||||
Reference in New Issue
Block a user