protected override void OnDisconnected() { if (account != null) { if (account.characters != null) { CharacterFunctions.quitGameWorld(this); foreach (Character character in account.characters.Values) { character.Save(); } account.clearCharacters(); } } OutPacket wayToHell = new OutPacket(9); wayToHell.WriteInt(9); wayToHell.WriteShort(3); wayToHell.WriteRepeatedByte(6, 3); // just for lulz WriteRawPacket(wayToHell.ToArray()); if (m_processor != null) { Logger.WriteLog(Logger.LogTypes.Disconnect, "[{0}] Client {1} disconnected.", m_processor.Label, Label); m_deathAction(this); } }
public static void ReturnToSelection(MartialClient c, InPacket p) { if (c.getAccount().activeCharacter == null) { Logger.LogCheat(Logger.HackTypes.CharacterSelection, c, "Hooked returnToSelection with null of activeCharacter"); c.Close(); return; } c.getAccount().activeCharacter.getInventory().updateInv(); c.getAccount().activeCharacter.getInventory().saveInv(); c.getAccount().activeCharacter.getCommunity().relistCommunities(); CharacterFunctions.quitGameWorld(c); c.getAccount().relistCharacters(); c.WriteRawPacket(LoginPacketCreator.initCharacters(c.getAccount(), true)); }
public static void Quit(MartialClient c, InPacket p) { CharacterFunctions.quitGameWorld(c); c.WriteRawPacket(new byte[] { (byte)0x09, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x03, (byte)0x00, (byte)0x64, (byte)0x00, (byte)0x00 }); c.Close(); }