diff --git a/packets.py b/packets.py index 67d6416..523c3fb 100644 --- a/packets.py +++ b/packets.py @@ -128,9 +128,9 @@ def handle_packets(caller, total, record=True): caller.parent.ooclogin.setText("Lo&gin") caller.OOC_Log.emit("%s" % (statusStrings[status+1])) - elif header == "CHECK": #ping - pingafter = time.time() - caller.parent.gotPing.emit(int((pingafter - pingbefore)*1000)) + # elif header == "CHECK": #ping + # pingafter = time.time() + # caller.parent.gotPing.emit(int((pingafter - pingbefore)*1000)) elif header == 'DONE': caller.showCharSelect.emit() @@ -162,7 +162,7 @@ def handle_packets(caller, total, record=True): areaitem = QtGui.QListWidgetItem() caller.parent.areaitems.addItem(areaitem) - for j in range(len(network)): + for j in range(4): if j != kind: caller.parent.areas[j].append("") @@ -171,21 +171,7 @@ def handle_packets(caller, total, record=True): caller.parent.allMusic() - for i in range(caller.parent.areas_len): - area_players = caller.parent.areas[0][i] - area_status = caller.parent.areas[1][i].title() - area_cm = caller.parent.areas[2][i].decode('utf-8') - area_locked = caller.parent.areas[3][i].title() - area_name = caller.parent.areas[4][i].decode('utf-8') - if area_status == "Casing": - caller.parent.areaitems.item(i).setText("%s\n%s | %s\n%s users | %s" % (area_name, area_status, area_cm, area_players, area_locked)) - else: - caller.parent.areaitems.item(i).setText("%s\n%s\n%s users | %s" % (area_name, area_status, area_players, area_locked)) - - if area_locked == "Locked": - caller.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "lock.png")) - else: - caller.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "house.png")) + caller.parent.update_area_list() elif header == 'TI': del network[0]