Addition of missing isInOfflineMode method.

This commit is contained in:
MobiusDev
2018-06-18 23:13:58 +00:00
parent 88f35f9e87
commit 304e82bba5
22 changed files with 121 additions and 177 deletions
@@ -284,7 +284,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -906,11 +906,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4261,22 +4257,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7397,13 +7377,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -284,7 +284,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -912,11 +912,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4267,22 +4263,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7404,13 +7384,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -914,11 +914,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4269,22 +4265,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7406,13 +7386,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -925,11 +925,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4260,22 +4256,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7403,13 +7383,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -7565,8 +7565,8 @@ public final class L2PcInstance extends L2Playable
/** /**
* Verifies if the player is in offline mode.<br> * Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br> * The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abrouptaly disconnected from server.<br> * Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only avaiable by enabling the offline shop mod. * Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise * @return {@code true} if the player is in offline mode, {@code false} otherwise
*/ */
public boolean isInOfflineMode() public boolean isInOfflineMode()
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -908,11 +908,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4237,22 +4233,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7369,13 +7349,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -908,11 +908,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4237,22 +4233,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7369,13 +7349,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL); st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
} }
sendPacket(st); sendPacket(st);
final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInStoreMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList()); final List<String> playerList = L2World.getInstance().getPlayers().stream().filter(player -> !player.isInOfflineMode()).map(L2PcInstance::getAccountName).collect(Collectors.toList());
if (!playerList.isEmpty()) if (!playerList.isEmpty())
{ {
sendPacket(new PlayerInGame(playerList)); sendPacket(new PlayerInGame(playerList));
@@ -908,11 +908,7 @@ public final class L2PcInstance extends L2Playable
public String getAccountName() public String getAccountName()
{ {
if (getClient() == null) return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
{
return getAccountNamePlayer();
}
return getClient().getAccountName();
} }
public String getAccountNamePlayer() public String getAccountNamePlayer()
@@ -4237,22 +4233,6 @@ public final class L2PcInstance extends L2Playable
return getClan().getAllyCrestId(); return getClan().getAllyCrestId();
} }
//@formatter:off
/*
public void queryGameGuard()
{
if (getClient() != null)
{
getClient().setGameGuardOk(false);
sendPacket(GameGuardQuery.STATIC_PACKET);
}
if (Config.GAMEGUARD_ENFORCE)
{
ThreadPoolManager.scheduleGeneral(new GameGuardCheckTask(this), 30 * 1000);
}
}*/
//@formatter:on
/** /**
* Send a Server->Client packet StatusUpdate to the L2PcInstance. * Send a Server->Client packet StatusUpdate to the L2PcInstance.
*/ */
@@ -7371,13 +7351,25 @@ public final class L2PcInstance extends L2Playable
public int isOnlineInt() public int isOnlineInt()
{ {
if (_isOnline && (getClient() != null)) if (_isOnline && (_client != null))
{ {
return getClient().isDetached() ? 2 : 1; return _client.isDetached() ? 2 : 1;
} }
return 0; return 0;
} }
/**
* Verifies if the player is in offline mode.<br>
* The offline mode may happen for different reasons:<br>
* Abnormally: Player gets abruptly disconnected from server.<br>
* Normally: The player gets into offline shop mode, only available by enabling the offline shop mod.
* @return {@code true} if the player is in offline mode, {@code false} otherwise
*/
public boolean isInOfflineMode()
{
return (_client == null) || _client.isDetached();
}
@Override @Override
public Skill addSkill(Skill newSkill) public Skill addSkill(Skill newSkill)
{ {
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
LoginServerThread.getInstance().sendLogout(getAccountName()); LoginServerThread.getInstance().sendLogout(getAccountName());
if ((_activeChar == null) || !_activeChar.isInStoreMode()) if ((_activeChar == null) || !_activeChar.isInOfflineMode())
{ {
IdFactory.getInstance().releaseId(getObjectId()); IdFactory.getInstance().releaseId(getObjectId());
Disconnection.of(this).onDisconnection(); Disconnection.of(this).onDisconnection();