Advertisement
Bambus3k

Untitled

Jul 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 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. if int(data[1]) > 1:
  16. self.currentInfo[data[0]] = data[1]
  17.  
  18. for vnum in self.currentInfo.keys():
  19. self.AddDropItem(vnum, self.currentInfo[vnum])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement