Jump to content

drag and use item doesn't work in inventory


Go to solution Solved by ARiver,

Recommended Posts

  • Premium

Hello guys and sorry to bother,

I have this bug wrecking my head for a week now:

I use TMP4 files and added Mali transmutation and pickup slot effect.

everything works fine but trying to use transmutation reversal made me realize that i messed something up:

when i use an item like transmutation reversal, add/change bonus (normal and 6/7) or a refine scroll in my inventory, it simply doesn't work.

grid is yellow when I drag item to item with the right conditions, but nothing happens next.

No syserr client or serverside.

I've triple check installation and even put a backup on and reinstalled everything.

 

Video to the issue:

a related post have been created but only talk of transmutation reversal and my bug seems more general so i created this post.

 

Link to comment
https://metin2.dev/topic/33265-drag-and-use-item-doesnt-work-in-inventory/
Share on other sites

  • Premium
  • Solution

So after researching a while in uiinventory.py i manage to make transmutation reversal working by changing the function def __DropSrcItemToDestItemInInventory

like this:

Spoiler
def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos):
		if srcItemSlotPos == dstItemSlotPos:
			return
	         	
		if app.BL_TRANSMUTATION_SYSTEM:
			if player.GetChangeLookWindowOpen() == 1:
				return
				
		if app.BL_TRANSMUTATION_SYSTEM:
			if item.IsChangeLookClearScroll(srcItemVID):
				if player.CanChangeLookClearItem(srcItemVID, player.INVENTORY, dstItemSlotPos):
					self.__OpenQuestionDialog(srcItemSlotPos, dstItemSlotPos)
					return

		if item.IsRefineScroll(srcItemVID):
			self.RefineItem(srcItemSlotPos, dstItemSlotPos)
			self.wndItem.SetUseMode(False)

		elif item.IsMetin(srcItemVID):
			self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos)

		elif item.IsDetachScroll(srcItemVID):
			self.DetachMetinFromItem(srcItemSlotPos, dstItemSlotPos)

		elif item.IsKey(srcItemVID):
			self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)			

		elif (player.GetItemFlags(srcItemSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:
			self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)

		elif item.GetUseType(srcItemVID) in self.USE_TYPE_TUPLE:
			self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)		
							
		else:
			
			#snd.PlaySound("sound/ui/drop.wav")
					
			## À̵¿½ÃŲ °÷ÀÌ ÀåÂø ½½·ÔÀÏ °æ¿ì ¾ÆÀÌÅÛÀ» »ç¿ëÇØ¼­ ÀåÂø ½ÃŲ´Ù - [levites]
			if player.IsEquipmentSlot(dstItemSlotPos):

				## µé°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ÀåºñÀ϶§¸¸
				if item.IsEquipmentVID(srcItemVID):
					self.__UseItem(srcItemSlotPos)

			else:
				self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)
				#net.SendItemMovePacket(srcItemSlotPos, dstItemSlotPos, 0)

 

But I don't know if this is a good way to make it work though, I would love to have an opinion about it ..

Edited by ariver1514
clarification of code and of my issue
  • Love 1

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.