Function :
C
- void LoadShopConfig()
- {
- SQLMsg * pkMsg(DBManager::instance().DirectQuery("SELECT `id`,`time`,`time_type`+0,`cost` from shop_cost"));
- SQLResult * pRes = pkMsg->Get();
- if (pRes->uiNumRows)
- {
- MYSQL_ROW row;
- g_ShopIndexCount.clear();
- while ((row = mysql_fetch_row(pRes->pSQLResult)))
- {
- int days;
- int price;
- int id;
- str_to_number(id, row[0]);
- TShopCost c;
- str_to_number(c.days, row[1]);
- BYTE type = NULL;
- str_to_number(type, row[2]);
- if (type == 1)
- c.time = 86400;
- else if (type == 2)
- c.time = 3600;
- else
- c.time = 0;
- str_to_number(c.price, row[3]);
- g_ShopCosts[id] = c;
- }
- }
- const DESC_MANAGER::DESC_SET & set = DESC_MANAGER::instance().GetClientSet();
- DESC_MANAGER::DESC_SET::const_iterator it = set.begin();
- while (it != set.end())
- {
- LPDESC d = *(it++);
- if (!d->GetCharacter())
- continue;
- d->GetCharacter()->SendShopCost();
- }
- }
Tables.h
I try to add in config.cpp
but i have new warning :
So, someone know how i can solve this warning ?
thanks advance