mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[9389] Cleanup config data. Use proper names and expected types.
This commit is contained in:
parent
58d188f21a
commit
ebfb0f9835
63 changed files with 1591 additions and 967 deletions
|
|
@ -430,7 +430,7 @@ void InstanceSaveManager::LoadResetTimes()
|
|||
}
|
||||
|
||||
// load the global respawn times for raid/heroic instances
|
||||
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
|
||||
uint32 diff = sWorld.getConfig(CONFIG_UINT32_INSTANCE_RESET_TIME_HOUR) * HOUR;
|
||||
result = CharacterDatabase.Query("SELECT mapid, difficulty, resettime FROM instance_reset");
|
||||
if(result)
|
||||
{
|
||||
|
|
@ -475,7 +475,7 @@ void InstanceSaveManager::LoadResetTimes()
|
|||
continue;
|
||||
|
||||
// the reset_delay must be at least one day
|
||||
uint32 period = uint32(mapDiff->resetTime / DAY * sWorld.getRate(RATE_INSTANCE_RESET_TIME)) * DAY;
|
||||
uint32 period = uint32(mapDiff->resetTime / DAY * sWorld.getConfig(CONFIG_FLOAT_RATE_INSTANCE_RESET_TIME)) * DAY;
|
||||
|
||||
time_t t = GetResetTimeFor(mapid,difficulty);
|
||||
if(!t)
|
||||
|
|
@ -635,7 +635,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
|||
CharacterDatabase.CommitTransaction();
|
||||
|
||||
// calculate the next reset time
|
||||
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
|
||||
uint32 diff = sWorld.getConfig(CONFIG_UINT32_INSTANCE_RESET_TIME_HOUR) * HOUR;
|
||||
uint32 period = mapDiff->resetTime * DAY;
|
||||
time_t next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
|
||||
// update it in the DB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue