Jump to content

Move item in inventory bug <video>


Recommended Posts

Hi 

 

I' did @xP3NG3Rx fix for item move bug , but still not fully fixed 

 

PythonGridSlotWindow.cpp

BOOL CGridSlotWindow::CheckMoving(DWORD dwSlotNumber, DWORD dwItemIndex, const std::list<TSlot*> & c_rSlotList)
{
	if (m_dwSlotStyle != SLOT_STYLE_PICK_UP)
		return TRUE;

	WORD wCellMaxPerPage = m_SlotVector.size();
	while (dwSlotNumber >= wCellMaxPerPage)
		dwSlotNumber -= wCellMaxPerPage;

	for (std::list<TSlot*>::const_iterator itor = c_rSlotList.begin(); itor != c_rSlotList.end(); ++itor)
	{
		TSlot* pSlot = *itor;
		if (dwSlotNumber == pSlot->dwSlotNumber && itor == c_rSlotList.begin())
			return TRUE;

		if (dwSlotNumber != pSlot->dwCenterSlotNumber)
		{
			if (c_rSlotList.size() == 2)
			{
				std::list<TSlot*>::const_iterator it = c_rSlotList.begin();
				std::advance(it, 1);
				if (0 != pSlot->dwItemIndex && 0 != (*it)->dwItemIndex)
					return FALSE;
			}
			if (c_rSlotList.size() == 3)
			{
				std::list<TSlot*>::const_iterator it = c_rSlotList.begin();
				std::advance(it, 1);
				if (0 != pSlot->dwItemIndex && 0 != (*it)->dwItemIndex)
					return FALSE;
				else
				{
					std::advance(it, 1);
					if (0 != pSlot->dwItemIndex && 0 != (*it)->dwItemIndex)
						return FALSE;
				}
			}

			if (0 != pSlot->dwItemIndex || pSlot->dwCenterSlotNumber != pSlot->dwSlotNumber)
				if (dwItemIndex != pSlot->dwItemIndex)
					return FALSE;
		}
	}

	return TRUE;
}

 

In official, I can move the item x1 slot or x2 slot to up or down, but in his fix I'm not able to do that,

only if I put the item in the first page of inventory I could only move the item x1, x2 slot to down.

 

 

 

 

Link to comment
Share on other sites

  • 3 years later...

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.