SystemPanel variables moved to GameServer to fix compiling issue.
This commit is contained in:
		| @@ -19,12 +19,12 @@ package handlers.admincommandhandlers; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.gameserver.GameServer; | ||||
| import org.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; | ||||
| import org.l2jmobius.gameserver.ui.SystemPanel; | ||||
| import org.l2jmobius.gameserver.util.BuilderUtil; | ||||
|  | ||||
| /** | ||||
| @@ -93,7 +93,7 @@ public class AdminOnline implements IAdminCommandHandler | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Total count: " + total); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Total online: " + online); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Max connected: " + SystemPanel.MAX_CONNECTED_COUNT); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Max connected: " + GameServer.MAX_CONNECTED_COUNT); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Unique IPs: " + ips.size()); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace); | ||||
| 			BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace); | ||||
|   | ||||
| @@ -168,6 +168,9 @@ public class GameServer | ||||
| { | ||||
| 	private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName()); | ||||
| 	 | ||||
| 	public static volatile int MAX_CONNECTED_COUNT = 0; | ||||
| 	public static volatile int OFFLINE_TRADE_COUNT = 0; | ||||
| 	 | ||||
| 	private final DeadLockDetector _deadDetectThread; | ||||
| 	private static GameServer INSTANCE; | ||||
| 	public static final Calendar dateTimeServerStarted = Calendar.getInstance(); | ||||
|   | ||||
| @@ -29,6 +29,7 @@ import java.util.logging.Logger; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.database.DatabaseFactory; | ||||
| import org.l2jmobius.gameserver.GameServer; | ||||
| import org.l2jmobius.gameserver.enums.PrivateStoreType; | ||||
| import org.l2jmobius.gameserver.model.TradeItem; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| @@ -36,7 +37,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.holders.SellBuffHolder; | ||||
| import org.l2jmobius.gameserver.network.Disconnection; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.ui.SystemPanel; | ||||
|  | ||||
| public class OfflineTraderTable | ||||
| { | ||||
| @@ -310,7 +310,7 @@ public class OfflineTraderTable | ||||
| 				} | ||||
| 			} | ||||
| 			 | ||||
| 			SystemPanel.OFFLINE_TRADE_COUNT = nTraders; | ||||
| 			GameServer.OFFLINE_TRADE_COUNT = nTraders; | ||||
| 			LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders."); | ||||
| 			 | ||||
| 			if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME) | ||||
| @@ -451,7 +451,7 @@ public class OfflineTraderTable | ||||
| 	 | ||||
| 	public static synchronized void removeTrader(int traderObjId) | ||||
| 	{ | ||||
| 		SystemPanel.OFFLINE_TRADE_COUNT--; | ||||
| 		GameServer.OFFLINE_TRADE_COUNT--; | ||||
| 		 | ||||
| 		try (Connection con = DatabaseFactory.getConnection(); | ||||
| 			PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER); | ||||
|   | ||||
| @@ -46,6 +46,7 @@ import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.concurrent.ThreadPool; | ||||
| import org.l2jmobius.commons.database.DatabaseFactory; | ||||
| import org.l2jmobius.commons.util.Rnd; | ||||
| import org.l2jmobius.gameserver.GameServer; | ||||
| import org.l2jmobius.gameserver.GameTimeController; | ||||
| import org.l2jmobius.gameserver.ItemsAutoDestroy; | ||||
| import org.l2jmobius.gameserver.LoginServerThread; | ||||
| @@ -349,7 +350,6 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookC | ||||
| import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.sessionzones.TimedHuntingZoneExit; | ||||
| import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; | ||||
| import org.l2jmobius.gameserver.ui.SystemPanel; | ||||
| import org.l2jmobius.gameserver.util.Broadcast; | ||||
| import org.l2jmobius.gameserver.util.EnumIntBitmask; | ||||
| import org.l2jmobius.gameserver.util.FloodProtectors; | ||||
| @@ -5611,7 +5611,7 @@ public class PlayerInstance extends Playable | ||||
| 		if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached())) | ||||
| 		{ | ||||
| 			Disconnection.of(this).storeMe().deleteMe(); | ||||
| 			SystemPanel.OFFLINE_TRADE_COUNT--; | ||||
| 			GameServer.OFFLINE_TRADE_COUNT--; | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
|   | ||||
| @@ -41,9 +41,6 @@ public class SystemPanel extends JPanel | ||||
| { | ||||
| 	private static final long START_TIME = System.currentTimeMillis(); | ||||
| 	 | ||||
| 	public static volatile int MAX_CONNECTED_COUNT = 0; | ||||
| 	public static volatile int OFFLINE_TRADE_COUNT = 0; | ||||
| 	 | ||||
| 	public SystemPanel() | ||||
| 	{ | ||||
| 		setBackground(Color.WHITE); | ||||
| @@ -125,13 +122,13 @@ public class SystemPanel extends JPanel | ||||
| 			public void run() | ||||
| 			{ | ||||
| 				final int playerCount = World.getInstance().getPlayers().size(); | ||||
| 				if (MAX_CONNECTED_COUNT < playerCount) | ||||
| 				if (GameServer.MAX_CONNECTED_COUNT < playerCount) | ||||
| 				{ | ||||
| 					MAX_CONNECTED_COUNT = playerCount; | ||||
| 					GameServer.MAX_CONNECTED_COUNT = playerCount; | ||||
| 				} | ||||
| 				lblConnected.setText("Connected: " + playerCount); | ||||
| 				lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT); | ||||
| 				lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT); | ||||
| 				lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT); | ||||
| 				lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT); | ||||
| 				lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME)); | ||||
| 			} | ||||
| 		}, 1000, 1000); | ||||
|   | ||||
| @@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util; | ||||
| import java.util.logging.Logger; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.gameserver.GameServer; | ||||
| import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable; | ||||
| import org.l2jmobius.gameserver.model.actor.Summon; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.olympiad.OlympiadManager; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.ui.SystemPanel; | ||||
|  | ||||
| /** | ||||
|  * @author lord_rex | ||||
| @@ -100,7 +100,7 @@ public class OfflineTradeUtil | ||||
| 			return false; | ||||
| 		} | ||||
| 		 | ||||
| 		SystemPanel.OFFLINE_TRADE_COUNT++; | ||||
| 		GameServer.OFFLINE_TRADE_COUNT++; | ||||
| 		 | ||||
| 		final GameClient client = player.getClient(); | ||||
| 		client.close(true); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment