Hello guys !!
Bitte melden Sie sich an, um dieses Medienelement zu sehen.
- def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
- # PRIVATESHOP_DISABLE_ITEM_DROP
- if uiPrivateShopBuilder.IsBuildingPrivateShop():
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
- return
- # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
- if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
- self.stream.popupWindow.Close()
- self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
- else:
- if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedType or player.SLOT_TYPE_STONE_INVENTORY == attachedType or player.SLOT_TYPE_BOX_INVENTORY == attachedType or player.SLOT_TYPE_EFSUN_INVENTORY == attachedType or player.SLOT_TYPE_CICEK_INVENTORY == attachedType:
- dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
- item.SelectItem(dropItemIndex)
- dropItemName = item.GetItemName()
- ## Question Text
- itemPrice = player.GetISellItemPrice(attachedItemSlotPos)
- questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount)
- ## Dialog
- itemDropQuestionDialog = uiCommon.QuestionDialogItem()
- itemDropQuestionDialog.SetText(questionText)
- itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
- itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
- itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
- itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
- itemDropQuestionDialog.Open()
- itemDropQuestionDialog.dropType = attachedType
- itemDropQuestionDialog.dropNumber = attachedItemSlotPos
- itemDropQuestionDialog.dropCount = attachedItemCount
- self.itemDropQuestionDialog = itemDropQuestionDialog
- constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
- elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
- dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
- item.SelectItem(dropItemIndex)
- dropItemName = item.GetItemName()
- ## Question Text
- itemPrice = player.GetISellItemPrice(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
- questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount)
- ## Dialog
- itemDropQuestionDialog = uiCommon.QuestionDialogItem()
- itemDropQuestionDialog.SetText(questionText)
- itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
- itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
- itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
- itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
- itemDropQuestionDialog.Open()
- itemDropQuestionDialog.dropType = attachedType
- itemDropQuestionDialog.dropNumber = attachedItemSlotPos
- itemDropQuestionDialog.dropCount = attachedItemCount
- self.itemDropQuestionDialog = itemDropQuestionDialog
- constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
- def RequestDropItem(self, answer):
- if not self.itemDropQuestionDialog:
- return
- if answer:
- dropType = self.itemDropQuestionDialog.dropType
- dropCount = self.itemDropQuestionDialog.dropCount
- dropNumber = self.itemDropQuestionDialog.dropNumber
- if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_BOX_INVENTORY == dropType or player.SLOT_TYPE_EFSUN_INVENTORY == dropType or player.SLOT_TYPE_CICEK_INVENTORY == dropType:
- if dropNumber == player.ITEM_MONEY:
- net.SendGoldDropPacketNew(dropCount)
- snd.PlaySound("sound/ui/money.wav")
- elif dropNumber == player.ITEM_CHEQUE:
- net.SendChequeDropPacketNew(dropCount)
- snd.PlaySound("sound/ui/money.wav")
- else:
- # PRIVATESHOP_DISABLE_ITEM_DROP
- self.__SendDropItemPacket(dropNumber, dropCount)
- # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
- elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
- # PRIVATESHOP_DISABLE_ITEM_DROP
- self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
- # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
- elif app.WJ_SPLIT_INVENTORY_SYSTEM:
- if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_BOX_INVENTORY == dropType or player.SLOT_TYPE_EFSUN_INVENTORY == dropType or player.SLOT_TYPE_CICEK_INVENTORY == dropType:
- self.__SendDropItemPacket(dropNumber, dropCount, player.SLOT_TYPE_SKILL_BOOK_INVENTORY or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY or player.SLOT_TYPE_STONE_INVENTORY or player.SLOT_TYPE_BOX_INVENTORY or player.SLOT_TYPE_EFSUN_INVENTORY or player.SLOT_TYPE_CICEK_INVENTORY)
- self.itemDropQuestionDialog.Close()
- self.itemDropQuestionDialog = None
- constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
- def RequestDestroyItem(self, answer):
- if not self.itemDropQuestionDialog:
- return
- if answer:
- dropType = self.itemDropQuestionDialog.dropType
- dropCount = self.itemDropQuestionDialog.dropCount
- dropNumber = self.itemDropQuestionDialog.dropNumber
- if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_BOX_INVENTORY == dropType or player.SLOT_TYPE_EFSUN_INVENTORY == dropType or player.SLOT_TYPE_CICEK_INVENTORY == dropType:
- if dropNumber == player.ITEM_MONEY:
- return
- else:
- self.__SendDestroyItemPacket(dropNumber)
- elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
- self.__SendDestroyItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
- self.itemDropQuestionDialog.Close()
- self.itemDropQuestionDialog = None
- constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
- def RequestSellItem(self, answer):
- if not self.itemDropQuestionDialog:
- return
- if answer:
- dropType = self.itemDropQuestionDialog.dropType
- dropCount = self.itemDropQuestionDialog.dropCount
- dropNumber = self.itemDropQuestionDialog.dropNumber
- if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_BOX_INVENTORY == dropType or player.SLOT_TYPE_EFSUN_INVENTORY == dropType or player.SLOT_TYPE_CICEK_INVENTORY == dropType:
- if dropNumber == player.ITEM_MONEY:
- return
- else:
- self.__SendSellItemPacket(dropNumber)
- elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
- self.__SendSellItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
- self.itemDropQuestionDialog.Close()
- self.itemDropQuestionDialog = None
- constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
- # PRIVATESHOP_DISABLE_ITEM_DROP
- def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
- if uiPrivateShopBuilder.IsBuildingPrivateShop():
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
- return
- if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- if (uiOfflineShop.IsEditingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
- # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
- def __SendDestroyItemPacket(self, itemVNum, itemInvenType = player.INVENTORY):
- if uiPrivateShopBuilder.IsBuildingPrivateShop():
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
- return
- if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- if (uiOfflineShop.IsEditingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- net.SendItemDestroyPacket(itemVNum)
- def __SendSellItemPacket(self, itemVNum, itemInvenTyoe = player.INVENTORY):
- if uiPrivateShopBuilder.IsBuildingPrivateShop():
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
- return
- if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- if (uiOfflineShop.IsEditingOfflineShop()):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
- return
- net.SendItemSellPacket(itemVNum)
1205 12:27:15264 :: Traceback (most recent call last):
1205 12:27:15265 :: File "ui.py", line 1584, in CallEvent
1205 12:27:15266 :: File "game.py", line 1997, in <lambda>
1205 12:27:15267 :: File "game.py", line 2054, in RequestDestroyItem
1205 12:27:15267 :: TypeError
1205 12:27:15267 :: :
1205 12:27:15267 :: __SendDestroyItemPacket() takes at most 3 arguments (4 given)
1205 12:27:15267 ::
1205 12:27:15413 :: Traceback (most recent call last):
1205 12:27:15413 :: File "ui.py", line 1584, in CallEvent
1205 12:27:15415 :: File "game.py", line 1997, in <lambda>
1205 12:27:15416 :: File "game.py", line 2054, in RequestDestroyItem
1205 12:27:15416 :: TypeError
1205 12:27:15416 :: :
1205 12:27:15416 :: __SendDestroyItemPacket() takes at most 3 arguments (4 given)
1205 12:27:15416 ::
1205 12:27:15693 :: Traceback (most recent call last):
1205 12:27:15694 :: File "ui.py", line 1584, in CallEvent
1205 12:27:15695 :: File "game.py", line 1999, in <lambda>
1205 12:27:15695 :: File "game.py", line 2073, in RequestSellItem
1205 12:27:15695 :: TypeError
1205 12:27:15695 :: :
1205 12:27:15695 :: __SendSellItemPacket() takes at most 3 arguments (4 given)
1205 12:27:15695 ::