Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Item move bug


semoka10
Go to solution Solved by SteelskinVayne,

Question

Does anyone know how to fix the bug where you can't move 2/3 slot items up or down by only 1 or 2 slots? For example, moving a sword 1 slot up. (Note: If it matters, I have the 4 inventory change and, for some reason, only in the first inventory, I can move items 1 slot down just fine, but not up, and not in any other inventory.)

Link to post

2 answers to this question

Recommended Posts

  • 0
  • Solution
Posted (edited)

Go to your binary source > EterPythonLib > PythonGridSlotWindow.cpp

Search this :

DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();

 

Add under :

		if (dwSlotNumber > 44)
		{
			if (dwSlotNumber < 90)
			{
				dwSlotNumber -= 45;
			}
			else if(dwSlotNumber < 135)
			{
				dwSlotNumber -= 90;
			}
			else if (dwSlotNumber < 180)
			{
				dwSlotNumber -= 135;
			}
		}

 

Search this :

BOOL CGridSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)

 

And replace the entire function with this :
 

BOOL CGridSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)
{
	if (!UI::CWindowManager::Instance().IsAttaching())
		return CSlotWindow::GetPickedSlotPointer(ppSlot);

	BYTE byWidth, byHeight;
	UI::CWindowManager::Instance().GetAttachingIconSize(&byWidth, &byHeight);

	std::list<TSlot*> SlotList;
	if (!GetPickedSlotList(byWidth, byHeight, &SlotList))
		return FALSE;

	TSlot * pMinSlot = NULL;
	//DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
	//DWORD dwAttachingItemIndex = UI::CWindowManager::Instance().GetAttachingIndex();

	for (std::list<TSlot*>::iterator itor = SlotList.begin(); itor != SlotList.end(); ++itor)
	{
		TSlot * pSlot = *itor;

		if (!pMinSlot)
		{
			pMinSlot = pSlot;
		}
		else
		{
			if (pSlot->dwSlotNumber < pMinSlot->dwSlotNumber && pSlot->dwItemIndex != pMinSlot->dwItemIndex)
			{
				pMinSlot = pSlot;
			}
			else
			{
				if (!pMinSlot->isItem && pSlot->isItem && pSlot->dwItemIndex == pMinSlot->dwItemIndex)
				{
					pMinSlot = pSlot;
				}
			}
		}
	}

	if (!pMinSlot)
	{
		return FALSE;
	}
	else
	{
		TSlot * pCenterSlot;
		if (!GetSlotPointer(pMinSlot->dwCenterSlotNumber, &pCenterSlot))
			return FALSE;

		*ppSlot = pCenterSlot;

		// ?? ???? ?? ?? ???..
		if (UI::CWindowManager::Instance().IsAttaching())
		{
			DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
			if (dwSlotNumber > 44)
			{
				if (dwSlotNumber < 90)
				{
					dwSlotNumber -= 45;
				}
				else if (dwSlotNumber < 135)
				{
					dwSlotNumber -= 90;
				}
				else if (dwSlotNumber < 180)
				{
					dwSlotNumber -= 135;
				}
			}
			if (dwSlotNumber == pCenterSlot->dwSlotNumber)
			{
				*ppSlot = pMinSlot;
			}
		}
	}

	return TRUE;
}

 

Hope i helped.

Edited by Erebus (see edit history)
  • Love 1
Link to post
  • 0

As i remember you can't move up, only down by default.

Do your slots gets "red" when you try in the 2./3./4. inventory? If so, it's gonna by a python issue. (uiinventory.py)

Edited by TMP4 (see edit history)
Link to post
Guest
This topic is now closed to further replies.


  • Current Donation Goals

  • Activity

    1. 9

      [FIX] Great-Offshop MEMORY-LEAK

    2. 1

      acc system

    3. 9

      [FIX] Great-Offshop MEMORY-LEAK

    4. 3

      Where do i find Guild Chat in source?

    5. 3

      Where do i find Guild Chat in source?

    6. 0

      Extended DS Inventory

    7. 6

      Shadow devil tower.

    8. 9

      [FIX] Great-Offshop MEMORY-LEAK

    9. 22

      [FIX] Fixing Metin2 memory leaks

  • Recently Browsing

    No registered users viewing this page.

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