Jump to content

how to make 71084,71085,70024 stackable?


Go to solution Solved by m2Ciaran,

Recommended Posts

somebody know how to make them stackable? I modified in all protos to be stackable but i think i need also some modification in source code and uiinventory.py...if somebody whiling to help me i'l be thankfull.

they stack only if i drop them on the ground and pick them up... but in inventory i cant stack them one by one i hope i explained good

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Active+ Member
  • Solution

Hello.

You need something like this:

uiInventory -> def __DropSrcItemToDestItemInInventory

		elif item.GetUseType(srcItemVID) in self.USE_TYPE_TUPLE:
			if player.GetItemIndex(dstItemSlotPos) == srcItemVID:
				self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)
			else:
				self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)

uiInventory -> def __IsUsableItemToItem(self, srcItemVNum, srcSlotPos):

		else:
			if item.GetUseType(srcItemVNum) in self.USE_TYPE_TUPLE:
				return True

And make sure that USE_TYPE_TUPLE is defined at the beginning of InventoryWindow class:

USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE", "USE_ADD_ATTRIBUTE", "USE_ADD_ATTRIBUTE2", "USE_ADD_ACCESSORY_SOCKET", "USE_PUT_INTO_ACCESSORY_SOCKET", "USE_PUT_INTO_BELT_SOCKET", "USE_PUT_INTO_RING_SOCKET")

 

Link to comment
Share on other sites

11 hours ago, m2Ciaran said:

Hello.

You need something like this:

uiInventory -> def __DropSrcItemToDestItemInInventory

		elif item.GetUseType(srcItemVID) in self.USE_TYPE_TUPLE:
			if player.GetItemIndex(dstItemSlotPos) == srcItemVID:
				self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)
			else:
				self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)

uiInventory -> def __IsUsableItemToItem(self, srcItemVNum, srcSlotPos):

		else:
			if item.GetUseType(srcItemVNum) in self.USE_TYPE_TUPLE:
				return True

And make sure that USE_TYPE_TUPLE is defined at the beginning of InventoryWindow class:

USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE", "USE_ADD_ATTRIBUTE", "USE_ADD_ATTRIBUTE2", "USE_ADD_ACCESSORY_SOCKET", "USE_PUT_INTO_ACCESSORY_SOCKET", "USE_PUT_INTO_BELT_SOCKET", "USE_PUT_INTO_RING_SOCKET")

 

Thanks for the answer i’l check later.I hope will work 🙏.

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