فهرست منبع

- reset manor when no owner
- fix loginserver when debug true, thx mrTJO . inform about unclosed database connections.

janiii 15 سال پیش
والد
کامیت
1164af63ec

+ 1 - 1
L2_GameServer/java/com/l2jserver/L2DatabaseFactory.java

@@ -219,7 +219,7 @@ public class L2DatabaseFactory
 			try
 			{
 				con = _source.getConnection();
-				if (Config.DEBUG)
+				if (Server.serverMode == Server.MODE_GAMESERVER)
 					ThreadPoolManager.getInstance().scheduleGeneral(new ConnectionCloser(con, new RuntimeException()), 40000);
 			}
 			catch (SQLException e)

+ 3 - 0
L2_GameServer/java/com/l2jserver/gameserver/model/entity/Castle.java

@@ -992,7 +992,10 @@ public class Castle
 		if (clan != null)
 			_ownerId = clan.getClanId(); // Update owner id property
 		else
+		{
 			_ownerId = 0; // Remove owner
+			resetManor();
+		}
 			
 		Connection con = null;
 		try