aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-03-22 10:53:23 +0100
committerQAston <none@none>2009-03-22 10:53:23 +0100
commitf487cec64535e617344e6386ab3ac66d5ebfc65b (patch)
tree029b6b0be38c2e98c9dcb6891471e09391323067 /src
parent328ecda864b60f5ecef0f9273dc761a52763c505 (diff)
*Fix aurastate bug.
--HG-- branch : trunk
Diffstat (limited to 'src')
-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);