aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellAuras.cpp45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 0cf768d8f51..00c55e1c9b5 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -878,34 +878,33 @@ void Aura::_AddAura()
else
sLog.outDebug("Aura: %u Effect: %d could not find empty unit visible slot",GetId(), GetEffIndex());
- if(secondaura)
- return;
+ if(!secondaura)
+ {
+ // Sitdown on apply aura req seated
+ if (m_spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED && !m_target->IsSitState())
+ m_target->SetStandState(UNIT_STAND_STATE_SIT);
+
+ // register aura diminishing on apply
+ if (getDiminishGroup() != DIMINISHING_NONE )
+ m_target->ApplyDiminishingAura(getDiminishGroup(),true);
+
+ // Apply linked auras (On first aura apply)
+ uint32 id = GetId();
+ if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
+ {
+ if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
+ for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
+ if(*itr < 0)
+ m_target->ApplySpellImmune(id, IMMUNITY_ID, *itr, m_target);
+ else if(Unit* caster = GetCaster())
+ m_target->AddAura(*itr, m_target);
+ }
+ }
//*****************************************************
// Update target aura state flag
- // TODO: Make it easer
//*****************************************************
- // Sitdown on apply aura req seated
- if (m_spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED && !m_target->IsSitState())
- m_target->SetStandState(UNIT_STAND_STATE_SIT);
-
- // register aura diminishing on apply
- if (getDiminishGroup() != DIMINISHING_NONE )
- m_target->ApplyDiminishingAura(getDiminishGroup(),true);
-
- // Apply linked auras (On first aura apply)
- uint32 id = GetId();
- if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
- {
- if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
- for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
- if(*itr < 0)
- m_target->ApplySpellImmune(id, IMMUNITY_ID, *itr, m_target);
- else if(Unit* caster = GetCaster())
- m_target->AddAura(*itr, m_target);
- }
-
// Update Seals information
if (IsSealSpell(m_spellProto))
SetAuraState(AURA_STATE_JUDGEMENT);