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)
This commit is contained in:
Carbenium
2022-01-24 11:55:32 +01:00
committed by Shauren
parent 906a47b161
commit 310f996b1d
96 changed files with 367 additions and 355 deletions
+3 -3
View File
@@ -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;