Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def SelectItemSlot(self, itemSlotIndex):
- if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
- return
- itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex)
- if mouseModule.mouseController.isAttached():
- attachedSlotType = mouseModule.mouseController.GetAttachedType()
- attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
- attachedItemVID = mouseModule.mouseController.GetAttachedItemIndex()
- itemVnum = player.GetItemIndex(itemSlotIndex)
- item.SelectItem(itemVnum)
- itemType = item.GetItemType()
- itemSubType = item.GetItemSubType()
- nook = 0
- if itemType == 2 and itemSubType != 0:
- nook = 1
- if attachedItemVID == 25100 and itemType >= 1 and itemType <= 2 and nook != 1:
- x = 0
- Slots = [player.GetItemMetinSocket(itemSlotIndex, i) for i in xrange(player.METIN_SOCKET_MAX_NUM)]
- for i in xrange(player.METIN_SOCKET_MAX_NUM):
- if Slots[i] > 20000:
- x += 1
- if x > 0:
- self.uiSpiritStone = uiSpiritStone.Wyciaganie()
- self.uiSpiritStone.SetData(itemSlotIndex)
- self.uiSpiritStone.SetCenterPosition()
- self.uiSpiritStone.Show_NOW()
- mouseModule.mouseController.DeattachObject()
- return
- if x == 0:
- chat.AppendChat(chat.CHAT_TYPE_INFO, "[Wyciaganie Kamieni Dusz] Ten przedmiot nie posiada Kamieni Dusz!")
- mouseModule.mouseController.DeattachObject()
- return
- if player.SLOT_TYPE_INVENTORY == attachedSlotType:
- self.__DropSrcItemToDestItemInInventory(attachedItemVID, attachedSlotPos, itemSlotIndex)
- mouseModule.mouseController.DeattachObject()
- else:
- curCursorNum = app.GetCursor()
- if app.SELL == curCursorNum:
- self.__SellItem(itemSlotIndex)
- elif app.BUY == curCursorNum:
- chat.AppendChat(chat.CHAT_TYPE_INFO, locale.SHOP_BUY_INFO)
- elif app.IsPressed(app.DIK_LALT):
- link = player.GetItemLink(itemSlotIndex)
- ime.PasteString(link)
- elif app.IsPressed(app.DIK_LSHIFT):
- itemCount = player.GetItemCount(itemSlotIndex)
- if itemCount > 1:
- self.dlgPickMoney.SetTitleName(locale.PICK_ITEM_TITLE)
- self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))
- self.dlgPickMoney.Open(itemCount)
- self.dlgPickMoney.itemGlobalSlotIndex = itemSlotIndex
- #else:
- #selectedItemVNum = player.GetItemIndex(itemSlotIndex)
- #mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_INVENTORY, itemSlotIndex, selectedItemVNum)
- elif app.IsPressed(app.DIK_LCONTROL):
- itemIndex = player.GetItemIndex(itemSlotIndex)
- if TRUE == item.CanAddToQuickSlotItem(itemIndex):
- player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_INVENTORY, itemSlotIndex)
- else:
- chat.AppendChat(chat.CHAT_TYPE_INFO, locale.QUICKSLOT_REGISTER_DISABLE_ITEM)
- else:
- selectedItemVNum = player.GetItemIndex(itemSlotIndex)
- itemCount = player.GetItemCount(itemSlotIndex)
- mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
- if self.__IsUsableItemToItem(selectedItemVNum, itemSlotIndex):
- self.wndItem.SetUseMode(TRUE)
- else:
- self.wndItem.SetUseMode(FALSE)
- snd.PlaySound("sound/ui/pick.wav")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement