aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-07-26 20:44:07 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-24 11:55:32 +0100
commit310f996b1daf9dea701276847aa3fb30fcd43b9e (patch)
tree6016e31d8f9f3f439f4c35868cfcde4652a898b1 /src/server/scripts/Commands
parent906a47b1616eebe1b9f73f0b5a849c5d946e8137 (diff)
Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0); to TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s); (cherry picked from commit 1131229ee9c43704b11187f0b11c327db92018b6)
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp6
-rw-r--r--src/server/scripts/Commands/cs_mmaps.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 3ec810f5c42..86400739bc7 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1425,9 +1425,9 @@ public:
char* fill_str = args ? strtok((char*)args, " ") : nullptr;
char* duration_str = args ? strtok(nullptr, " ") : nullptr;
- int duration = duration_str ? atoi(duration_str) : -1;
- if (duration <= 0 || duration >= 30 * MINUTE) // arbitary upper limit
- duration = 3 * MINUTE;
+ Seconds duration = duration_str ? Seconds(atoi(duration_str)) : 0s;
+ if (duration <= 0s || duration >= 30min) // arbitary upper limit
+ duration = 3min;
bool doFill = fill_str ? (stricmp(fill_str, "FILL") == 0) : false;
diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp
index 04d14913170..8102ed82770 100644
--- a/src/server/scripts/Commands/cs_mmaps.cpp
+++ b/src/server/scripts/Commands/cs_mmaps.cpp
@@ -116,7 +116,7 @@ public:
handler->PSendSysMessage("Enable GM mode to see the path points.");
for (uint32 i = 0; i < pointPath.size(); ++i)
- player->SummonCreature(VISUAL_WAYPOINT, pointPath[i].x, pointPath[i].y, pointPath[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
+ player->SummonCreature(VISUAL_WAYPOINT, pointPath[i].x, pointPath[i].y, pointPath[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 9s);
return true;
}