diff options
| author | Carbenium <carbenium@outlook.com> | 2020-07-26 20:44:07 +0200 |
|---|---|---|
| committer | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-26 23:30:32 +0200 |
| commit | 1131229ee9c43704b11187f0b11c327db92018b6 (patch) | |
| tree | bc8614c3f34492f46789033f3272f4dc0c24426f /src/server/scripts/Commands | |
| parent | e6f36f83b8af4d973a96f01c6095b075dd12f5d5 (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);
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_mmaps.cpp | 2 |
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 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; } |
