Esempio n. 1
0
	def SelectItemSlot(self, selectedSlotPos):

		if mouseModule.mouseController.isAttached():

			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MALL_CANNOT_INSERT)
			mouseModule.mouseController.DeattachObject()

		else:

			curCursorNum = app.GetCursor()
			selectedItemID = safebox.GetMallItemID(selectedSlotPos)
			mouseModule.mouseController.AttachObject(self, fgGHGjjFHJghjfFG1545gGG.SLOT_TYPE_MALL, selectedSlotPos, selectedItemID)
			snd.PlaySound("sound/ui/pick.wav")
    def SelectItemSlot(self, selectedSlotPos):
        items = constInfo.GUILDSTORAGE["slots"]["TAB" + str(self.tab)]
        curCursorNum = app.GetCursor()
        selectedSlotPos = selectedSlotPos
        selectedItemID = items[selectedSlotPos][0]
        itemCount = items[selectedSlotPos][1]

        type = fgGHGjjFHJghjfFG1545gGG.SLOT_TYPE_PRIVATE_SHOP
        mouseModule.mouseController.AttachObject(self, type, selectedSlotPos,
                                                 selectedItemID, itemCount)
        self.temporaryTab = self.tab
        mouseModule.mouseController.SetCallBack(
            "INVENTORY", ui.__mem_func__(self.DropToInventory))
        snd.PlaySound("sound/ui/pick.wav")
Esempio n. 3
0
	def SelectItemSlot(self, selectedSlotPos):
		if (constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1):
			return
			
		isAttached = mouseModule.mouseController.isAttached()
		if (not isAttached):
			curCursorNum = app.GetCursor()
			if (app.BUY == curCursorNum):
				net.SendOfflineShopBuyPacket(selectedSlotPos)
			else:
				selectedItemID = shop.GetOfflineShopItemID(selectedSlotPos)
				itemCount = shop.GetOfflineShopItemCount(selectedSlotPos)
				
				type = player.SLOT_TYPE_OFFLINE_SHOP
				mouseModule.mouseController.AttachObject(self, type, selectedSlotPos, selectedItemID, itemCount)
				mouseModule.mouseController.SetCallBack("INVENTORY", ui.__mem_func__(self.DropToInventory))
				snd.PlaySound("sound/ui/pick.wav")
Esempio n. 4
0
	def UseItemSlot(self, slotIndex):
		curCursorNum = app.GetCursor()
		if app.SELL == curCursorNum:
			return

		if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS():
			return

		slotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(slotIndex)

		if app.ENABLE_DRAGON_SOUL_SYSTEM:
			if self.wndDragonSoulRefine.IsShow():
				self.wndDragonSoulRefine.AutoSetItem((player.INVENTORY, slotIndex), 1)
				return

		self.__UseItem(slotIndex)
		mouseModule.mouseController.DeattachObject()
		self.OverOutItem()
Esempio n. 5
0
    def SelectItemSlot(self, selectedSlotPos):

        selectedSlotPos = self.__LocalPosToGlobalPos(selectedSlotPos)

        if mouseModule.mouseController.isAttached():

            attachedSlotType = mouseModule.mouseController.GetAttachedType()

            if player.SLOT_TYPE_INVENTORY == attachedSlotType:

                if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex(
                ):
                    net.SendSafeboxSaveMoneyPacket(
                        mouseModule.mouseController.GetAttachedItemCount())
                    snd.PlaySound("sound/ui/money.wav")

                else:
                    attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber(
                    )
                    #net.SendSafeboxCheckinPacket(attachedSlotPos, selectedSlotPos)
                    #snd.PlaySound("sound/ui/drop.wav")

            mouseModule.mouseController.DeattachObject()

        else:

            curCursorNum = app.GetCursor()
            if app.SELL == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO,
                                localeInfo.SAFEBOX_SELL_DISABLE_SAFEITEM)

            elif app.BUY == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)

            else:
                selectedItemID = safebox.GetItemID(selectedSlotPos)
                mouseModule.mouseController.AttachObject(
                    self, player.SLOT_TYPE_SAFEBOX, selectedSlotPos,
                    selectedItemID)
                snd.PlaySound("sound/ui/pick.wav")
Esempio n. 6
0
    def SelectItemSlot(self, selectedSlotPos):
        import constInfo, chat
        if constInfo.BlockItemsSystem["Block"] == 1:
            chat.AppendChat(1, "Sicherheitssystem Aktiviert.")
            return
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return

        isAttached = mouseModule.mouseController.isAttached()
        selectedSlotPos = self.__GetRealIndex(selectedSlotPos)
        if isAttached:
            self.SellAttachedItem()

        else:

            if True == shop.IsMainPlayerPrivateShop():
                return

            curCursorNum = app.GetCursor()
            if app.BUY == curCursorNum:
                self.AskBuyItem(selectedSlotPos)

            elif app.SELL == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)

            else:
                selectedItemID = shop.GetItemID(selectedSlotPos)
                itemCount = shop.GetItemCount(selectedSlotPos)

                type = fgGHGjjFHJghjfFG1545gGG.SLOT_TYPE_SHOP
                if shop.IsPrivateShop():
                    type = fgGHGjjFHJghjfFG1545gGG.SLOT_TYPE_PRIVATE_SHOP

                mouseModule.mouseController.AttachObject(
                    self, type, selectedSlotPos, selectedItemID, itemCount)
                mouseModule.mouseController.SetCallBack(
                    "INVENTORY", ui.__mem_func__(self.DropToInventory))
                snd.PlaySound("sound/ui/pick.wav")
Esempio n. 7
0
    def SelectItemSlot(self, itemSlotIndex):
        if constInfo.GET_ITEM_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(
            )

            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, localeInfo.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(localeInfo.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,
                                    localeInfo.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")