if (player.isFlying())
{
player.removeSkill(SkillTable.getInstance().getInfo(4289, 1));
}
L2GameClient client = getClient();
// detach the client from the char so that the connection isnt closed in the deleteMe
player.setClient(null);
TvTEvent.onLogout(player);
RegionBBSManager.getInstance().changeCommunityBoard();
// removing player from the world
player.deleteMe();
L2GameClient.saveCharToDisk(client.getActiveChar());
getClient().setActiveChar(null);
// return the client to the authed status
client.setState(GameClientState.AUTHED);
RestartResponse response = new RestartResponse();
sendPacket(response);
// send char list
CharSelectInfo cl = new CharSelectInfo(client.getAccountName(),
client.getSessionId().playOkID1);
sendPacket(cl);
client.setCharSelection(cl.getCharInfo());
}