Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CClientManager::MirrorItemTableIntoDB()
- {
- for (itertype(m_vec_itemTable) it = m_vec_itemTable.begin(); it != m_vec_itemTable.end(); it++)
- {
- const TItemTable& t = *it;
- char query[4096];
- snprintf(query, sizeof(query),
- "replace into item_proto%s "
- "("
- "vnum, "
- "name, "
- "locale_name, "
- "type, "
- "subtype, "
- "weight, "
- "size, "
- "antiflag, "
- "flag, "
- "wearflag, "
- "immuneflag, "
- "gold, "
- "shop_buy_price, "
- "refined_vnum, "
- "refine_set, "
- "magic_pct, "
- "limittype0, "
- "limitvalue0, "
- "limittype1, "
- "limitvalue1, "
- "applytype0, "
- "applyvalue0, "
- "applytype1, "
- "applyvalue1, "
- "applytype2, "
- "applyvalue2, "
- "applytype3, "
- "applyvalue3, "
- "value0, "
- "value1, "
- "value2, "
- "value3, "
- "value4, "
- "value5, "
- "specular, "
- "socket_pct, "
- "addon_type"
- ") "
- "values ("
- "%d, "
- "\"%s\", "
- "\"%s\", "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%lld, "
- "%lld, "
- "%d, "
- "%d, "
- "%d, "
- "%d, "
- "%ld, "
- "%d, "
- "%ld, "
- "%d, "
- "%ld, "
- "%d, "
- "%ld, "
- "%d, "
- "%ld, "
- "%d, "
- "%ld, "
- "%ld, "
- "%ld, "
- "%ld, "
- "%ld, "
- "%ld, "
- "%ld, "
- "%d, "
- "%d, "
- "%d"
- ")",
- GetTablePostfix(),
- t.dwVnum,
- t.szName,
- t.szLocaleName,
- t.bType,
- t.bSubType,
- t.bWeight,
- t.bSize,
- t.dwAntiFlags,
- t.dwFlags,
- t.dwWearFlags,
- t.dwImmuneFlag,
- t.dwGold,
- t.dwShopBuyPrice,
- t.dwRefinedVnum,
- t.wRefineSet,
- t.bAlterToMagicItemPct,
- t.aLimits[0].bType,
- t.aLimits[0].lValue,
- t.aLimits[1].bType,
- t.aLimits[1].lValue,
- t.aApplies[0].bType,
- t.aApplies[0].lValue,
- t.aApplies[1].bType,
- t.aApplies[1].lValue,
- t.aApplies[2].bType,
- t.aApplies[2].lValue,
- t.aApplies[3].bType,
- t.aApplies[3].lValue,
- t.alValues[0],
- t.alValues[1],
- t.alValues[2],
- t.alValues[3],
- t.alValues[4],
- t.alValues[5],
- t.bSpecular,
- t.bGainSocketPct,
- t.sAddonType
- );
- CDBManager::instance().AsyncQuery(query);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement