Jump to content

Recommended Posts

  • Active+ Member

Hello, when I drag an item from the inventory to the market and try to sell it, it only shows me the name "Moon Essence" and shows it as 0 yang.

It does this on all items.

However, when I click the "Sell" button in the Market and select items from the inventory, it displays properly.

There is no problem in the source codes, when I look at the ch1 logs, the SELL operation looks completely normal. There is such a display problem only in the game.

I would really appreciate if you could help, thank you.

uiShop.py(But there is no problem here):

	def SellAttachedItem(self):

		if shop.IsPrivateShop():
			mouseModule.mouseController.DeattachObject()
			return

		attachedSlotType = mouseModule.mouseController.GetAttachedType()
		attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
		attachedCount = mouseModule.mouseController.GetAttachedItemCount()
		if localeInfo.IsBRAZIL() == 0:
			attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
		if app.ENABLE_SPECIAL_STORAGE:
			if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or player.SLOT_TYPE_UPGRADE_INVENTORY == attachedSlotType or	player.SLOT_TYPE_BOOK_INVENTORY == attachedSlotType or player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or player.SLOT_TYPE_FLOWER_INVENTORY == attachedSlotType or player.SLOT_TYPE_ATTR_INVENTORY == attachedSlotType or player.SLOT_TYPE_CHEST_INVENTORY == attachedSlotType:

				item.SelectItem(attachedItemIndex)

				if item.IsAntiFlag(item.ANTIFLAG_SELL):
					popup = uiCommon.PopupDialog()
					popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM)
					popup.SetAcceptEvent(self.__OnClosePopupDialog)
					popup.Open()
					self.popup = popup
					return

				itemtype = player.SlotTypeToInvenType(attachedSlotType)

				if player.IsValuableItem(itemtype, attachedSlotPos):

					itemPrice = item.GetISellItemPrice()

					if item.Is1GoldItem():
						itemPrice = attachedCount / itemPrice / 5
					else:
						itemPrice = itemPrice * max(1, attachedCount) / 5

					itemName = item.GetItemName()

					questionDialog = uiCommon.QuestionDialog()
					questionDialog.SetText(localeInfo.DO_YOU_SELL_ITEM(itemName, attachedCount, itemPrice))

					questionDialog.SetAcceptEvent(lambda arg1=attachedSlotPos, arg2=attachedCount, arg3 = itemtype: self.OnSellItem(arg1, arg2, arg3))
					questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
					questionDialog.Open()
					self.questionDialog = questionDialog

				else:
					self.OnSellItem(attachedSlotPos, attachedCount, itemtype)
			else:
				snd.PlaySound("sound/ui/loginfail.wav")
		else:
			if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:

				if localeInfo.IsBRAZIL():
					itemIndex = player.GetItemIndex(attachedSlotPos)
					item.SelectItem(itemIndex)
				else:
					item.SelectItem(attachedItemIndex)
				
				if item.IsAntiFlag(item.ANTIFLAG_SELL):
					popup = uiCommon.PopupDialog()
					popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM)
					popup.SetAcceptEvent(self.__OnClosePopupDialog)
					popup.Open()
					self.popup = popup
					return
					
				itemtype = player.INVENTORY

				if localeInfo.IsBRAZIL() == 0:
					if player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:
						itemtype = player.DRAGON_SOUL_INVENTORY
				
				if player.IsValuableItem(itemtype, attachedSlotPos):

					itemPrice = item.GetISellItemPrice()

					if item.Is1GoldItem():
						itemPrice = attachedCount / itemPrice / 5
					else:
						itemPrice = itemPrice * max(1, attachedCount) / 5

					itemName = item.GetItemName()

					questionDialog = uiCommon.QuestionDialog()
					questionDialog.SetText(localeInfo.DO_YOU_SELL_ITEM(itemName, attachedCount, itemPrice))

					questionDialog.SetAcceptEvent(lambda arg1=attachedSlotPos, arg2=attachedCount, arg3 = itemtype: self.OnSellItem(arg1, arg2, arg3))
					questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
					questionDialog.Open()
					self.questionDialog = questionDialog
			
					constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

				else:
					self.OnSellItem(attachedSlotPos, attachedCount, itemtype)

			else:
				snd.PlaySound("sound/ui/loginfail.wav")

		mouseModule.mouseController.DeattachObject()

 

Link to comment
https://metin2.dev/topic/31496-npc-attached-item-sell-bug-nameprice/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.