*Do not apply auras with 4th diminishing level

*Some fixes related to last commit.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-05-01 17:21:16 +02:00
parent 0f5a9cb46f
commit a098dc72fc
6 changed files with 79 additions and 84 deletions

View File

@@ -3259,7 +3259,7 @@ void Unit::_UpdateSpells( uint32 time )
for(AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end();)
{
if(!i->second->GetAuraDuration() && !(i->second->IsPermanent() || (i->second->IsPassive())))
if(i->second->IsExpired())
RemoveAura(i, AURA_REMOVE_BY_EXPIRE);
else
++i;
@@ -3673,7 +3673,7 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
bool Unit::AddAura(Aura *Aur)
{
// aura doesn't apply effects-return
if (!Aur->GetEffectMask())
if (!Aur->GetEffectMask() || Aur->IsExpired())
{
delete Aur;
return false;