aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp2
-rw-r--r--src/server/scripts/Commands/cs_cast.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp4
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp10
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp4
10 files changed, 16 insertions, 26 deletions
diff --git a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
index e0603d9880c..525879f6cc7 100644
--- a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
+++ b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
@@ -870,7 +870,7 @@ class spell_garothi_cannon_chooser : public SpellScript
float x = AnnihilationCenterReferencePos.GetPositionX() + cos(frand(0.0f, float(M_PI * 2))) * frand(15.0f, 30.0f);
float y = AnnihilationCenterReferencePos.GetPositionY() + sin(frand(0.0f, float(M_PI * 2))) * frand(15.0f, 30.0f);
float z = caster->GetMap()->GetHeight(caster->GetPhaseShift(), x, y, AnnihilationCenterReferencePos.GetPositionZ());
- annihilator->CastSpell({ x, y, z }, SPELL_ANNIHILATION_SUMMON, true);
+ annihilator->CastSpell(Position{ x, y, z }, SPELL_ANNIHILATION_SUMMON, true);
}
annihilator->CastSpell(annihilator, SPELL_ANNIHILATION_DUMMY);
diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp
index e0f4708e945..a444d31f37a 100644
--- a/src/server/scripts/Commands/cs_cast.cpp
+++ b/src/server/scripts/Commands/cs_cast.cpp
@@ -171,7 +171,7 @@ public:
TriggerCastFlags triggered = (triggeredStr != nullptr) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
float x, y, z;
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, dist);
- handler->GetSession()->GetPlayer()->CastSpell({ x, y, z }, spellId, triggered);
+ handler->GetSession()->GetPlayer()->CastSpell(Position{ x, y, z }, spellId, triggered);
return true;
}
@@ -260,9 +260,7 @@ public:
if (!posX || !posY || !posZ)
return false;
- float x = float(atof(posX));
- float y = float(atof(posY));
- float z = float(atof(posZ));
+ Position dest(atof(posX), atof(posY), atof(posZ));
char* triggeredStr = strtok(nullptr, " ");
if (triggeredStr)
@@ -273,7 +271,7 @@ public:
}
TriggerCastFlags triggered = (triggeredStr != nullptr) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
- caster->CastSpell({ x, y, z }, spellId, triggered);
+ caster->CastSpell(dest, spellId, triggered);
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 89b872eb9cf..d5eb92d90e4 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -608,7 +608,7 @@ class spell_mandokir_devastating_slam : public SpellScriptLoader
angle = float(rand_norm()) * static_cast<float>(M_PI * 35.0f / 180.0f) - static_cast<float>(M_PI * 17.5f / 180.0f);
caster->GetClosePoint(x, y, z, 4.0f, frand(-2.5f, 50.0f), angle);
- caster->CastSpell({ x, y, z }, SPELL_DEVASTATING_SLAM_DAMAGE, true);
+ caster->CastSpell(Position{ x, y, z }, SPELL_DEVASTATING_SLAM_DAMAGE, true);
}
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index 72fa7dcf141..c7cd8ca05c9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -1339,7 +1339,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/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 16398d42ee3..64d2180a601 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -503,7 +503,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);
@@ -553,7 +553,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 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;
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 6828dc65933..6726636125f 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -497,7 +497,7 @@ class spell_pri_leap_of_faith_effect_trigger : public SpellScriptLoader
SpellCastTargets targets;
targets.SetDst(destPos);
targets.SetUnitTarget(GetCaster());
- GetHitUnit()->CastSpell(targets, GetEffectValue(), GetCastDifficulty());
+ GetHitUnit()->CastSpell(std::move(targets), GetEffectValue(), GetCastDifficulty());
}
void Register() override
@@ -856,9 +856,7 @@ class spell_pri_prayer_of_mending_aura : public AuraScript
int32 stackAmount = GetStackAmount();
if (stackAmount > 1)
{
- CastSpellExtraArgs args;
- args.TriggerFlags = TRIGGERED_FULL_MASK;
- args.TriggeringAura = aurEff;
+ CastSpellExtraArgs args(aurEff);
args.OriginalCaster = caster->GetGUID();
args.AddSpellMod(SPELLVALUE_BASE_POINT0, stackAmount - 1);
target->CastSpell(target, SPELL_PRIEST_PRAYER_OF_MENDING_JUMP, args);
@@ -1263,12 +1261,10 @@ class spell_pri_angelic_feather_trigger : public SpellScriptLoader
}
else
{
- SpellCastTargets targets;
- targets.SetDst(destPos);
CastSpellExtraArgs args;
args.TriggerFlags = TRIGGERED_FULL_MASK;
args.CastDifficulty = GetCastDifficulty();
- GetCaster()->CastSpell(targets, SPELL_PRIEST_ANGELIC_FEATHER_AREATRIGGER, args);
+ GetCaster()->CastSpell(destPos, SPELL_PRIEST_ANGELIC_FEATHER_AREATRIGGER, args);
}
}
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index a0cfba70da2..543b93187d8 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -462,9 +462,7 @@ class spell_sha_flametongue_weapon : public SpellScript
if (!targetItem || !targetItem->GetTemplate()->IsWeapon())
return;
- SpellCastTargets targets;
- targets.SetItemTarget(targetItem);
- player->CastSpell(targets, SPELL_SHAMAN_FLAMETONGUE_WEAPON_ENCHANT, true);
+ player->CastSpell(targetItem, SPELL_SHAMAN_FLAMETONGUE_WEAPON_ENCHANT, true);
}
void Register() override