Fix: Stuck at "Retrieving character list". (#880)

@AyaseCore 
* fix: Stuck at "Retrieving character list".

* change 2 to 1.1.

* Use the rochet2 solution.

@Rochet2 
* Add more logic from InstanceSaveManager::Update

In `InstanceSaveManager::Update` the `bool warn = event.type < 5;` affects how much time is added to the next reset schedule. This commit takes that into account to the next_reset calculation when skipping resets.

* Simplify code and move it to data loading
This commit is contained in:
ayase
2018-06-04 03:56:02 +08:00
committed by Barbz
parent 15d8dd36e5
commit e222cbbc0a

View File

@@ -290,6 +290,12 @@ void InstanceSaveManager::LoadResetTimes()
SetResetTimeFor(mapid, difficulty, t); SetResetTimeFor(mapid, difficulty, t);
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, difficulty, (uint32)t); CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, difficulty, (uint32)t);
} }
else
{
// next reset should be in future. If its not, skip to future.
while (t < now)
t = uint32(((t + MINUTE) / DAY * DAY) + period + diff);
}
SetExtendedResetTimeFor(mapid, difficulty, t + period); SetExtendedResetTimeFor(mapid, difficulty, t + period);
// schedule the global reset/warning // schedule the global reset/warning