diff options
Diffstat (limited to 'src/server/scripts')
6 files changed, 9 insertions, 11 deletions
diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp index 1e4910bd75a..8b0729a9701 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -142,7 +142,7 @@ public: float x, y, z; handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, dist); - handler->GetSession()->GetPlayer()->CastSpell({ x, y, z }, spell->Id, *triggerFlags); + handler->GetSession()->GetPlayer()->CastSpell(Position{ x, y, z }, spell->Id, *triggerFlags); return true; } @@ -215,7 +215,7 @@ public: if (!triggerFlags) return false; - caster->CastSpell({ x, y, z }, spell->Id, *triggerFlags); + caster->CastSpell(Position{ x, y, z }, spell->Id, *triggerFlags); return true; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 7025555e253..f607c7faeb8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -1379,7 +1379,7 @@ public: { if (StrikeTimer <= diff) { - me->CastSpell({ DummyTarget[0], DummyTarget[1], DummyTarget[2] }, SPELL_GARGOYLE_STRIKE, false); + me->CastSpell(Position{ DummyTarget[0], DummyTarget[1], DummyTarget[2] }, SPELL_GARGOYLE_STRIKE, false); StrikeTimer = 2000 + rand32() % 1000; } else StrikeTimer -= diff; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h index a4ead46b8a4..00ae53d5308 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +struct Position; + #define DataHeader "CS" #define CoSScriptName "instance_culling_of_stratholme" @@ -83,8 +85,6 @@ uint32 constexpr EncounterCount = 5; * - gets current instance state using GetData, then checks if we should despawn ourselves (bitmask check) * \***********************************************************************************************************************/ -struct Position; - // Note: These are bitmask values to allow combining, but only a single bit will ever be true in instance script enum COSProgressStates : uint32 { diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 916b1b98756..e012dfd4e82 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -507,7 +507,7 @@ public: DoCast(player, SPELL_ARCANE_CHANNELING, true);//Arcane Channeling break; case 35: - me->CastSpell({ -8088, 1520.43f, 2.67f }, SPELL_TIME_STOP, true); + me->CastSpell(Position(-8088, 1520.43f, 2.67f), SPELL_TIME_STOP, true); break; case 36: DoCast(player, SPELL_CALL_PRISMATIC_BARRIER, true); @@ -557,7 +557,7 @@ public: break; case 50: Fandral->AI()->Talk(FANDRAL_EMOTE_2); - Fandral->CastSpell({ -8127, 1525, 17.5f }, SPELL_THROW_HAMMER, true); + Fandral->CastSpell(Position(-8127, 1525, 17.5f), SPELL_THROW_HAMMER, true); break; case 51: { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index 6b2ea29b217..4942b608875 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -682,12 +682,10 @@ class spell_rotface_unstable_ooze_explosion : public SpellScript 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, GetCaster()->GetGUID()); + rotface->CastSpell(*GetExplTargetDest(), triggered_spell_id, GetCaster()->GetGUID()); } void Register() override diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 3153a91f7b9..496f85ea76f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -525,7 +525,7 @@ struct boss_sindragosa : public BossAI 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, 6s, 8s); break; } |
