mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
Tweaks to zone shutdown code
This commit is contained in:
+16
-2
@@ -150,8 +150,15 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
|
||||
zone->RequestUCSServerStatus();
|
||||
|
||||
/* Set Logging */
|
||||
/**
|
||||
* Set Shutdown timer
|
||||
*/
|
||||
uint32 shutdown_timer = static_cast<uint32>(database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion()));
|
||||
zone->StartShutdownTimer(shutdown_timer);
|
||||
|
||||
/*
|
||||
* Set Logging
|
||||
*/
|
||||
LogSys.StartFileLogs(StringFormat("%s_version_%u_inst_id_%u_port_%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort));
|
||||
|
||||
return true;
|
||||
@@ -1427,11 +1434,18 @@ bool Zone::HasWeather()
|
||||
void Zone::StartShutdownTimer(uint32 set_time) {
|
||||
if (set_time > autoshutdown_timer.GetRemainingTime()) {
|
||||
if (set_time == (RuleI(Zone, AutoShutdownDelay))) {
|
||||
set_time = database.getZoneShutDownDelay(GetZoneID(), GetInstanceVersion());
|
||||
set_time = static_cast<uint32>(database.getZoneShutDownDelay(GetZoneID(), GetInstanceVersion()));
|
||||
}
|
||||
autoshutdown_timer.SetTimer(set_time);
|
||||
Log(Logs::General, Logs::Zone_Server, "Zone::StartShutdownTimer set to %u", set_time);
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Zone_Server,
|
||||
"Zone::StartShutdownTimer trigger - set_time: %u remaining_time: %u diff: %i",
|
||||
set_time,
|
||||
autoshutdown_timer.GetRemainingTime(),
|
||||
(set_time - autoshutdown_timer.GetRemainingTime())
|
||||
);
|
||||
}
|
||||
|
||||
bool Zone::Depop(bool StartSpawnTimer) {
|
||||
|
||||
Reference in New Issue
Block a user