aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp5
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp3
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp61
-rw-r--r--src/server/scripts/Spells/spell_monk.cpp110
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp28
6 files changed, 9 insertions, 200 deletions
diff --git a/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp b/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
index 01f7c3ab097..3910789805a 100644
--- a/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
+++ b/src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
@@ -179,8 +179,9 @@ class npc_harbinger_of_flame : public CreatureScript
void EnterCombat(Unit* /*target*/) override
{
- if (Creature* bird = ObjectAccessor::GetCreature(*me, me->GetChannelObjectGuid()))
- DoZoneInCombat(bird, 200.0f);
+ for (ObjectGuid const& birdGuid : me->GetChannelObjects())
+ if (Creature* bird = ObjectAccessor::GetCreature(*me, birdGuid))
+ DoZoneInCombat(bird, 200.0f);
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
_events.Reset();
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 81bbcec913e..ee7ebaad976 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1734,7 +1734,8 @@ class spell_halion_twilight_cutter : public SpellScriptLoader
return;
Unit* caster = GetCaster();
- if (Unit* channelTarget = ObjectAccessor::GetUnit(*caster, caster->GetChannelObjectGuid()))
+ DynamicFieldStructuredView<ObjectGuid> channelObjects = caster->GetChannelObjects();
+ if (Unit* channelTarget = (channelObjects.size() == 1 ? ObjectAccessor::GetUnit(*caster, *channelObjects.begin()) : nullptr))
{
unitList.remove_if(TwilightCutterSelector(caster, channelTarget));
return;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 82182418752..5ccb7431db6 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -1104,7 +1104,7 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
uint32 damage = (uint32(GetEffectValue() / _targetCount) * randomResist) / 10;
- SpellNonMeleeDamage damageInfo(GetCaster(), GetHitUnit(), GetSpellInfo()->Id, GetSpellInfo()->SchoolMask);
+ SpellNonMeleeDamage damageInfo(GetCaster(), GetHitUnit(), GetSpellInfo()->Id, GetSpell()->m_SpellVisual, GetSpellInfo()->SchoolMask);
damageInfo.damage = damage;
GetCaster()->DealSpellDamage(&damageInfo, false);
GetCaster()->SendSpellNonMeleeDamageLog(&damageInfo);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index cb40e167bd7..b15c3a66fd0 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -1040,7 +1040,8 @@ class boss_vx_001 : public CreatureScript
// Handle rotation during SPELL_SPINNING_UP, SPELL_P3WX2_LASER_BARRAGE, SPELL_RAPID_BURST, and SPELL_HAND_PULSE_LEFT/RIGHT
if (me->HasUnitState(UNIT_STATE_CASTING))
{
- if (Creature* channelTarget = ObjectAccessor::GetCreature(*me, me->GetChannelObjectGuid()))
+ DynamicFieldStructuredView<ObjectGuid> channelObjects = me->GetChannelObjects();
+ if (Unit* channelTarget = (channelObjects.size() == 1 ? ObjectAccessor::GetUnit(*me, *channelObjects.begin()) : nullptr))
me->SetFacingToObject(channelTarget);
return;
}
@@ -1963,33 +1964,6 @@ class spell_mimiron_napalm_shell : public SpellScriptLoader
}
};
-// 63274 - P3Wx2 Laser Barrage -- HACK! Core will currently not set UNIT_FIELD_CHANNEL_OBJECT automatially if the spell targets more than a single target.
-class spell_mimiron_p3wx2_laser_barrage : public SpellScriptLoader
-{
- public:
- spell_mimiron_p3wx2_laser_barrage() : SpellScriptLoader("spell_mimiron_p3wx2_laser_barrage") { }
-
- class spell_mimiron_p3wx2_laser_barrage_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_mimiron_p3wx2_laser_barrage_SpellScript);
-
- void OnHit(SpellEffIndex /*effIndex*/)
- {
- GetCaster()->SetChannelObjectGuid(GetHitUnit()->GetGUID());
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_mimiron_p3wx2_laser_barrage_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_mimiron_p3wx2_laser_barrage_SpellScript();
- }
-};
-
// 64542 - Plasma Blast
class spell_mimiron_plasma_blast : public SpellScriptLoader
{
@@ -2365,35 +2339,6 @@ class spell_mimiron_self_repair : public SpellScriptLoader
}
};
-// 63414 - Spinning Up -- HACK! Core will currently not set UNIT_FIELD_CHANNEL_OBJECT automatially if the spell targets more than a single target.
-// eff0 will hit both caster and target due to hack in spellmgr.cpp, it is necessary because caster will interrupt itself if aura is not active on caster.
-class spell_mimiron_spinning_up : public SpellScriptLoader
-{
- public:
- spell_mimiron_spinning_up() : SpellScriptLoader("spell_mimiron_spinning_up") { }
-
- class spell_mimiron_spinning_up_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_mimiron_spinning_up_SpellScript);
-
- void OnHit(SpellEffIndex /*effIndex*/)
- {
- if (GetHitUnit() != GetCaster())
- GetCaster()->SetChannelObjectGuid(GetHitUnit()->GetGUID());
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_mimiron_spinning_up_SpellScript::OnHit, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_mimiron_spinning_up_SpellScript();
- }
-};
-
// 64426 - Summon Scrap Bot
class spell_mimiron_summon_assault_bot : public SpellScriptLoader
{
@@ -2832,7 +2777,6 @@ void AddSC_boss_mimiron()
new spell_mimiron_fire_search();
new spell_mimiron_magnetic_core();
new spell_mimiron_napalm_shell();
- new spell_mimiron_p3wx2_laser_barrage();
new spell_mimiron_plasma_blast();
new spell_mimiron_proximity_explosion();
new spell_mimiron_proximity_mines();
@@ -2842,7 +2786,6 @@ void AddSC_boss_mimiron()
new spell_mimiron_rocket_strike_damage();
new spell_mimiron_rocket_strike_target_select();
new spell_mimiron_self_repair();
- new spell_mimiron_spinning_up();
new spell_mimiron_summon_assault_bot();
new spell_mimiron_summon_assault_bot_target();
new spell_mimiron_summon_fire_bot();
diff --git a/src/server/scripts/Spells/spell_monk.cpp b/src/server/scripts/Spells/spell_monk.cpp
index aee2db42146..0d9e6ad3f3d 100644
--- a/src/server/scripts/Spells/spell_monk.cpp
+++ b/src/server/scripts/Spells/spell_monk.cpp
@@ -99,7 +99,7 @@ public:
if (GetTarget()->HasAura(SPELL_MONK_CRACKLING_JADE_LIGHTNING_KNOCKBACK_CD))
return false;
- if (eventInfo.GetActor()->GetGUID() != GetTarget()->GetChannelObjectGuid())
+ if (eventInfo.GetActor()->HasAura(SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHANNEL, GetTarget()->GetGUID()))
return false;
Spell* currentChanneledSpell = GetTarget()->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
@@ -188,117 +188,9 @@ public:
}
};
-// 116694 - Surging Mist
-class spell_monk_surging_mist : public SpellScriptLoader
-{
- public:
- spell_monk_surging_mist() : SpellScriptLoader("spell_monk_surging_mist") { }
-
- class spell_monk_surging_mist_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_monk_surging_mist_SpellScript);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SURGING_MIST_HEAL))
- return false;
- return true;
- }
-
- void SelectTarget(WorldObject*& target)
- {
- Unit* caster = GetCaster();
- if (caster->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MONK_SOOTHING_MIST)
- if (Unit* soothingMistTarget = ObjectAccessor::GetUnit(*caster, caster->GetChannelObjectGuid()))
- target = soothingMistTarget;
- }
-
- void HandleDummy(SpellEffIndex effIndex)
- {
- PreventHitDefaultEffect(effIndex);
- GetCaster()->CastSpell(GetHitUnit(), SPELL_MONK_SURGING_MIST_HEAL, true);
- }
-
- void Register() override
- {
- OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_monk_surging_mist_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_TARGET_ALLY);
- OnEffectHitTarget += SpellEffectFn(spell_monk_surging_mist_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_monk_surging_mist_SpellScript();
- }
-};
-
-// 123273 - Surging Mist (Glyphed)
-class spell_monk_surging_mist_glyphed : public SpellScriptLoader
-{
-public:
- spell_monk_surging_mist_glyphed() : SpellScriptLoader("spell_monk_surging_mist_glyphed") { }
-
- class spell_monk_surging_mist_glyphed_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_monk_surging_mist_glyphed_SpellScript);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SURGING_MIST_HEAL))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SOOTHING_MIST))
- return false;
- return true;
- }
-
- void SelectTarget(std::list<WorldObject*>& targets)
- {
- Unit* caster = GetCaster();
- if (caster->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MONK_SOOTHING_MIST)
- {
- targets.clear();
- if (Unit* soothingMistTarget = ObjectAccessor::GetUnit(*caster, caster->GetChannelObjectGuid()))
- targets.push_back(soothingMistTarget);
- }
- else
- {
- targets.remove_if([caster](WorldObject* target)
- {
- return target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsInRaidWith(caster);
- });
- targets.sort(Trinity::HealthPctOrderPred());
- if (!targets.empty())
- targets.resize(1);
- }
-
- if (targets.empty())
- targets.push_back(caster);
- }
-
- void HandleDummy(SpellEffIndex effIndex)
- {
- PreventHitDefaultEffect(effIndex);
- GetCaster()->CastSpell(GetHitUnit(), SPELL_MONK_SURGING_MIST_HEAL, true);
- }
-
- void Register() override
- {
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_monk_surging_mist_glyphed_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
- OnEffectHitTarget += SpellEffectFn(spell_monk_surging_mist_glyphed_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_monk_surging_mist_glyphed_SpellScript();
- }
-};
-
void AddSC_monk_spell_scripts()
{
new spell_monk_crackling_jade_lightning();
new spell_monk_crackling_jade_lightning_knockback_proc_aura();
new spell_monk_provoke();
- new spell_monk_surging_mist();
- new spell_monk_surging_mist_glyphed();
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index e6c1eb43b2f..a815f8d893b 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -748,33 +748,6 @@ class spell_pri_mana_leech : public SpellScriptLoader
}
};
-// 49821 - Mind Sear
-class spell_pri_mind_sear : public SpellScriptLoader
-{
- public:
- spell_pri_mind_sear() : SpellScriptLoader("spell_pri_mind_sear") { }
-
- class spell_pri_mind_sear_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pri_mind_sear_SpellScript);
-
- void FilterTargets(std::list<WorldObject*>& unitList)
- {
- unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetChannelObjectGuid()));
- }
-
- void Register() override
- {
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_pri_mind_sear_SpellScript();
- }
-};
-
// 47948 - Pain and Suffering (Proc)
class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
{
@@ -1309,7 +1282,6 @@ void AddSC_priest_spell_scripts()
new spell_pri_lightwell_renew();
new spell_pri_mana_burn();
new spell_pri_mana_leech();
- new spell_pri_mind_sear();
new spell_pri_pain_and_suffering_proc();
new spell_pri_penance();
new spell_pri_phantasm();