Jump to content

Fix - When you Open Box the Items won't Stack


Recommended Posts

Hi,

 

char_item.cpp - CHARACTER::AutoGiveItem

Search for:  if (item->GetType() == ITEM_BLEND)

 

Replace the whole selection with:

 

if (item->IsStackable())
{
    for (int i=0; i < INVENTORY_MAX_NUM; i++)
    {
        LPITEM inv_item = GetInventoryItem(i);

        if (inv_item == NULL) 
            continue;

        if (inv_item->GetVnum() == item->GetVnum())
        {
            if (inv_item->GetSocket(0) == item->GetSocket(0) &&
                    inv_item->GetSocket(1) == item->GetSocket(1) &&
                    inv_item->GetSocket(2) == item->GetSocket(2) &&
                    inv_item->GetCount() < ITEM_MAX_COUNT)
            {
                inv_item->SetCount(inv_item->GetCount() + item->GetCount());
                M2_DESTROY_ITEM(item);
                return inv_item;
            }
        }
    }
}

 

Author: @systemdev93 (Back to the past)

  • Love 4
Link to comment
https://metin2.dev/topic/24658-fix-when-you-open-box-the-items-wont-stack/
Share on other sites

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.