Esempio n. 1
0
    def OpenPickMoneyDialog(self):

        if mouseModule.mouseController.isAttached():

            attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber(
            )
            if player.SLOT_TYPE_SAFEBOX == mouseModule.mouseController.GetAttachedType(
            ):

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

            mouseModule.mouseController.DeattachObject()

        else:
            curMoney = player.GetElk()

            if curMoney <= 0:
                return

            self.dlgPickMoney.SetTitleName(localeInfo.PICK_MONEY_TITLE)
            self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney))
            self.dlgPickMoney.Open(curMoney)
            self.dlgPickMoney.SetMax(7)  # 인벤토리 990000 제한 버그 수정
Esempio n. 2
0
    def SelectEmptySlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return

        selectedSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(
            selectedSlotPos)

        if mouseModule.mouseController.isAttached():

            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber(
            )
            attachedItemCount = mouseModule.mouseController.GetAttachedItemCount(
            )
            attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex(
            )

            if player.SLOT_TYPE_INVENTORY == attachedSlotType:
                itemCount = player.GetItemCount(attachedSlotPos)
                attachedCount = mouseModule.mouseController.GetAttachedItemCount(
                )
                self.__SendMoveItemPacket(attachedSlotPos, selectedSlotPos,
                                          attachedCount)

                if item.IsRefineScroll(attachedItemIndex):
                    self.wndItem.SetUseMode(False)

            elif player.SLOT_TYPE_PRIVATE_SHOP == attachedSlotType:
                mouseModule.mouseController.RunCallBack("INVENTORY")

            elif player.SLOT_TYPE_OFFLINE_SHOP == attachedSlotType:
                mouseModule.mouseController.RunCallBack("INVENTORY")

            elif player.SLOT_TYPE_SHOP == attachedSlotType:
                net.SendShopBuyPacket(attachedSlotPos)

            elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:

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

                else:
                    net.SendSafeboxCheckoutPacket(attachedSlotPos,
                                                  selectedSlotPos)

            elif player.SLOT_TYPE_MALL == attachedSlotType:
                net.SendMallCheckoutPacket(attachedSlotPos, selectedSlotPos)

            mouseModule.mouseController.DeattachObject()
	def SelectEmptySlot(self, selectedSlotPos):
		if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
			return

		selectedSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORY, selectedSlotPos)
		print "__debug", selectedSlotPos
		if mouseModule.mouseController.isAttached():

			attachedSlotType = mouseModule.mouseController.GetAttachedType()
			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
			attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
			attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()

			attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
			if player.SLOT_TYPE_PRIVATE_SHOP == attachedSlotType:
				mouseModule.mouseController.RunCallBack("INVENTORY")

			elif player.SLOT_TYPE_SHOP == attachedSlotType:
				net.SendShopBuyPacket(attachedSlotPos)

			elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:
				if player.ITEM_MONEY == attachedItemIndex:
					net.SendSafeboxWithdrawMoneyPacket(mouseModule.mouseController.GetAttachedItemCount())
					snd.PlaySound("sound/ui/money.wav")

				else:
					net.SendSafeboxCheckoutPacket(attachedSlotPos, player.DRAGON_SOUL_INVENTORY, selectedSlotPos)

			elif player.SLOT_TYPE_MALL == attachedSlotType:
				net.SendMallCheckoutPacket(attachedSlotPos, player.DRAGON_SOUL_INVENTORY, selectedSlotPos)

			elif player.RESERVED_WINDOW != attachedInvenType:
				if player.IsDSEquipmentSlot(attachedInvenType, attachedSlotPos):
					srcItemPos = (attachedInvenType, attachedSlotPos)
					dstItemPos = (player.DRAGON_SOUL_INVENTORY, selectedSlotPos)
					self.__OpenQuestionDialog(FALSE, srcItemPos, dstItemPos)
				else:
					itemCount = player.GetItemCount(attachedInvenType, attachedSlotPos)
					attachedCount = mouseModule.mouseController.GetAttachedItemCount()
 
					self.__SendMoveItemPacket(attachedInvenType, attachedSlotPos, player.DRAGON_SOUL_INVENTORY, selectedSlotPos, attachedCount)

			mouseModule.mouseController.DeattachObject()