Jump to content

[Problem]Offline Shop


Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Well sorry i found the solution
its that item for opening shop... 
item vnum i specified in it..offline shop config..

I got another bug

The change price of opened shop item I changed the price but the item at 1st slot say pos '0' is changing even if i change 3rd slot item I show in pic clearly

In this Picture i click change price for foundation stone 
aig7jz

https://metin2.download/picture/tO5MMfTc2K6CV3YlyTTcsY4HAahw51JA/.png

Once i done the price of battle sword is changed 
aig89j

https://metin2.download/picture/XjMX9QZ1a4spssj5SFnAw5izKJGZ8iN8/.png

Check the foundation stone price is unchanged 

aig8j6

https://metin2.download/picture/lh5QszmPbPaMH0hWMTOCx2Tt2MVtw837/.png

Here is my Offlineshopmanager.cpp

Spoiler

void COfflineShopManager::ChangePrice(LPCHARACTER ch, BYTE bPos, DWORD dwPrice)
{
    if (!ch)
        return;

    if (bPos >= OFFLINE_SHOP_HOST_ITEM_MAX_NUM)
    {
        sys_err("Offlineshop overflow slot count [%s][%d]", ch->GetName(), bPos);
        return;
    }

    LPOFFLINESHOP pkOfflineShop = FindOfflineShop(FindMyOfflineShop(ch->GetPlayerID()));
    if (pkOfflineShop)
        pkOfflineShop->BroadcastUpdatePrice(bPos, dwPrice);

    DBManager::instance().DirectQuery("UPDATE %soffline_shop_item SET price = %u WHERE owner_id = %u and pos = %d", get_table_postfix(), dwPrice, ch->GetPlayerID(), bPos);

    sys_log(0, "PRET: %u | ITEM ID: %u | POZITIE: %d", dwPrice, ch->GetPlayerID(), bPos);
}
 

any solution for this ?
thanks 

Edited by Metin2 Dev
Core X - External 2 Internal
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



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