Jump to content

Metin2 - 4 Inventory Page


Recommended Posts

Using 4 inventory, the activate slot effect goes bugged just update in uiinventory.py:

	def RefreshBagSlotWindow(self):
		getItemVNum=player.GetItemIndex
		getItemCount=player.GetItemCount
		setItemVNum=self.wndItem.SetItemSlot
		for i in xrange(player.INVENTORY_PAGE_SIZE*4):
			slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
			
			itemCount = getItemCount(slotNumber)
			if 0 == itemCount:
				self.wndItem.ClearSlot(i)
				continue
			elif 1 == itemCount:
				itemCount = 0
			
			itemVnum = getItemVNum(slotNumber)
			setItemVNum(i, itemVnum, itemCount)
			if constInfo.IS_AUTO_POTION(itemVnum):
				metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
				if slotNumber >= player.INVENTORY_PAGE_SIZE:
					slotNumber -= player.INVENTORY_PAGE_SIZE
				
				isActivated = 0 != metinSocket[0]
				if isActivated:
					self.wndItem.ActivateSlot(i)
					potionType = 0;
					if constInfo.IS_AUTO_POTION_HP(itemVnum):
						potionType = player.AUTO_POTION_TYPE_HP
					elif constInfo.IS_AUTO_POTION_SP(itemVnum):
						potionType = player.AUTO_POTION_TYPE_SP						
					
					usedAmount = int(metinSocket[1])
					totalAmount = int(metinSocket[2])					
					player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i))
				else:
					self.wndItem.DeactivateSlot(i)
		
		self.wndItem.RefreshSlot()
		if self.wndBelt:
			self.wndBelt.RefreshSlot()
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

No you have to edit the function for getting the next free slot. Its not just making higher slots. Not that easy ;)

 

Atm it will only make the right inventory ending at slots max num / 2 -> at the end of 2nd page

 

 

Sorry, can you explain more? I don't understant. Please :( 

 

#EDIT: SOLVED Work Fine!

Edited by leo2993
Link to comment
Share on other sites

  • 1 month later...

The python part is:

 

uiinventory.py

 

find this:

self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))

and add down this:

self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))

after that find this:

self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))

and add down this:

self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))

find this:

self.inventoryTab[0].Down()

and add down this:

self.inventoryPageIndex = 0

now lets go to edit the SetInventoryPage function

 

replace the SetInventoryPage function with this:

	def SetInventoryPage(self, page):
		self.inventoryTab[self.inventoryPageIndex].SetUp()
		self.inventoryPageIndex = page
		self.RefreshBagSlotWindow()

file locale/xx/ui/inventorywindow.py:

 

change EQUIPMENT_START_INDEX = 90 to EQUIPMENT_START_INDEX = 180

 

after that replace the Inventory_Tab_01 and Inventory_Tab_02 with this:

This is the hidden content, please

1114 11:39:05558 :: 
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:14) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.SyntaxError:invalid syntax (line 148)

1114 11:39:05558 :: ============================================================================================================
1114 11:39:05558 :: Abort!!!!

  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

  • Former Staff

 

 

uiinventory.py

 

find this:

self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))

and add down this:

self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))

after that find this:

self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))

and add down this:

self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))

find this:

self.inventoryTab[0].Down()

and add down this:

self.inventoryPageIndex = 0

now lets go to edit the SetInventoryPage function

 

replace the SetInventoryPage function with this:

	def SetInventoryPage(self, page):
		self.inventoryTab[self.inventoryPageIndex].SetUp()
		self.inventoryPageIndex = page
		self.RefreshBagSlotWindow()

file locale/xx/ui/inventorywindow.py:

 

change EQUIPMENT_START_INDEX = 90 to EQUIPMENT_START_INDEX = 180

 

after that replace the Inventory_Tab_01 and Inventory_Tab_02 with this:

This is the hidden content, please

 

1114 11:39:05558 :: 
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:14) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.SyntaxError:invalid syntax (line 148)

1114 11:39:05558 :: ============================================================================================================
1114 11:39:05558 :: Abort!!!!

Wrong tabulations.

  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 months later...
  • 4 months later...
  • Premium
2 hours ago, EnKor said:

i install this tutorial more then 20 times. And i cant refine itens in 3 ,4 or 5 inventory.

 

i trie with 3, with 4 and 5 inventory. Never refine. All work fine trades and etc... but cant refine! Why???

I had a similar bug, there's a check in input_main if I remeber well, but i'm not sure

Link to comment
Share on other sites

  • 3 weeks later...

This code is wrong....

static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2);

INVENTORY_MAX_NUM / 5 / 2 = 18...
It should be 9, because inventory pages are 5x9......

static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); //Where 4 is the number of pages..

 

This is COMPLETELY wrong..... Because the second, third and fourth for iterate ever the same page

for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}
	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}

It should be:

	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM / 4 * 2; ++i) //GRID 2
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}
    for (i = INVENTORY_MAX_NUM / 4 * 2; i < INVENTORY_MAX_NUM / 4 * 3; ++i) //GRID 3
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid3.Put(i - INVENTORY_MAX_NUM / 4 * 2, 1, item->GetSize());
	}
	for (i = INVENTORY_MAX_NUM / 4 * 3; i < INVENTORY_MAX_NUM; ++i) // GRID 4
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid4.Put(i - INVENTORY_MAX_NUM / 4 * 3, 1, item->GetSize());
	}

 

And finally there are no implementation in the next source code to count the void spaces for 3° and 4° pages..

Link to comment
Share on other sites

  • 2 weeks later...
32 minutes ago, kieranFMT2 said:

can s1 help me with this error?

  Reveal hidden contents

0902 14:54:43929 :: AttributeError
0902 14:54:43929 :: : 
0902 14:54:43929 :: 'InventoryWindow' object has no attribute 'inventoryPageIndex'
0902 14:54:43929 :: 

 

Replacing the function test for this:

where says for i in xrange(2): the number 2 is the amount of inventory you have

def SetInventoryPage(self, page):
        self.inventoryPageIndex = page
        for i in xrange(2):
            if i != self.inventoryPageIndex:
                self.inventoryTab.SetUp()
                self.inventoryTab[self.inventoryPageIndex].Down()
            self.RefreshBagSlotWindow()

 

reviews the tabs

https://metin2.download/picture/ifT2c5LhHe2T058T4sMfBwwsyyz8rhvb/.png

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

  • 6 months later...
  • 4 weeks later...
On 6/8/2015 at 1:46 PM, LeNnT said:

	def RefreshBagSlotWindow(self):
		getItemVNum=player.GetItemIndex
		getItemCount=player.GetItemCount
		setItemVNum=self.wndItem.SetItemSlot
		for i in xrange(player.INVENTORY_PAGE_SIZE*4):
			slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
			
			itemCount = getItemCount(slotNumber)
			if 0 == itemCount:
				self.wndItem.ClearSlot(i)
				continue
			elif 1 == itemCount:
				itemCount = 0
			
			itemVnum = getItemVNum(slotNumber)
			setItemVNum(i, itemVnum, itemCount)
			if constInfo.IS_AUTO_POTION(itemVnum):
				metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
				if slotNumber >= player.INVENTORY_PAGE_SIZE:
					slotNumber -= player.INVENTORY_PAGE_SIZE
				
				isActivated = 0 != metinSocket[0]
				if isActivated:
					self.wndItem.ActivateSlot(i)
					potionType = 0;
					if constInfo.IS_AUTO_POTION_HP(itemVnum):
						potionType = player.AUTO_POTION_TYPE_HP
					elif constInfo.IS_AUTO_POTION_SP(itemVnum):
						potionType = player.AUTO_POTION_TYPE_SP						
					
					usedAmount = int(metinSocket[1])
					totalAmount = int(metinSocket[2])					
					player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i))
				else:
					self.wndItem.DeactivateSlot(i)
		
		self.wndItem.RefreshSlot()
		if self.wndBelt:
			self.wndBelt.RefreshSlot()

 

i still have  the problem with active slot it moves very fast

Link to comment
Share on other sites

  • 2 months later...

Error while trying to add the 4 inventories

Syserr

0625 00:48:21675 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR
0625 00:49:32170 :: Failed to load script file : locale/pt/ui/InventoryWindow.py
0625 00:49:32197 :: 
ui.py(line:2763) LoadScriptFile
system.py(line:192) execfile
system.py(line:161) Run
system.py(line:177) __LoadTextFile__

LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.SyntaxError'>:invalid syntax (locale/pt/ui/InventoryWindow.py, line 303)

0625 00:49:32197 :: ============================================================================================================
0625 00:49:32197 :: Abort!!!!


0625 00:49:32198 :: 
uiInventory.py(line:293) __LoadWindow
ui.py(line:2780) LoadScriptFile
exception.py(line:36) Abort

InventoryWindow.LoadWindow.LoadObject - <type 'exceptions.SystemExit'>:

0625 00:49:32198 :: ============================================================================================================
0625 00:49:32198 :: Abort!!!!


My inventorywindow.py

import uiScriptLocale
import item

EQUIPMENT_START_INDEX = 180

window = {
	"name" : "InventoryWindow",

	## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px)
	"x" : SCREEN_WIDTH - 176,
	"y" : SCREEN_HEIGHT - 37 - 565,

	"style" : ("movable", "float",),

	"width" : 176,
	"height" : 565,

	"children" :
	(
		## Inventory, Equipment Slots
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),

			"x" : 0,
			"y" : 0,

			"width" : 176,
			"height" : 565,

			"children" :
			(
				## Title
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),

					"x" : 8,
					"y" : 7,

					"width" : 161,
					"color" : "yellow",

					"children" :
					(
						{ "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
					),
				},

				## Equipment Slot
				{
					"name" : "Equipment_Base",
					"type" : "image",

					"x" : 10,
					"y" : 33,

					"image" : "d:/ymir work/ui/equipment_bg_with_ring.tga",

					"children" :
					(

						{
							"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},
										## »õ ¹ÝÁö1
										{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32},
										## »õ ¹ÝÁö2
										{"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
										## »õ º§Æ®
										{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
									),
						},
						## Dragon Soul Button
						{
							"name" : "DSSButton",
							"type" : "button",

							"x" : 114,
							"y" : 107,

							"tooltip_text" : uiScriptLocale.TASKBAR_DRAGON_SOUL,

							"default_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_01.tga",
							"over_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_02.tga",
							"down_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_03.tga",
						},
						## MallButton
						{
							"name" : "MallButton",
							"type" : "button",

							"x" : 118,
							"y" : 148,

							"tooltip_text" : uiScriptLocale.MALL_TITLE,

							"default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
							"over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
							"down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
						},
						## CostumeButton
						{
							"name" : "CostumeButton",
							"type" : "button",

							"x" : 78,
							"y" : 5,

							"tooltip_text" : uiScriptLocale.COSTUME_TITLE,

							"default_image" : "d:/ymir work/ui/game/costume_button_01.tga",
							"over_image" : "d:/ymir work/ui/game/costume_button_02.tga",
							"down_image" : "d:/ymir work/ui/game/costume_button_03.tga",
						},						
						{
							"name" : "Equipment_Tab_01",
							"type" : "radio_button",

							"x" : 86,
							"y" : 161,

							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",

							"children" :
							(
								{
									"name" : "Equipment_Tab_01_Print",
									"type" : "text",

									"x" : 0,
									"y" : 0,

									"all_align" : "center",

									"text" : "I",
								},
							),
						},
						{
							"name" : "Equipment_Tab_02",
							"type" : "radio_button",

							"x" : 86 + 32,
							"y" : 161,

							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",

							"children" :
							(
								{
									"name" : "Equipment_Tab_02_Print",
									"type" : "text",

									"x" : 0,
									"y" : 0,

									"all_align" : "center",

									"text" : "II",
								},
							),
						},

					),
				},

				{
					"name" : "Inventory_Tab_01",
					"type" : "radio_button",

					"x" : 10,
					"y" : 33 + 189,

					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,

					"children" :
					(
						{
							"name" : "Inventory_Tab_01_Print",
							"type" : "text",

							"x" : 0,
							"y" : 0,

							"all_align" : "center",

							"text" : "I",
						},
					),
				},
				{
					"name" : "Inventory_Tab_02",
					"type" : "radio_button",

					"x" : 10 + 78,
					"y" : 33 + 189,

					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,

					"children" :
					(
						{
							"name" : "Inventory_Tab_02_Print",
							"type" : "text",

							"x" : 0,
							"y" : 0,

							"all_align" : "center",

							"text" : "II",
						},
					),
				},
				{
					"name" : "Inventory_Tab_03",
					"type" : "radio_button",

					"x" : 10,
					"y" : 33 + 210,

					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,

					"children" :
					(
						{
							"name" : "Inventory_Tab_03_Print",
							"type" : "text",

							"x" : 0,
							"y" : 0,

							"all_align" : "center",

							"text" : "III",
						},
					),
				},
				{
					"name" : "Inventory_Tab_04",
					"type" : "radio_button",

					"x" : 10 + 78,
					"y" : 33 + 210,

					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,

					"children" :
					(
						{
							"name" : "Inventory_Tab_04_Print",
							"type" : "text",

							"x" : 0,
							"y" : 0,

							"all_align" : "center",

							"text" : "IV",
						},
					),
				}

				## Item Slot
				{
					"name" : "ItemSlot",
					"type" : "grid_table",

					"x" : 8,
					"y" : 246,

					"start_index" : 0,
					"x_count" : 5,
					"y_count" : 9,
					"x_step" : 32,
					"y_step" : 32,

					"image" : "d:/ymir work/ui/public/Slot_Base.sub"
				},

				## Print
				{
					"name":"Money_Slot",
					"type":"button",

					"x":8,
					"y":28,

					"horizontal_align":"center",
					"vertical_align":"bottom",

					"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",

					"children" :
					(
						{
							"name":"Money_Icon",
							"type":"image",

							"x":-18,
							"y":2,

							"image":"d:/ymir work/ui/game/windows/money_icon.sub",
						},

						{
							"name" : "Money",
							"type" : "text",

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

							"horizontal_align" : "right",
							"text_horizontal_align" : "right",

							"text" : "123456789",
						},
					),
				},

			),
		},
	),
}

If I have to send the files
Wow
System.py
UiInventory.py
Exception.py

just talk

Sorry, my english is google translate

“To be humble with superiors is duty, with equals is courtesy, with inferiors is nobility.”
Benjamin Franklin

 

Por favor, desative seu AdBlock quando usar meus links de download.

Please, disable your 
AdBlock when use my download links.

Me

AdBlock 
On:   


699691-icon-20-sad-face-eyebrows-48.png

 

Adblock Off:  



Streamline-65-48.png

 

 

Angry One Piece GIF by Toei Animation

Link to comment
Share on other sites

  • 2 months later...
  • Developer

You have wrote an wrong check for empty inventory space (exchange.cpp)...

Spoiler

	for (i = 0; i < INVENTORY_MAX_NUM / 4; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid1.Put(i, 1, item->GetSize());
	}
	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}

	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}
	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
	{
		if (!(item = victim->GetInventoryItem(i)))
			continue;

		s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
	}

 


Delete all for cicle and replace it with this cicle
 

for(i = 0 ; i < INVENTORY_MAX_NUM ; i++)
	{
		if (! (item = victim->GetInventoryItem (i)))
		{
			continue;
		}
		if(i < INVENTORY_MAX_NUM/4)
		{
			s_grid1.Put(i , 1 , item->GetSize() );
		}
		else if( i < (INVENTORY_MAX_NUM/4) * 2) )
		{
			s_grid2.Put(i - INVENTORY_MAX_NUM/4 , 1 , item->GetSize() );
		}
		else if( i < (INVENTORY_MAX_NUM/4 ) * 3 )
		{
			s_grid3.Put(i - (INVENTORY_MAX_NUM/4*2) , 1 , item->GetSize() );
		}
		else
		{
			s_grid4.Put(i - (INVENTORY_MAX_NUM/4*3) , 1 , item->GetSize() );
		}
	}

 

not tested but i think it works fine.. Bye Bye :)

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

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.