Jump to content

Recommended Posts

 

Use the function item.remove() instead of pc.remove_item

Works perfect.

 

Wtf are you talking about? The official belt system doesn't even use quest.

 

 

I think he means the soul stone quest to use pc.remove_item instead of item.remove but this isn't a "fix"

 

  • Love 2
Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17742
Share on other sites

It`s not realy a fix but..
 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17757
Share on other sites

Fix: 

if pc . count_item ( 50513 ) < 1 then

say_title ( "Bug Controls" )

say ( "Object, drag it to the inventar." )

return

end

 Evidence that work: Click YouTube

 

Best Regards 

Can BARAN...

 

You could fix it by this way too:

    int item_remove(lua_State* L)
    {
        CQuestManager& q = CQuestManager::instance();
        LPITEM item = q.GetCurrentItem();
        if (item != NULL) {
            if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
                // ITEM_MANAGER::instance().RemoveItem(item);
                CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
            } else {
                sys_err("Tried to remove invalid item %p", get_pointer(item));
            }
            q.ClearCurrentItem();
        }
        
        return 0;
    }

I don't know if it's gonna work by that way

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

 

It would be easier to change the function void CHARACTER::RemoveSpecifyItem(DWORD vnumDWORD count)

to count belt items too, because if you can see it has only one for loop for inventory items

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17780
Share on other sites

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17783
Share on other sites

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

tried now, it does not work

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17784
Share on other sites

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

 

2 years?Really? :blink:

 

  • Love 3
Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17786
Share on other sites

int item_remove(lua_State* L)
{
    CQuestManager& q = CQuestManager::instance();
    LPITEM item = q.GetCurrentItem();
    if (item != NULL) {
        if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
            // ITEM_MANAGER::instance().RemoveItem(item);
            CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
        } else {
            sys_err("Tried to remove invalid item %p", get_pointer(item));
        }
        q.ClearCurrentItem();
    }
    
    return 0;
}

by the way, this doesn`t work too.

other solutions?

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17787
Share on other sites

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

 

2 years?Really? :blink:

 

 

I was ironic. :))

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17789
Share on other sites

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

wtf, two years? I think you were on Mars

 

Yes, definitely on Mars.

Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17794
Share on other sites

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

break it is for switch or loop , and doesn't work , problem is safebox

 

Another solution would be for the items of type18 can not put in safebox....or edited pc.remove_item function...

 

Maybe someone has a better solution...

  • Love 1
Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-17806
Share on other sites

 

Fix: 

if pc . count_item ( 50513 ) < 1 then

say_title ( "Bug Controls" )

say ( "Object, drag it to the inventar." )

return

end

 Evidence that work: Click YouTube

 

Best Regards 

Can BARAN...

 

You could fix it by this way too:

    int item_remove(lua_State* L)
    {
        CQuestManager& q = CQuestManager::instance();
        LPITEM item = q.GetCurrentItem();
        if (item != NULL) {
            if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
                // ITEM_MANAGER::instance().RemoveItem(item);
                CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
            } else {
                sys_err("Tried to remove invalid item %p", get_pointer(item));
            }
            q.ClearCurrentItem();
        }
        
        return 0;
    }

I don't know if it's gonna work by that way

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

 

It would be easier to change the function void CHARACTER::RemoveSpecifyItem(DWORD vnumDWORD count)

to count belt items too, because if you can see it has only one for loop for inventory items

 

Hi Denis,
I just tried your version, but does not work!
Delete just what's in inventory, not in the belt inventory.
The Belt Item Inventory remains permanently.
Link to comment
https://metin2.dev/topic/2640-belt-inventory-bug/#findComment-18318
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.