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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user