From 1131229ee9c43704b11187f0b11c327db92018b6 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 26 Jul 2020 20:44:07 +0200 Subject: 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); --- src/server/scripts/Commands/cs_debug.cpp | 6 +++--- src/server/scripts/Commands/cs_mmaps.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 9103a425e45..022520c6de7 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1638,9 +1638,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 b9c2cb2591f..deb606242b7 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -114,7 +114,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; } -- cgit v1.2.3