Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. if app.WJ_ENABLE_TRADABLE_ICON:
  2. def CantTradableItem(self, destSlotIndex, srcSlotIndex):
  3. if True == exchange.GetAcceptFromTarget():
  4. return
  5.  
  6. itemInvenPage = srcSlotIndex / player.INVENTORY_PAGE_SIZE
  7. localSlotPos = srcSlotIndex - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
  8. self.lockedItems[destSlotIndex] = (itemInvenPage, localSlotPos)
  9.  
  10. if self.wndInventory.GetInventoryPageIndex() == itemInvenPage and self.IsShow():
  11. self.wndInventory.wndItem.SetCantMouseEventSlot(localSlotPos)
  12.  
  13. def RefreshLockedSlot(self):
  14. if self.wndInventory:
  15. for exchangePos, (itemInvenPage, itemSlotPos) in self.lockedItems.items():
  16. if self.wndInventory.GetInventoryPageIndex() == itemInvenPage:
  17. self.wndInventory.wndItem.SetCantMouseEventSlot(itemSlotPos)
  18.  
  19. self.wndInventory.wndItem.RefreshSlot()
  20.  
  21. def BindInterface(self, interface):
  22. self.interface = interface
  23.  
  24. def SetInven(self, wndInventory):
  25. from _weakref import proxy
  26. self.wndInventory = proxy(wndInventory)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement