aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_cast.cpp8
1 files changed, 3 insertions, 5 deletions
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;
}