SystemPanel variables moved to GameServer to fix compiling issue.
This commit is contained in:
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -160,6 +160,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -340,7 +341,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5701,7 +5701,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -342,7 +343,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5707,7 +5707,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -344,7 +345,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5709,7 +5709,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
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.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
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.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -451,7 +451,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -349,7 +350,6 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5703,7 +5703,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -165,6 +165,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
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.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
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.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -451,7 +451,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -347,7 +348,6 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5683,7 +5683,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -165,6 +165,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
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.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
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.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -451,7 +451,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -347,7 +348,6 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5683,7 +5683,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
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.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
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.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -451,7 +451,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -347,7 +348,6 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5684,7 +5684,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
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());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
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.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
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.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -451,7 +451,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -46,6 +46,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
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.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.sessionzones.TimedHuntingZoneExit;
|
import org.l2jmobius.gameserver.network.serverpackets.sessionzones.TimedHuntingZoneExit;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
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()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ import org.l2jmobius.loginserver.LoginController;
|
|||||||
public class GameServer extends Thread
|
public class GameServer extends Thread
|
||||||
{
|
{
|
||||||
static Logger _log = Logger.getLogger(GameServer.class.getName());
|
static Logger _log = Logger.getLogger(GameServer.class.getName());
|
||||||
|
|
||||||
|
public static volatile int MAX_CONNECTED_COUNT = 0;
|
||||||
|
public static volatile int OFFLINE_TRADE_COUNT = 0;
|
||||||
|
|
||||||
private ServerSocket _serverSocket;
|
private ServerSocket _serverSocket;
|
||||||
|
|
||||||
private final ItemTable _itemTable;
|
private final ItemTable _itemTable;
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ public class SystemPanel extends JPanel
|
|||||||
{
|
{
|
||||||
private static final long START_TIME = System.currentTimeMillis();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -120,12 +117,12 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getAllPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -135,6 +135,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 SelectorThread<GameClient> _selectorThread;
|
||||||
private static LoginServerThread _loginThread;
|
private static LoginServerThread _loginThread;
|
||||||
private static GamePacketHandler _gamePacketHandler;
|
private static GamePacketHandler _gamePacketHandler;
|
||||||
|
|||||||
+2
-2
@@ -24,6 +24,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureList;
|
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.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.GameClient.GameClientState;
|
import org.l2jmobius.gameserver.network.GameClient.GameClientState;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Shyla
|
* @author Shyla
|
||||||
@@ -288,7 +288,7 @@ public class OfflineTradeTable
|
|||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
stm.close();
|
stm.close();
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info("Loaded " + nTraders + " offline traders.");
|
LOGGER.info("Loaded " + nTraders + " offline traders.");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ import java.util.Map;
|
|||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
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 $
|
* @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())
|
if (object.getActingPlayer().isInOfflineMode())
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!((PlayerInstance) object).isTeleporting())
|
if (!((PlayerInstance) object).isTeleporting())
|
||||||
|
|||||||
+2
-2
@@ -39,6 +39,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
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.TradeStart;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
import org.l2jmobius.gameserver.util.IllegalPlayerAction;
|
import org.l2jmobius.gameserver.util.IllegalPlayerAction;
|
||||||
@@ -7473,7 +7473,7 @@ public class PlayerInstance extends Playable
|
|||||||
store();
|
store();
|
||||||
if (Config.OFFLINE_DISCONNECT_FINISHED)
|
if (Config.OFFLINE_DISCONNECT_FINISHED)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
deleteMe();
|
deleteMe();
|
||||||
|
|
||||||
if (_client != null)
|
if (_client != null)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
|||||||
import org.l2jmobius.commons.mmocore.MMOClient;
|
import org.l2jmobius.commons.mmocore.MMOClient;
|
||||||
import org.l2jmobius.commons.mmocore.MMOConnection;
|
import org.l2jmobius.commons.mmocore.MMOConnection;
|
||||||
import org.l2jmobius.commons.mmocore.ReceivablePacket;
|
import org.l2jmobius.commons.mmocore.ReceivablePacket;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread.SessionKey;
|
import org.l2jmobius.gameserver.LoginServerThread.SessionKey;
|
||||||
import org.l2jmobius.gameserver.datatables.OfflineTradeTable;
|
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.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ServerClose;
|
import org.l2jmobius.gameserver.network.serverpackets.ServerClose;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.EventData;
|
import org.l2jmobius.gameserver.util.EventData;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
|
|
||||||
@@ -752,7 +752,7 @@ public class GameClient extends MMOClient<MMOConnection<GameClient>> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
OfflineTradeTable.storeOffliner(player);
|
OfflineTradeTable.storeOffliner(player);
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ public class SystemPanel extends JPanel
|
|||||||
{
|
{
|
||||||
private static final long START_TIME = System.currentTimeMillis();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -132,13 +129,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getAllPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -157,6 +157,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -46,6 +46,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -320,7 +321,6 @@ import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -6050,7 +6050,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -46,6 +46,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -325,7 +326,6 @@ import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5947,7 +5947,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminOnline.java
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -341,7 +342,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5672,7 +5672,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -341,7 +342,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5672,7 +5672,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -47,6 +47,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -339,7 +340,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5658,7 +5658,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -48,6 +48,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -343,7 +344,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5669,7 +5669,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
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();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
|
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 final DeadLockDetector _deadDetectThread;
|
||||||
private static GameServer INSTANCE;
|
private static GameServer INSTANCE;
|
||||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||||
|
|||||||
+3
-3
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||||
import org.l2jmobius.gameserver.model.TradeItem;
|
import org.l2jmobius.gameserver.model.TradeItem;
|
||||||
@@ -34,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
import org.l2jmobius.gameserver.model.holders.SellBuffHolder;
|
||||||
import org.l2jmobius.gameserver.network.Disconnection;
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
public class OfflineTraderTable
|
public class OfflineTraderTable
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ public class OfflineTraderTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT = nTraders;
|
GameServer.OFFLINE_TRADE_COUNT = nTraders;
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + nTraders + " offline traders.");
|
||||||
|
|
||||||
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
if (!Config.STORE_OFFLINE_TRADE_IN_REALTIME)
|
||||||
@@ -447,7 +447,7 @@ public class OfflineTraderTable
|
|||||||
|
|
||||||
public static synchronized void removeTrader(int traderObjId)
|
public static synchronized void removeTrader(int traderObjId)
|
||||||
{
|
{
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||||
|
|||||||
+2
-2
@@ -48,6 +48,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
import org.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||||
import org.l2jmobius.gameserver.LoginServerThread;
|
import org.l2jmobius.gameserver.LoginServerThread;
|
||||||
@@ -343,7 +344,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
import org.l2jmobius.gameserver.util.EnumIntBitmask;
|
||||||
import org.l2jmobius.gameserver.util.FloodProtectors;
|
import org.l2jmobius.gameserver.util.FloodProtectors;
|
||||||
@@ -5669,7 +5669,7 @@ public class PlayerInstance extends Playable
|
|||||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||||
{
|
{
|
||||||
Disconnection.of(this).storeMe().deleteMe();
|
Disconnection.of(this).storeMe().deleteMe();
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT--;
|
GameServer.OFFLINE_TRADE_COUNT--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-7
@@ -41,9 +41,6 @@ public class SystemPanel extends JPanel
|
|||||||
{
|
{
|
||||||
private static final long START_TIME = System.currentTimeMillis();
|
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()
|
public SystemPanel()
|
||||||
{
|
{
|
||||||
setBackground(Color.WHITE);
|
setBackground(Color.WHITE);
|
||||||
@@ -125,13 +122,13 @@ public class SystemPanel extends JPanel
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final int playerCount = World.getInstance().getPlayers().size();
|
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);
|
lblConnected.setText("Connected: " + playerCount);
|
||||||
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
|
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
|
||||||
lblOfflineShops.setText("Offline trade: " + OFFLINE_TRADE_COUNT);
|
lblOfflineShops.setText("Offline trade: " + GameServer.OFFLINE_TRADE_COUNT);
|
||||||
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
|
||||||
}
|
}
|
||||||
}, 1000, 1000);
|
}, 1000, 1000);
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ package org.l2jmobius.gameserver.util;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
import org.l2jmobius.gameserver.data.sql.impl.OfflineTraderTable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lord_rex
|
* @author lord_rex
|
||||||
@@ -100,7 +100,7 @@ public class OfflineTradeUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPanel.OFFLINE_TRADE_COUNT++;
|
GameServer.OFFLINE_TRADE_COUNT++;
|
||||||
|
|
||||||
final GameClient client = player.getClient();
|
final GameClient client = player.getClient();
|
||||||
client.close(true);
|
client.close(true);
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ package handlers.admincommandhandlers;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.GameServer;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.ui.SystemPanel;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
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 count: " + total);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
BuilderUtil.sendSysMessage(activeChar, "Total online: " + online);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Total offline: " + offline);
|
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, "Unique IPs: " + ips.size());
|
||||||
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
BuilderUtil.sendSysMessage(activeChar, "In peace zone: " + peace);
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
BuilderUtil.sendSysMessage(activeChar, "Not in peace zone: " + notPeace);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user