aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRat <gmstreetrat@gmail.com>2014-12-19 20:47:01 +0100
committerRat <gmstreetrat@gmail.com>2014-12-19 20:47:01 +0100
commit9fefd963b3278fbdfe87d8c564551febe33b9d59 (patch)
treee8c66ec6a62066bb512b2f250297317a2eced6d8 /src
parent085df6d9872e6453ac5080a82686d4195188bd14 (diff)
Core/Spells: fixed build and SelectEffectImplicitTargets logic
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp27
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp2
2 files changed, 16 insertions, 13 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index b3257ca0673..d8df74cbd15 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -929,20 +929,23 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
// targets for effect already selected
if (effectMask & processedEffectMask)
return;
- // choose which targets we can select at once
- for (SpellEffectInfo const* effect : GetEffects())
+ if (SpellEffectInfo const* _effect = GetEffect(effIndex))
{
- //for (uint32 j = effIndex + 1; j < MAX_SPELL_EFFECTS; ++j)
- if (!effect || effect->EffectIndex <= uint32(effIndex))
- continue;
- if (effect->IsEffect() &&
- effect->TargetA.GetTarget() == effect->TargetA.GetTarget() &&
- effect->TargetB.GetTarget() == effect->TargetB.GetTarget() &&
- effect->ImplicitTargetConditions == effect->ImplicitTargetConditions &&
- effect->CalcRadius(m_caster) == effect->CalcRadius(m_caster) &&
- CheckScriptEffectImplicitTargets(effIndex, effect->EffectIndex))
+ // choose which targets we can select at once
+ for (SpellEffectInfo const* effect : GetEffects())
{
- effectMask |= 1 << effect->EffectIndex;
+ //for (uint32 j = effIndex + 1; j < MAX_SPELL_EFFECTS; ++j)
+ if (!effect || effect->EffectIndex <= uint32(effIndex))
+ continue;
+ if (effect->IsEffect() &&
+ _effect->TargetA.GetTarget() == effect->TargetA.GetTarget() &&
+ _effect->TargetB.GetTarget() == effect->TargetB.GetTarget() &&
+ _effect->ImplicitTargetConditions == effect->ImplicitTargetConditions &&
+ _effect->CalcRadius(m_caster) == effect->CalcRadius(m_caster) &&
+ CheckScriptEffectImplicitTargets(effIndex, effect->EffectIndex))
+ {
+ effectMask |= 1 << effect->EffectIndex;
+ }
}
}
processedEffectMask |= effectMask;
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
index 8c7d0c2797f..86a19d16efb 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
@@ -155,7 +155,7 @@ public:
Talk(SAY_NOVA);
Talk(EMOTE_NOVA);
DoCastAOE(SPELL_LIGHTNING_NOVA);
- me->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_PULSING_SHOCKWAVE, me));
+ me->RemoveAurasDueToSpell(SPELL_PULSING_SHOCKWAVE);
events.ScheduleEvent(EVENT_RESUME_PULSING_SHOCKWAVE, DUNGEON_MODE(5000, 4000)); // Pause Pulsing Shockwave aura
events.ScheduleEvent(EVENT_LIGHTNING_NOVA, urand(20000, 21000));
break;