Make passive auras always visible when they've got some area effect.

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-07-21 01:22:52 +02:00
parent c9860e3b9f
commit a71d11149f
2 changed files with 9 additions and 4 deletions
+1 -4
View File
@@ -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()
+8
View File
@@ -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);