[11973] Various Cleanups

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
stfx 2012-04-22 19:41:24 +02:00 committed by Schmoozerd
parent c243c42c3c
commit f3f3349661
50 changed files with 153 additions and 134 deletions

View file

@ -761,7 +761,7 @@ void AreaAura::Update(uint32 diff)
// or caster is (no longer) friendly
bool needFriendly = (m_areaAuraType == AREA_AURA_ENEMY ? false : true);
if( !caster || caster->hasUnitState(UNIT_STAT_ISOLATED) ||
!caster->IsWithinDistInMap(target, m_radius) ||
!caster->IsWithinDistInMap(target, m_radius) ||
!caster->HasAura(GetId(), GetEffIndex()) ||
caster->IsFriendlyTo(target) != needFriendly
)
@ -1047,6 +1047,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
entry->EffectSpellClassMask[GetEffIndex()].Flags = UI64LIT(0x0000000000200000);
}
}
((Player*)GetTarget())->AddSpellMod(this, apply);
ReapplyAffectedPassiveAuras();
@ -3067,6 +3068,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
break;
case SPELLFAMILY_HUNTER:
{
switch(GetId())
{
case 34477: // Misdirection, main spell
@ -3083,6 +3085,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
}
break;
}
case SPELLFAMILY_PALADIN:
switch(GetId())
{
@ -4935,7 +4938,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
if(!Real)
return;
Unit *target = GetTarget();
Unit* target = GetTarget();
if (apply)
{
@ -5437,10 +5440,10 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
// Rip
if (spellProto->SpellFamilyFlags & UI64LIT(0x000000000000800000))
{
// 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER)
break;
// 0.01*$AP*cp
uint8 cp = ((Player*)caster)->GetComboPoints();
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
@ -8865,7 +8868,8 @@ void SpellAuraHolder::_RemoveSpellAuraHolder()
break;
}
}
// this was last holder
// this has been last aura
if(!found)
m_target->ModifyAuraState(AuraState(removeState), false);
}