mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9381] Fixed some compile warnings.
This commit is contained in:
parent
2bdcb1161c
commit
ccfd42bf3e
55 changed files with 219 additions and 203 deletions
|
|
@ -549,7 +549,7 @@ void InstanceSaveManager::Update()
|
|||
{
|
||||
// global reset/warning for a certain map
|
||||
time_t resetTime = GetResetTimeFor(event.mapid,event.difficulty);
|
||||
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, resetTime - now);
|
||||
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, uint32(resetTime - now));
|
||||
if(event.type != 4)
|
||||
{
|
||||
// schedule the next warning/reset
|
||||
|
|
@ -607,7 +607,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
|||
if (!mapEntry->Instanceable())
|
||||
return;
|
||||
|
||||
uint64 now = (uint64)time(NULL);
|
||||
time_t now = time(NULL);
|
||||
|
||||
if (!warn)
|
||||
{
|
||||
|
|
@ -637,7 +637,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
|||
// calculate the next reset time
|
||||
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
|
||||
uint32 period = mapDiff->resetTime * DAY;
|
||||
uint64 next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
|
||||
time_t next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
|
||||
// update it in the DB
|
||||
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty);
|
||||
}
|
||||
|
|
@ -649,9 +649,13 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
|||
for(mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
|
||||
{
|
||||
Map *map2 = mitr->second;
|
||||
if(!map2->IsDungeon()) continue;
|
||||
if(warn) ((InstanceMap*)map2)->SendResetWarnings(timeLeft);
|
||||
else ((InstanceMap*)map2)->Reset(INSTANCE_RESET_GLOBAL);
|
||||
if (!map2->IsDungeon())
|
||||
continue;
|
||||
|
||||
if (warn)
|
||||
((InstanceMap*)map2)->SendResetWarnings(timeLeft);
|
||||
else
|
||||
((InstanceMap*)map2)->Reset(INSTANCE_RESET_GLOBAL);
|
||||
}
|
||||
|
||||
// TODO: delete creature/gameobject respawn times even if the maps are not loaded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue