rendered paste bodyIndex: src/game/Map.cpp
===================================================================
--- src/game/Map.cpp (revision 4039)
+++ src/game/Map.cpp (working copy)
@@ -169,8 +169,15 @@
i_maxPlayers = fields[0].GetUInt32();
i_resetDelayTime = fields[1].GetUInt32();
i_resetTime = (time_t) fields[2].GetUInt64();
- if (i_resetTime == 0) InitResetTime();
}
+ else
+ {
+ sLog.outErrorDb("There is no information about %u instance (Map: %u) in DB. Using default settings.",i_InstanceId,id);
+ i_maxPlayers = sConfig.GetIntDefault("InstanceMaxPlayers",0);
+ i_resetDelayTime = sConfig.GetIntDefault("InstanceResetDelayTime",0);
+ i_resetTime = (time_t)0;
+ }
+ if (i_resetTime == 0) InitResetTime();
delete result;
}