Well, there are 2 things i dont get.
First of all the logout function does not accept true or false.
Looks like this on L2PcInstance.
public void logout() {
if (getInventory().getItemByItemId(9819) != null) {
Fort fort = FortManager.getInstance().getFort(this);
if (fort != null) {
FortSiegeManager.getInstance().dropCombatFlag(this);
} else {
int slot = getInventory().getSlotFromItem(getInventory().getItemByItemId(9819));
getInventory().unEquipItemInBodySlotAndRecord(slot);
destroyItem("CombatFlag", getInventory().getItemByItemId(9819), null, true);
}
}
closeNetConnection();
}
I tried to just do this :
activeChar.closeNetConnection();
But it closes the client as well. ( Which in my understanding is the same thing )
And it looks like this :
public void closeNetConnection() {
L2GameClient client = _client;
if (client != null) {
if (client.isDetached()) {
client.cleanMe(true);
} else {
if (!client.getConnection().isClosed()) {
client.close(new LeaveWorld());
}
}
}
}