diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-10-03 19:58:03 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-10-03 19:58:03 +0200 |
| commit | cbf1f2883ad1bc611f08af4838d892bf13057490 (patch) | |
| tree | 98bf2a96df0e362b798986166d5625d5d979154b /src/server/scripts/Northrend | |
| parent | 555b2d40ecc22eb0ea4bf913b534ffa7197fa6fe (diff) | |
Core/Spells: Reduce number of CastSpell overloads to 1
Diffstat (limited to 'src/server/scripts/Northrend')
3 files changed, 4 insertions, 6 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index a81c1c3e7e4..2018c5c68dc 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -784,12 +784,10 @@ class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader uint32 triggered_spell_id = GetEffectInfo().TriggerSpell; - float x, y, z; - GetExplTargetDest()->GetPosition(x, y, z); // let Rotface handle the cast - caster dies before this executes if (InstanceScript* script = GetCaster()->GetInstanceScript()) if (Creature* rotface = script->instance->GetCreature(script->GetGuidData(DATA_ROTFACE))) - rotface->CastSpell({x, y, z}, triggered_spell_id, CastSpellExtraArgs(TRIGGERED_FULL_MASK) + rotface->CastSpell(*GetExplTargetDest(), triggered_spell_id, CastSpellExtraArgs(TRIGGERED_FULL_MASK) .SetOriginalCaster(GetCaster()->GetGUID())); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index a1844f131c5..a37248359ab 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -527,7 +527,7 @@ class boss_sindragosa : public CreatureScript destY = float(rand_norm()) * 75.0f + 2450.0f; destZ = 205.0f; // random number close to ground, get exact in next call me->UpdateGroundPositionZ(destX, destY, destZ); - me->CastSpell({ destX, destY, destZ }, SPELL_FROST_BOMB_TRIGGER, false); + me->CastSpell(Position{ destX, destY, destZ }, SPELL_FROST_BOMB_TRIGGER, false); events.ScheduleEvent(EVENT_FROST_BOMB, urand(6000, 8000)); break; } diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index f83c55b201c..5183eacd29d 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -97,7 +97,7 @@ public: break; case 1: Talk(SAY_WP_3); - me->CastSpell({ 5918.33f, 5372.91f, -98.770f }, SPELL_EXPLODE_CRYSTAL, true); + me->CastSpell(Position{ 5918.33f, 5372.91f, -98.770f }, SPELL_EXPLODE_CRYSTAL, true); me->SummonGameObject(184743, 5918.33f, 5372.91f, -98.770f, 0, QuaternionData(), TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; @@ -108,7 +108,7 @@ public: Talk(SAY_WP_5); break; case 8: - me->CastSpell({ 5887.37f, 5379.39f, -91.289f }, SPELL_EXPLODE_CRYSTAL, true); + me->CastSpell(Position{ 5887.37f, 5379.39f, -91.289f }, SPELL_EXPLODE_CRYSTAL, true); me->SummonGameObject(184743, 5887.37f, 5379.39f, -91.289f, 0, QuaternionData(), TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; |
