Jump to content

[BUG] Special Storage


Recommended Posts

I have one problem whit the special storage sistem. Is this sistem:

depozit.png

I have the following problem:

-If I take an UP item goes to item table and window  BELT_INVENTORY
-If a book is put in GROUND, that means after a reboot disappears from the inventory
-If I take a stone, I put it in UPGRADE_INVENTORY
They should normally be in UPGRADE_INVENTORY, BOOK_INVENTORY, STONE_INVENTORY
My ClientManagerPlayer is edited like this:

snprintf(szQuery, sizeof(szQuery),
"SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
"FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))",
GetTablePostfix(), pTab->id);


snprintf(queryStr, sizeof(queryStr),
"SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
"FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))",
GetTablePostfix(), packet->player_id);
CDBManager::instance().ReturnQuery(queryStr, QID_ITEM, peer->GetHandle(), new ClientHandleInfo(dwHandle, packet->player_id));


snprintf(queryStr, sizeof(queryStr), "DELETE FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))", GetTablePostfix(), pi->player_id);
delete CDBManager::instance().DirectQuery(queryStr);

The sistem is this: https://mega.nz/#!KVpDzBiL!gbHkZbrBBriT7vLqwnknpL_ieVvFVgUb0-cgKIo4WSg

https://www.virustotal.com/#/file/18fa708969eabfe862126ba9eca0623e106b456e512491154029b493932e1586/detection

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 7 months later...
  • 4 years later...
On 4/1/2019 at 4:52 AM, Tallywa said:

Hello, what is the fix

This is the fix ( Now tested)


Upgradeitem

Spoiler

#if defined DENIE_EVERY_INSERT_TO_SPECIAL_STORAGE
        if (DestCell.window_type == UPGRADE_INVENTORY)
            if (!item->IsUpgradeItem())
                return false;
#endif


BookItem

Spoiler

#if defined DENIE_EVERY_INSERT_TO_SPECIAL_STORAGE
        if (DestCell.window_type == BOOK_INVENTORY)
            if (!item->IsBook())
                return false;
#endif


StoneItem
 

Spoiler

#if defined DENIE_EVERY_INSERT_TO_SPECIAL_STORAGE
        if (DestCell.window_type == STONE_INVENTORY)
            if (!item->IsStone())
                return false;
#endif


ChestItem

Spoiler

#if defined DENIE_EVERY_INSERT_TO_SPECIAL_STORAGE
        if (DestCell.window_type == CHEST_INVENTORY)
            if (!item->IsChest())
                return false;
#endif


Don't forget to define it 🙂

(Char_item.cpp -> CHARACTER::MoveItem func)
Enjoy 🙂
If helped, Just drop LIKE to this.

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Crystal Metinstone

    2. 3

      Feeding game source to LLM

    3. 113

      Ulthar SF V2 (TMP4 Base)

    4. 3

      Feeding game source to LLM

    5. 0

      Target Information System

    6. 3

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

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