private void HandleDelete(LoginSession session, PacketReader packet) { long deleteCharId = packet.ReadLong(); if (!DatabaseManager.DeleteCharacter(DatabaseManager.GetCharacter(deleteCharId))) { throw new ArgumentException("Could not delete character"); } session.Send(CharacterListPacket.DeleteCharacter(deleteCharId)); Logger.Info($"Deleting {deleteCharId}"); }
private void HandleDelete(LoginSession session, PacketReader packet) { long characterId = packet.ReadLong(); if (!DatabaseManager.Characters.SetCharacterDeleted(characterId)) { Logger.Error("Could not delete character"); return; } session.Send(CharacterListPacket.DeleteCharacter(characterId)); Logger.Info($"Character id {characterId} deleted!"); }