Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/aCis_datapack/sql/character_offline_trade.sql b/aCis_datapack/sql/character_offline_trade.sql
- new file mode 100644
- index 0000000..a69f895
- --- /dev/null
- +++ b/aCis_datapack/sql/character_offline_trade.sql
- @@ -0,0 +1,7 @@
- +CREATE TABLE IF NOT EXISTS `character_offline_trade` (
- + `charId` int(10) NOT NULL,
- + `time` bigint(13) NOT NULL DEFAULT 0,
- + `type` tinyint(4) NOT NULL DEFAULT 0,
- + `title` varchar(50) NULL DEFAULT NULL,
- + PRIMARY KEY (`charId`)
- +);
- \ No newline at end of file
- diff --git a/aCis_datapack/sql/character_offline_trade_items.sql b/aCis_datapack/sql/character_offline_trade_items.sql
- new file mode 100644
- index 0000000..e69de29
- --- /dev/null
- +++ b/aCis_datapack/sql/character_offline_trade_items.sql
- @@ -0,0 +1,7 @@
- +CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
- + `charId` int(10) NOT NULL,
- + `item` int(10) NOT NULL DEFAULT 0,
- + `count` bigint(20) NOT NULL DEFAULT 0,
- + `price` bigint(20) NOT NULL DEFAULT 0,
- + `enchant` bigint(20) NULL DEFAULT NULL
- +);
- diff --git a/aCis_gameserver/config/offline.properties b/aCis_gameserver/config/offline.properties
- new file mode 100644
- index 0000000..0fe0a89
- --- /dev/null
- +++ b/aCis_gameserver/config/offline.properties
- @@ -0,0 +1,38 @@
- +# =================================================================
- +# Offline
- +# =================================================================
- +
- +# Enable or disable offline trade feature.
- +# Enable -> true, Disable -> false
- +OfflineTradeEnable = True
- +
- +# Enable or disable offline craft feature.
- +# Enable -> true, Disable -> false
- +OfflineCraftEnable = True
- +
- +# If set to True, players will be allowed to be offline only in peace zones.
- +# Default: False
- +OfflineInPeaceZone = True
- +
- +# If set to True, players offline will be invulnerable.
- +# Default: False
- +OfflineNoDamage = False
- +
- +# Restore offline traders/crafters after restart/shutdown.
- +# Default: False
- +OfflineRestore = True
- +
- +# Require OfflineRestore = true
- +# If a player is offline for more than the set value, won't be restored on server start.
- +# 0 = Offline will be always restored
- +OfflineMaxDays = 30
- +
- +# Disconnect offline player after he sold/bought all items in his list.
- +OfflineDisconnect = True
- +
- +# Offline Effect - Choose one of the following effects:
- +# none, stun, sleep, muted, root -> (none = No effect)
- +OfflineEffect = root
- +
- +# Offline Name Color (set 0 to Disable)
- +OfflineNameColor = 808080
- diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
- index dcbc2f0..10dab9c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/Config.java
- +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
- @@ -35,6 +35,7 @@
- public static final String PLAYERS_FILE = "./config/players.properties";
- public static final String SERVER_FILE = "./config/server.properties";
- public static final String SIEGE_FILE = "./config/siege.properties";
- + public static final String OFFLINE_FILE = "./config/offline.properties";
- // --------------------------------------------------
- // Clans settings
- @@ -450,6 +451,20 @@
- public static int CH_MAX_ATTACKERS_NUMBER;
- // --------------------------------------------------
- + // Offline
- + // --------------------------------------------------
- +
- + public static boolean OFFLINE_TRADE_ENABLE;
- + public static boolean OFFLINE_CRAFT_ENABLE;
- + public static boolean OFFLINE_IN_PEACE_ZONE;
- + public static boolean OFFLINE_NO_DAMAGE;
- + public static boolean OFFLINE_DISCONNECT;
- + public static boolean OFFLINE_RESTORE;
- + public static int OFFLINE_MAX_DAYS;
- + public static int OFFLINE_NAME_COLOR;
- + public static String OFFLINE_EFFECT;
- +
- + // --------------------------------------------------
- // Server
- // --------------------------------------------------
- @@ -1097,6 +1112,25 @@
- }
- /**
- + * Loads offline settings.
- + */
- + private static final void loadOffline()
- + {
- + final ExProperties offline = initProperties(Config.OFFLINE_FILE);
- +
- + OFFLINE_TRADE_ENABLE = offline.getProperty("OfflineTradeEnable", false);
- + OFFLINE_CRAFT_ENABLE = offline.getProperty("OfflineCraftEnable", false);
- + OFFLINE_IN_PEACE_ZONE = offline.getProperty("OfflineInPeaceZone", false);
- + OFFLINE_NO_DAMAGE = offline.getProperty("OfflineNoDamage", false);
- + OFFLINE_EFFECT = offline.getProperty("OfflineEffect", "none");
- + OFFLINE_RESTORE = offline.getProperty("OfflineRestore", false);
- + OFFLINE_MAX_DAYS = offline.getProperty("OfflineMaxDays", 10);
- + OFFLINE_DISCONNECT = offline.getProperty("OfflineDisconnect", true);
- + OFFLINE_NAME_COLOR = Integer.decode("0x" + offline.getProperty("OfflineNameColor", 808080));
- +
- + }
- +
- + /**
- * Loads gameserver settings.<br>
- * IP addresses, database, rates, feature enabled/disabled, misc.
- */
- @@ -1293,6 +1327,9 @@
- // siege settings
- loadSieges();
- + // offline settings
- + loadOffline();
- +
- // server settings
- loadServer();
- }
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java b/aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java
- index 052fd0b..c19e082 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java
- @@ -45,6 +45,7 @@
- import net.sf.l2j.gameserver.data.sql.AutoSpawnTable;
- import net.sf.l2j.gameserver.data.sql.BookmarkTable;
- import net.sf.l2j.gameserver.data.sql.ClanTable;
- +import net.sf.l2j.gameserver.data.sql.OfflineTable;
- import net.sf.l2j.gameserver.data.sql.PlayerInfoTable;
- import net.sf.l2j.gameserver.data.sql.ServerMemoTable;
- import net.sf.l2j.gameserver.data.sql.SpawnTable;
- @@ -259,6 +260,10 @@
- DerbyTrackManager.getInstance();
- LotteryManager.getInstance();
- + StringUtil.printSection("Offline");
- + if (Config.OFFLINE_RESTORE && (Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE))
- + OfflineTable.getInstance().restore();
- +
- if (Config.ALLOW_WEDDING)
- CoupleManager.getInstance();
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java b/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java
- index 141b2c7..8f96418 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java
- @@ -295,6 +295,10 @@
- public void addClient(String account, GameClient client)
- {
- final GameClient existingClient = _clients.putIfAbsent(account, client);
- +
- + if (client.isDetached())
- + return;
- +
- if (existingClient == null)
- {
- try
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java b/aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java
- index 275ae88..11ba89c 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java
- @@ -18,6 +18,7 @@
- import net.sf.l2j.gameserver.data.manager.RaidBossManager;
- import net.sf.l2j.gameserver.data.manager.SevenSignsManager;
- import net.sf.l2j.gameserver.data.manager.ZoneManager;
- +import net.sf.l2j.gameserver.data.sql.OfflineTable;
- import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.Player;
- import net.sf.l2j.gameserver.model.olympiad.Olympiad;
- @@ -78,6 +79,10 @@
- {
- StringUtil.printSection("Under " + MODE_TEXT[_shutdownMode] + " process");
- + // store offline
- + if (Config.OFFLINE_RESTORE && (Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE))
- + OfflineTable.getInstance().store();
- +
- // disconnect players
- try
- {
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/sql/OfflineTable.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/sql/OfflineTable.java
- new file mode 100644
- index 0000000..41ec827
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/sql/OfflineTable.java
- @@ -0,0 +1,301 @@
- +package net.sf.l2j.gameserver.data.sql;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.sql.Statement;
- +import java.util.Arrays;
- +import java.util.Calendar;
- +import java.util.List;
- +
- +import net.sf.l2j.commons.logging.CLogger;
- +import net.sf.l2j.commons.pool.ConnectionPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.enums.ZoneId;
- +import net.sf.l2j.gameserver.enums.actors.OperateType;
- +import net.sf.l2j.gameserver.enums.skills.AbnormalEffect;
- +import net.sf.l2j.gameserver.model.World;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.craft.ManufactureItem;
- +import net.sf.l2j.gameserver.model.trade.TradeItem;
- +import net.sf.l2j.gameserver.network.GameClient;
- +
- +public class OfflineTable
- +{
- + private static final CLogger LOGGER = new CLogger(OfflineTable.class.getName());
- +
- + private static final String SAVE_OFFLINE_STATUS = "INSERT INTO character_offline_trade (`charId`,`time`,`type`,`title`) VALUES (?,?,?,?)";
- + private static final String SAVE_ITEMS = "INSERT INTO character_offline_trade_items (`charId`,`item`,`count`,`price`,`enchant`) VALUES (?,?,?,?,?)";
- + private static final String CLEAR_OFFLINE_TABLE = "DELETE FROM character_offline_trade";
- + private static final String CLEAR_OFFLINE_TABLE_ITEMS = "DELETE FROM character_offline_trade_items";
- + private static final String LOAD_OFFLINE_STATUS = "SELECT * FROM character_offline_trade";
- + private static final String LOAD_OFFLINE_ITEMS = "SELECT * FROM character_offline_trade_items WHERE charId = ?";
- +
- + private static final String EFFECT = Config.OFFLINE_EFFECT;
- + private static final int NAME_COLOR = Config.OFFLINE_NAME_COLOR;
- +
- + private static final List<String> ALLOWED_EFFECTS = Arrays.asList("sleep", "muted", "root", "stun");
- +
- + public void store()
- + {
- + if (!Config.OFFLINE_RESTORE || (!Config.OFFLINE_TRADE_ENABLE && !Config.OFFLINE_CRAFT_ENABLE))
- + return;
- +
- + try (Connection con = ConnectionPool.getConnection();
- + PreparedStatement offline = con.prepareStatement(SAVE_OFFLINE_STATUS);
- + PreparedStatement item = con.prepareStatement(SAVE_ITEMS))
- + {
- + try (Statement stm = con.createStatement())
- + {
- + stm.execute(CLEAR_OFFLINE_TABLE);
- + stm.execute(CLEAR_OFFLINE_TABLE_ITEMS);
- + }
- + for (Player player : World.getInstance().getPlayers())
- + {
- + try
- + {
- + if (player.getOperateType() != OperateType.NONE && (player.getClient() == null || player.getClient().isDetached()))
- + {
- + offline.setInt(1, player.getObjectId());
- + offline.setLong(2, player.getOfflineStartTime());
- + offline.setInt(3, player.getOperateType().getId());
- + switch (player.getOperateType())
- + {
- + case BUY:
- + if (!Config.OFFLINE_TRADE_ENABLE)
- + continue;
- +
- + offline.setString(4, player.getBuyList().getTitle());
- + for (TradeItem i : player.getBuyList())
- + {
- + item.setInt(1, player.getObjectId());
- + item.setInt(2, i.getItem().getItemId());
- + item.setLong(3, i.getCount());
- + item.setLong(4, i.getPrice());
- + item.setLong(5, i.getEnchant());
- + item.addBatch();
- + }
- + break;
- + case SELL:
- + case PACKAGE_SELL:
- + if (!Config.OFFLINE_TRADE_ENABLE)
- + continue;
- +
- + offline.setString(4, player.getSellList().getTitle());
- + player.getSellList().updateItems();
- + for (TradeItem i : player.getSellList())
- + {
- + item.setInt(1, player.getObjectId());
- + item.setInt(2, i.getObjectId());
- + item.setLong(3, i.getCount());
- + item.setLong(4, i.getPrice());
- + item.setLong(5, i.getEnchant());
- + item.addBatch();
- + }
- + break;
- + case MANUFACTURE:
- + if (!Config.OFFLINE_CRAFT_ENABLE)
- + continue;
- +
- + offline.setString(4, player.getManufactureList().getStoreName());
- + for (final ManufactureItem i : player.getManufactureList())
- + {
- + item.setInt(1, player.getObjectId());
- + item.setInt(2, i.getId());
- + item.setLong(3, 0L);
- + item.setLong(4, i.getValue());
- + item.setLong(5, 0L);
- + item.addBatch();
- + }
- + break;
- + }
- + item.executeBatch();
- + offline.execute();
- + }
- + }
- + catch (Exception e)
- + {
- + LOGGER.warn("Error while saving offline: " + player.getObjectId() + " " + e, e);
- + }
- + }
- +
- + LOGGER.info("Offline stored.");
- + }
- + catch (Exception e)
- + {
- + LOGGER.warn("Error while saving offline: " + e, e);
- + }
- + }
- +
- + public void restore()
- + {
- +
- + if (!Config.OFFLINE_RESTORE || (!Config.OFFLINE_TRADE_ENABLE && !Config.OFFLINE_CRAFT_ENABLE))
- + return;
- +
- + LOGGER.info("Loading offline...");
- +
- + int count = 0;
- +
- + try (Connection con = ConnectionPool.getConnection();
- + Statement stm = con.createStatement();
- + ResultSet rs = stm.executeQuery(LOAD_OFFLINE_STATUS))
- + {
- +
- + while (rs.next())
- + {
- + final long time = rs.getLong("time");
- + if (Config.OFFLINE_MAX_DAYS > 0 && isExpired(time))
- + continue;
- +
- + final OperateType type = getType(rs.getInt("type"));
- + if (type == null || type == OperateType.NONE)
- + continue;
- +
- + final Player player = Player.restore(rs.getInt("charId"));
- + if (player == null)
- + continue;
- +
- + final GameClient client = new GameClient(null);
- + client.spawnOffline(player);
- + player.setOfflineStartTime(time);
- + player.sitDown();
- +
- + final String title = rs.getString("title");
- +
- + try (PreparedStatement ps = con.prepareStatement(LOAD_OFFLINE_ITEMS))
- + {
- + ps.setInt(1, player.getObjectId());
- + try (ResultSet item = ps.executeQuery())
- + {
- + switch (type)
- + {
- + case BUY:
- + while (item.next())
- + {
- + if (player.getBuyList().addItemByItemId(item.getInt(2), item.getInt(3), item.getInt(4), item.getInt(5)) == null)
- + throw new NullPointerException("NPE at BUY of offline" + player.getName() + "(" + player.getObjectId() + ") " + item.getInt(2) + " " + item.getInt(3) + " " + item.getInt(4));
- + }
- +
- + player.getBuyList().setTitle(title);
- + break;
- + case SELL:
- + case PACKAGE_SELL:
- + while (item.next())
- + if (player.getSellList().addItem(item.getInt(2), item.getInt(3), item.getInt(4)) == null)
- + throw new NullPointerException("NPE at SELL of offline " + player.getObjectId() + " " + item.getInt(2) + " " + item.getInt(3) + " " + item.getInt(4));
- +
- + player.getSellList().setTitle(title);
- + player.getSellList().setPackaged(type == OperateType.PACKAGE_SELL);
- + break;
- + case MANUFACTURE:
- + while (item.next())
- + player.getManufactureList().add(new ManufactureItem(item.getInt(2), item.getInt(4)));
- +
- + player.getManufactureList().setStoreName(title);
- + break;
- + }
- + }
- +
- + applyEffect(player);
- + player.setOperateType(type);
- + player.restoreEffects();
- + player.broadcastUserInfo();
- + player.broadcastTitleInfo();
- +
- + count++;
- + }
- + catch (Exception e)
- + {
- +
- + LOGGER.warn("Error loading offline {}({}).", e, player.getName(), player.getObjectId());
- + player.logout(true);
- + }
- + }
- +
- + LOGGER.info("Loaded " + count + " offline.");
- +
- + try (Statement stm2 = con.createStatement())
- + {
- + stm2.execute(CLEAR_OFFLINE_TABLE);
- + stm2.execute(CLEAR_OFFLINE_TABLE_ITEMS);
- + }
- + }
- + catch (Exception e)
- + {
- + LOGGER.warn("Error while loading offline: ", e);
- + }
- + }
- +
- + protected OperateType getType(int id)
- + {
- + for (final OperateType type : OperateType.values())
- + if (type.getId() == id)
- + return type;
- +
- + LOGGER.warn("Wrong OperateType id '{}' not found.", id);
- + return null;
- + }
- +
- + protected boolean isExpired(long time)
- + {
- + final Calendar cal = Calendar.getInstance();
- + cal.setTimeInMillis(time);
- + cal.add(Calendar.DAY_OF_YEAR, Config.OFFLINE_MAX_DAYS);
- + return (cal.getTimeInMillis() <= System.currentTimeMillis());
- + }
- +
- + public boolean canBeOffline(Player player)
- + {
- + if (player.isInOlympiadMode() || player.isFestivalParticipant() || player.isInJail() || player.getBoat() != null)
- + return false;
- +
- + if (Config.OFFLINE_IN_PEACE_ZONE && !player.isInsideZone(ZoneId.PEACE))
- + return false;
- +
- + switch (player.getOperateType())
- + {
- + case SELL:
- + case PACKAGE_SELL:
- + case BUY:
- + return Config.OFFLINE_TRADE_ENABLE;
- + case MANUFACTURE:
- + return Config.OFFLINE_CRAFT_ENABLE;
- + }
- +
- + return false;
- + }
- +
- + public void applyEffect(Player player)
- + {
- + if (EFFECT != null)
- + {
- + if (EFFECT.equalsIgnoreCase("none"))
- + return;
- +
- + if (!ALLOWED_EFFECTS.contains(EFFECT))
- + return;
- +
- + player.startAbnormalEffect(AbnormalEffect.getByName(EFFECT.toLowerCase()).getMask());
- + }
- +
- + if (NAME_COLOR > 0)
- + {
- + player.getAppearance().setNameColor(NAME_COLOR);
- + player.broadcastUserInfo();
- + }
- +
- + }
- +
- + public static OfflineTable getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final OfflineTable _instance = new OfflineTable();
- + }
- +
- +}
- \ No newline at end of file
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java
- index 66ee319..a41d429 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java
- @@ -464,6 +464,8 @@
- private Door _requestedGate;
- + private long _offlineStartTime;
- +
- /**
- * Constructor of Player (use Creature constructor).
- * <ul>
- @@ -3278,6 +3280,9 @@
- public void setOperateType(OperateType type)
- {
- _operateType = type;
- +
- + if (Config.OFFLINE_DISCONNECT && type == OperateType.NONE && (getClient() == null || getClient().isDetached()))
- + deleteMe();
- }
- /**
- @@ -7380,4 +7385,14 @@
- return gms;
- }
- +
- + public long getOfflineStartTime()
- + {
- + return _offlineStartTime;
- + }
- +
- + public void setOfflineStartTime(long time)
- + {
- + _offlineStartTime = time;
- + }
- }
- \ No newline at end of file
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/trade/TradeList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/trade/TradeList.java
- index 019aa39..5542c6f 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/trade/TradeList.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/trade/TradeList.java
- @@ -190,6 +190,9 @@
- if (!item.isStackable() && count > 1)
- return null;
- + if (count == 0)
- + return null;
- +
- if ((Integer.MAX_VALUE / count) < price)
- return null;
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/GameClient.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/GameClient.java
- index 72499d0..83c8f8f 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/GameClient.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/GameClient.java
- @@ -20,11 +20,15 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.LoginServerThread;
- import net.sf.l2j.gameserver.data.sql.ClanTable;
- +import net.sf.l2j.gameserver.data.sql.OfflineTable;
- import net.sf.l2j.gameserver.data.sql.PlayerInfoTable;
- import net.sf.l2j.gameserver.enums.FloodProtector;
- +import net.sf.l2j.gameserver.enums.MessageType;
- import net.sf.l2j.gameserver.model.CharSelectSlot;
- import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.actor.Summon;
- +import net.sf.l2j.gameserver.model.olympiad.OlympiadManager;
- import net.sf.l2j.gameserver.model.pledge.Clan;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
- @@ -206,10 +210,33 @@
- ThreadPool.execute(() ->
- {
- boolean fast = true;
- - if (getPlayer() != null && !isDetached())
- + final Player player = getPlayer();
- +
- + if (player != null && !isDetached())
- {
- setDetached(true);
- - fast = !getPlayer().isInCombat() && !getPlayer().isLocked();
- + if (OfflineTable.getInstance().canBeOffline(player))
- + {
- + if (player.getParty() != null)
- + player.getParty().removePartyMember(player, MessageType.EXPELLED);
- +
- + OlympiadManager.getInstance().unRegisterNoble(player);
- +
- + final Summon summon = player.getSummon();
- + if (summon!= null)
- + {
- + summon.doRevive();
- + summon.unSummon(player);
- + }
- +
- + OfflineTable.getInstance().applyEffect(player);
- +
- + if (player.getOfflineStartTime() == 0)
- + player.setOfflineStartTime(System.currentTimeMillis());
- +
- + return;
- + }
- + fast = !player.isInCombat() && !player.isLocked();
- }
- cleanMe(fast);
- });
- @@ -581,6 +608,9 @@
- public void close(L2GameServerPacket gsp)
- {
- + if (getConnection() == null)
- + return;
- +
- getConnection().close(gsp);
- }
- @@ -773,4 +803,24 @@
- return true;
- }
- }
- +
- + public void spawnOffline(Player player)
- + {
- + player.isRunning();
- + player.sitDown();
- + player.setOnlineStatus(true, false);
- +
- + World.getInstance().addPlayer(player);
- +
- + setDetached(true);
- + player.setClient(this);
- + setPlayer(player);
- + setAccountName(player.getAccountName());
- + player.setOnlineStatus(true, true);
- + setState(GameClientState.IN_GAME);
- + player.spawnMe();
- +
- + LoginServerThread.getInstance().addClient(player.getAccountName(), this);
- + }
- +
- }
Comments
-
- Lo pude adaptar sin problemas a aCis 401, muchas gracias funciona perfecto
Add Comment
Please, Sign In to add comment