Guest User

Untitled

a guest
Oct 14th, 2016
629
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.52 KB | None | 0 0
  1.     def GetItemListFromServer(self, row, seller_name, item_vnum, item_count, item_refine, item_price, item_level, socket0, socket1, socket2, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, item_pos):
  2.         item.SelectItem(int(item_vnum))
  3.         self.ItemList.append([row, seller_name, item.GetItemName(), item_vnum, item_count, item_refine, item_price, item_level, socket0, socket1, socket2, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, item_pos])
  4.         if self.ItemCount < 1:
  5.             dbg.TraceError(str(self.ItemList))
  6.         self.ItemCount += 1
  7.  
  8.     def CreateGUIList(self):
  9.         if self.ItemCount == 0:
  10.             self._Notification = _ui().Popup(self.LC_TEXT["EMPTYITEMLIST"], None, None)
  11.             return
  12.  
  13.         sorted(self.ItemList, key=lambda x: x[6])
  14.         range_control_value = len(self.List_Button_Objects)
  15.  
  16.         NewList = []
  17.         for x in self.ItemList:
  18.  
  19.             range_control_value += 1
  20.             if range_control_value == 12:
  21.                 range_control_value = 1
  22.  
  23.             range_sequence = int(range_control_value)
  24.             row = int(x[0])
  25.             item_name = str(x[2])
  26.             item_count = str(x[4])
  27.             item_price = str(x[6])
  28.             seller_name = str(x[1])
  29.             item_vnum = int(x[3])
  30.             item_pos = int(x[-1])
  31.             socket_list = [int(x[y]) for y in xrange(8, 11)]
  32.             attr_list =  [(int(x[a]), int(x[a+1])) for a in xrange(11, 25, 2)]
  33.  
  34.             #dbg.TraceError("%d %d %s %s %s %s %d %d %s %s" % (row, range_sequence, item_name, item_count, item_price, seller_name, item_vnum, item_pos, socket_list, attr_list))
  35.             NewList.append([row, range_sequence, item_name, item_count, item_price, seller_name, item_vnum, item_pos, socket_list, attr_list])
  36.             #self.__RecvListObject(row, range_sequence, item_name, item_count, item_price, seller_name, item_vnum, item_pos, socket_list, attr_list)
  37.  
  38.             #if self.ItemList.index(x) >= 11:
  39.             #   self.List_Button_Objects["%d_line_button" % self.ItemList.index(x)].Hide()
  40.  
  41.         # Aq ymiri. Düz listeleyince tooltip mouse'un altında açılırsa resizeable buttonlarn altında kalıyor
  42.         # Tersine listelendi, mouse'un üzerinde açılan tooltiplerin altta kalması sağlandı ve üstte açılması engellendi
  43.         for x in reversed(NewList):
  44.             self.__RecvListObject(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9])
  45.  
  46.         self.BuyButton.SetUp(), self.BuyButton.Enable()
  47.         if self.ItemCount > 11:
  48.             self.page_slot.Show(), self.next_button.Show(), self.last_next_button.Show()
Add Comment
Please, Sign In to add comment