Jump to content

lucaluca

Member
  • Posts

    14
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by lucaluca

  1. For anyone who wants to reload 'shopex' & 'shopex_item' using /reload p

    (works on the db/mysql version only)

    1. You must have this

    2. game/src

    input_db.cpp

    Spoiler


    In void CInputDB::ReloadProto(const char * c_pData) search for:
     

        /*

        * SHOP

        */

     

        wSize = decode_2bytes(c_pData);

        c_pData += sizeof(WORD);

        sys_log(0, "RELOAD: SHOP: %d", wSize);


     

        if (wSize)

        {

            CShopManager::instance().Initialize((TShopTable *)c_pData, wSize);

            c_pData += wSize * sizeof(TShopTable);

        }

    Add below:
     

        /*

        * SHOPEX

        */

     

        wSize = decode_2bytes(c_pData);

        c_pData += sizeof(WORD);

        sys_log(0, "RELOAD: SHOPEX: %d", wSize);

     

        if (wSize)

        {

            CShopManager::instance().InitializeShopEX((TShopTable *)c_pData, wSize);

            c_pData += wSize * sizeof(TShopTable);

        }

     

    3. db/src

     

    ClientManager.cpp

    Spoiler

     

    In void CClientManager::QUERY_RELOAD_PROTO() search for:

     

                    sizeof(WORD) + sizeof(TShopTable) * m_iShopTableSize +

     

    Add below:

     

                    #if defined(ENABLE_RENEWAL_SHOPEX)

                    sizeof(WORD) + sizeof(TShopTable) * m_iShopEXTableSize +

                    #endif

     

    Search:
     

            tmp->EncodeWORD(m_iShopTableSize);

            tmp->Encode(m_pShopTable, sizeof(TShopTable) * m_iShopTableSize);

     

    Add below:

     

    #if defined(ENABLE_RENEWAL_SHOPEX)

            tmp->EncodeWORD(m_iShopEXTableSize);

            tmp->Encode(m_pShopEXTable, sizeof(TShopTable) * m_iShopEXTableSize);

    #endif

     


    And that's it

    Proof

    Spoiler

    • Metin2 Dev 2
    • Good 3
    • Love 2
    • Love 1
×
×
  • 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.