aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsirikfoll <sirikfoll@hotmail.com>2018-02-05 21:14:26 -0200
committerShauren <shauren.trinity@gmail.com>2021-06-19 23:33:24 +0200
commite2c72cc02ee31954f570dc6651b193bc060581da (patch)
tree0e0ae2ef6137df7b227cb8977bf7cb1d60dccf6a /src
parent8c379e920ca184d520c81ada26c42c5dfeac770d (diff)
Scripts/Sunwell Plateau: Fixed and improved spell "Curse of Boundless Agony" target selection (Boss Kalecgos)
(cherry picked from commit 14b6e3bbb36e4b5ec5212ed2a3bf5eb0012e095f)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 32fbc1cf83e..ef29d76972b 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -439,8 +439,9 @@ public:
{
if (Unit* unitTarget = target->ToUnit())
return !NonTankTargetSelector::operator()(unitTarget)
- || unitTarget->HasAura(SPELL_AGONY_CURSE) || unitTarget->HasAura(SPELL_AGONY_CURSE_ALLY)
- || !unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
+ && !unitTarget->HasAura(SPELL_AGONY_CURSE)
+ && !unitTarget->HasAura(SPELL_AGONY_CURSE_ALLY)
+ && unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
return false;
}
};
@@ -519,10 +520,12 @@ struct boss_sathrovarr : public BossAI
break;
case EVENT_AGONY_CURSE:
{
+ CastSpellExtraArgs args(TRIGGERED_FULL_MASK);
+ args.AddSpellMod(SPELLVALUE_MAX_TARGETS, 1);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, CurseAgonySelector(me)))
- DoCast(target, SPELL_AGONY_CURSE);
+ DoCast(target, SPELL_AGONY_CURSE, args);
else
- DoCastVictim(SPELL_AGONY_CURSE);
+ DoCastVictim(SPELL_AGONY_CURSE, args);
events.Repeat(Seconds(20));
break;
}
@@ -622,8 +625,9 @@ class SpectralBlastSelector : NonTankTargetSelector
bool operator()(WorldObject* target) const
{
if (Unit* unitTarget = target->ToUnit())
- return !NonTankTargetSelector::operator()(unitTarget) ||
- unitTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION) || unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
+ return !NonTankTargetSelector::operator()(unitTarget)
+ && !unitTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION)
+ && !unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
return false;
}
};
@@ -768,8 +772,12 @@ class spell_kalecgos_curse_of_boundless_agony : public AuraScript
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_CANCEL)
- GetTarget()->CastSpell(GetTarget(), SPELL_AGONY_CURSE_ALLY, true);
+ if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_CANCEL)
+ return;
+
+ CastSpellExtraArgs args(TRIGGERED_FULL_MASK);
+ args.AddSpellMod(SPELLVALUE_MAX_TARGETS, 1);
+ GetTarget()->CastSpell(GetTarget(), SPELL_AGONY_CURSE_ALLY, args);
}
void Register() override