Jump to content

Problem with belt system slot


Recommended Posts

7 minutes ago, netmarlis said:

Try on uiinventory.py:

	def SelectItemSlot(self, itemSlotIndex):
		chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot")
		if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
			return

		itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex)
		chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex)

Add chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex) then try click and show chat. Does slot even highlight when over with item?

VANCNDD.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

1 minute ago, Den said:

Try on uiinventory.py:


	def SelectItemSlot(self, itemSlotIndex):
		chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot")
		if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
			return

		itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex)
		chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex)

Add chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex) then try. Does slot even highlight when over with item?

VANCNDD.png

https://metin2.download/picture/3GISV0Sdz3U1qY3CF1o8it69zTj5wky0/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 years later...
On 6/8/2017 at 9:47 PM, Den said:

You need to have the correct belt slot index in inventorywindow.py and make it refresh in RefreshEquipSlotWindow (uiinventory.py).

That's what I have:

inventorywindow.py

						{
							"name" : "EquipmentSlot",
							"type" : "slot",

							"x" : 3,
							"y" : 3,

							"width" : 150,
							"height" : 182,

							"slot" : (
										{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
										{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
										{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
										{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, #belt slot
									),
						},

RefreshEquipSlotWindow (uiinventory.py)

	def RefreshEquipSlotWindow(self):
		getItemVNum=player.GetItemIndex
		getItemCount=player.GetItemCount
		setItemVNum=self.wndEquip.SetItemSlot
		for i in xrange(player.EQUIPMENT_PAGE_COUNT):
			slotNumber = player.EQUIPMENT_SLOT_START + i
			itemCount = getItemCount(slotNumber)
			if itemCount <= 1:
				itemCount = 0
			setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)

		if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
			for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
				slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
				itemCount = getItemCount(slotNumber)
				if itemCount <= 1:
					itemCount = 0
				setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
				print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)

 

Check what you are missing.

 

 

Worked on me, thanks for that.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.