Advertisement
Bambus3k

Untitled

Jul 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. def UpdateItems(self):
  2. #self.currentInfo = {}
  3. self.slots = [0] * (self.gridSize[0]*self.gridSize[1])
  4.  
  5. mobVnum = nonplayer.GetVnumByVID(self.vid)
  6. mobDropTable = constInfo.mobDropTable
  7.  
  8. table = mobDropTable.get(mobVnum)
  9. if (table):
  10. for _slot in xrange(self.gridSize[0] * self.gridSize[1]):
  11. self.gridSlot.ClearSlot(_slot)
  12. self.gridSlot.RefreshSlot()
  13.  
  14. for data in table:
  15. #self.currentInfo[data[0]] = data[1]
  16. vnum = int(data[1])
  17. chat.AppendChat(chat.CHAT_TYPE_INFO, str(vnum))
  18. if vnum > 10:
  19. self.AddDropItem(vnum, vnum)
  20.  
  21. #for vnum in sorted(self.currentInfo.keys()):
  22. # self.AddDropItem(vnum, self.currentInfo[vnum])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement