Advertisement
Guest User

Untitled

a guest
Jan 20th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. #Find
  2. self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))
  3.  
  4. #Add
  5. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  6. self.listHighlightedSlot = []
  7.  
  8. #Find in def RefreshBagSlotWindow(self):
  9. setItemVNum = self.wndItem.SetItemSlot
  10.  
  11. #Add
  12. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  13. for i in xrange(self.wndItem.GetSlotCount()):
  14. self.wndItem.DeactivateSlot(i)
  15.  
  16. #Find in def RefreshBagSlotWindow(self):
  17. self.wndItem.RefreshSlot()
  18.  
  19. #Add Above
  20. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  21. self.__HighlightSlot_Refresh()
  22.  
  23. #Find in def OverInItem(self, overSlotPos):
  24. overSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
  25. self.wndItem.SetUsableItem(False)
  26.  
  27. #Add
  28. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  29. self.DelHighlightSlot(overSlotPos)
  30.  
  31. #Find
  32. def OnMoveWindow(self, x, y):
  33. # print("Inventory Global Pos : ", self.GetGlobalPosition())
  34. if self.wndBelt:
  35. # print("Belt Global Pos : ", self.wndBelt.GetGlobalPosition())
  36. self.wndBelt.AdjustPositionAndSize()
  37.  
  38. #Add
  39. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  40. def ActivateSlot(self, slotindex, type):
  41. if type == wndMgr.HILIGHTSLOT_MAX:
  42. return
  43.  
  44. def DeactivateSlot(self, slotindex, type):
  45. if type == wndMgr.HILIGHTSLOT_MAX:
  46. return
  47.  
  48. def __HighlightSlot_Refresh(self):
  49. for i in xrange(self.wndItem.GetSlotCount()):
  50. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  51. if slotNumber in self.listHighlightedSlot:
  52. self.wndItem.ActivateSlot(i)
  53.  
  54. def __HighlightSlot_Clear(self):
  55. for i in xrange(self.wndItem.GetSlotCount()):
  56. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  57. if slotNumber in self.listHighlightedSlot:
  58. self.wndItem.DeactivateSlot(i)
  59. self.listHighlightedSlot.remove(slotNumber)
  60.  
  61. def HighlightSlot(self, slot):
  62. if slot>player.INVENTORY_PAGE_SIZE*player.INVENTORY_PAGE_COUNT:
  63. return
  64.  
  65. if not slot in self.listHighlightedSlot:
  66. self.listHighlightedSlot.append (slot)
  67.  
  68. def DelHighlightSlot(self, inventorylocalslot):
  69. if inventorylocalslot in self.listHighlightedSlot:
  70. if inventorylocalslot >= player.INVENTORY_PAGE_SIZE:
  71. self.wndItem.DeactivateSlot(inventorylocalslot - (self.inventoryPageIndex * player.INVENTORY_PAGE_SIZE) )
  72. else:
  73. self.wndItem.DeactivateSlot(inventorylocalslot)
  74.  
  75. self.listHighlightedSlot.remove(inventorylocalslot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement