Jump to content

Recommended Posts

Hello Metin2 Dev.

TEST TO CHECK IF YOU HAVE IT - Someone told me about this problem that is present on all serverfiles, regarding the BELT SLOTS.

Basically, the slot number 14 from the belt is like a black hole - if you have an item there and you place another item on top of it, the first item disappears untill you restart the server.

This is how you can reproduce the bug: https://metin2.download/video/iP7YgCPTIOpcj5cgw8hI0BM3RjXw4Ta9/.mp4
 

What I learned so far from testing and debugging?
- The bug is only on slot number 14 (4th row - 2nd slot).

The slots before and after this slot  are perfectly functional!

- The bug is maybe related to 4 inventories.

- You can even drag an item from inventory to that slot and the item that stands on that slot disappears.

- The slot number 14 from the belt is equivalent to slot 254 in inventory (total).

- After server restart, the items that disappear will reappear on random belt slots.

- The bug is on martysama source too. ( @ martysama0134 ).

 

If I replace the code from this function:
bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const

..
 

            if (Cell.IsBeltInventoryPosition())
            {
                LPITEM beltItem = GetWear(WEAR_BELT);
                if (NULL == beltItem)
                    return false;
                if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0)))
                    return false;
                if (m_pointsInstant.bItemGrid[bCell]) {
                    if (m_pointsInstant.bItemGrid[bCell] == iExceptionCell)
                        return true;
                    return false;
                }
                if (bSize == 1)
                    return true;
            }



with this:

            if (Cell.IsBeltInventoryPosition())
            {
                return false
            }

 

the bug disappears, but now the slots are not functional at all (obviously).

How can we fix this bug?

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/33580-bug-on-all-servers-how-to-fix/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

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.