Fix for some combat log errors.

Only Vanish and Invisibility auras will now prevent from taking damage if target is not visible for caster.

--HG--
branch : trunk
This commit is contained in:
krz committed 2009-06-02 20:59:13 +02:00
1 parent 16e0e9931e
commit a29847bf84
3 files changed
+18 -3

No files matched your search

+11
View File
@@ -616,6 +616,17 @@ bool Unit::HasAuraType(AuraType auraType) const
return (!m_modAuras[auraType].empty());
}
bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName ,uint64 familyFlags) const
{
if(!HasAuraType(auraType)) return false;
AuraList const &auras = GetAurasByType(auraType);
for(AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
if(SpellEntry const *iterSpellProto = (*itr)->GetSpellProto())
if(iterSpellProto->SpellFamilyName == familyName && iterSpellProto->SpellFamilyFlags & familyFlags)
return true;
return false;
}
/* Called by DealDamage for auras that have a chance to be dispelled on damage taken. */
void Unit::RemoveSpellbyDamageTaken(uint32 damage, uint32 spell)
{