internal static void OnC2SAskLogin(ByteBuffer buffer, Connection connection) { var incPacket = new AuthPackets.C2SAskLogin(buffer, connection); var success = DatabaseFunctions.UserLogin(incPacket.Username, incPacket.DecPassword, out var userID); if (success) { //ClientManager.GetClient(connection).UserId = userID; ClientManager.GetClient(connection).UserId = 33; ClientManager.GetClient(connection).setAtZone(atZone.afterLogin); } var outPacket = new AuthPackets.S2CAnsLogin(success); outPacket.Send(connection); }
private static void OnC2SAskLogin(ByteBuffer buffer, Connection connection) { var incPacket = new AuthPackets.C2SAskLogin(buffer, connection); DBConnection.connection.SendObject("UserLogin", new[] { incPacket.Username, incPacket.DecPassword, connection.ConnectionInfo.NetworkIdentifier.ToString() }); }