Jump to content

myshop_pricelist doesnt work


Recommended Posts

  • Active Member

Admin shop opened with 71049(silk bundle)
Test account normal with packet but doestnt work

 


void CClientManager::MyshopPricelistUpdate(const TItemPriceListTable* pPacket)
{
    if (pPacket->byCount > SHOP_PRICELIST_MAX_NUM)
    {
        sys_err("count overflow!");
        return;
    }

    CItemPriceListTableCache* pCache = GetItemPriceListCache(pPacket->dwOwnerID);

    if (pCache)
    {
        TItemPriceListTable table;

        table.dwOwnerID = pPacket->dwOwnerID;
        table.byCount = pPacket->byCount;

        thecore_memcpy(table.aPriceInfo, pPacket->aPriceInfo, sizeof(TItemPriceInfo) * pPacket->byCount);

        pCache->UpdateList(&table);
    }
    else
    {
        TItemPriceListTable* pUpdateTable = new TItemPriceListTable;

        pUpdateTable->dwOwnerID = pPacket->dwOwnerID;
        pUpdateTable->byCount = pPacket->byCount;

        thecore_memcpy(pUpdateTable->aPriceInfo, pPacket->aPriceInfo, sizeof(TItemPriceInfo) * pPacket->byCount);

        char szQuery[QUERY_MAX_LEN];
        snprintf(szQuery, sizeof(szQuery), "SELECT item_vnum, price FROM myshop_pricelist%s WHERE owner_id=%u", GetTablePostfix(), pPacket->dwOwnerID);
        CDBManager::instance().ReturnQuery(szQuery, QID_ITEMPRICE_LOAD_FOR_UPDATE, 0, pUpdateTable);
    }
}

Proof screenshot

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.