SystemPanel variables moved to GameServer to fix compiling issue.
This commit is contained in:
@@ -135,6 +135,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 static SelectorThread<GameClient> _selectorThread;
|
||||
private static LoginServerThread _loginThread;
|
||||
private static GamePacketHandler _gamePacketHandler;
|
||||
|
@@ -24,6 +24,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.LoginServerThread;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.ManufactureList;
|
||||
@@ -33,7 +34,6 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.GameClient.GameClientState;
|
||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
||||
|
||||
/**
|
||||
* @author Shyla
|
||||
@@ -288,7 +288,7 @@ public class OfflineTradeTable
|
||||
}
|
||||
rs.close();
|
||||
stm.close();
|
||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
||||
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||
LOGGER.info("Loaded " + nTraders + " offline traders.");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.handler.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;
|
||||
|
||||
/**
|
||||
@@ -95,7 +95,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);
|
||||
|
@@ -23,10 +23,10 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.GameServer;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.21.2.5.2.7 $ $Date: 2005/03/27 15:29:32 $
|
||||
@@ -446,7 +446,7 @@ public class World
|
||||
{
|
||||
if (object.getActingPlayer().isInOfflineMode())
|
||||
{
|
||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
||||
GameServer.OFFLINE_TRADE_COUNT--;
|
||||
}
|
||||
|
||||
if (!((PlayerInstance) object).isTeleporting())
|
||||
|
@@ -39,6 +39,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;
|
||||
@@ -225,7 +226,6 @@ import org.l2jmobius.gameserver.network.serverpackets.TradePressOwnOk;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||
import org.l2jmobius.gameserver.util.IllegalPlayerAction;
|
||||
@@ -7473,7 +7473,7 @@ public class PlayerInstance extends Playable
|
||||
store();
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED)
|
||||
{
|
||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
||||
GameServer.OFFLINE_TRADE_COUNT--;
|
||||
deleteMe();
|
||||
|
||||
if (_client != null)
|
||||
|
@@ -36,6 +36,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.mmocore.MMOClient;
|
||||
import org.l2jmobius.commons.mmocore.MMOConnection;
|
||||
import org.l2jmobius.commons.mmocore.ReceivablePacket;
|
||||
import org.l2jmobius.gameserver.GameServer;
|
||||
import org.l2jmobius.gameserver.LoginServerThread;
|
||||
import org.l2jmobius.gameserver.LoginServerThread.SessionKey;
|
||||
import org.l2jmobius.gameserver.datatables.OfflineTradeTable;
|
||||
@@ -55,7 +56,6 @@ import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerClose;
|
||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
||||
import org.l2jmobius.gameserver.util.EventData;
|
||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||
|
||||
@@ -752,7 +752,7 @@ public class GameClient extends MMOClient<MMOConnection<GameClient>> implements
|
||||
}
|
||||
|
||||
OfflineTradeTable.storeOffliner(player);
|
||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
||||
GameServer.OFFLINE_TRADE_COUNT++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
@@ -132,13 +129,13 @@ public class SystemPanel extends JPanel
|
||||
public void run()
|
||||
{
|
||||
final int playerCount = World.getInstance().getAllPlayers().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);
|
||||
|
Reference in New Issue
Block a user