Addition of missing isInOfflineMode method.
This commit is contained in:
@@ -286,7 +286,7 @@ public class LoginServerThread extends Thread
|
||||
st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
|
||||
}
|
||||
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())
|
||||
{
|
||||
sendPacket(new PlayerInGame(playerList));
|
||||
|
@@ -914,11 +914,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public String getAccountName()
|
||||
{
|
||||
if (getClient() == null)
|
||||
{
|
||||
return getAccountNamePlayer();
|
||||
}
|
||||
return getClient().getAccountName();
|
||||
return getClient() == null ? getAccountNamePlayer() : getClient().getAccountName();
|
||||
}
|
||||
|
||||
public String getAccountNamePlayer()
|
||||
@@ -4269,22 +4265,6 @@ public final class L2PcInstance extends L2Playable
|
||||
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.
|
||||
*/
|
||||
@@ -7406,13 +7386,25 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public int isOnlineInt()
|
||||
{
|
||||
if (_isOnline && (getClient() != null))
|
||||
if (_isOnline && (_client != null))
|
||||
{
|
||||
return getClient().isDetached() ? 2 : 1;
|
||||
return _client.isDetached() ? 2 : 1;
|
||||
}
|
||||
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
|
||||
public Skill addSkill(Skill newSkill)
|
||||
{
|
||||
|
@@ -121,7 +121,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
||||
|
||||
LoginServerThread.getInstance().sendLogout(getAccountName());
|
||||
|
||||
if ((_activeChar == null) || !_activeChar.isInStoreMode())
|
||||
if ((_activeChar == null) || !_activeChar.isInOfflineMode())
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).onDisconnection();
|
||||
|
Reference in New Issue
Block a user