VegaS 1090 Posted June 7, 2016 Share Posted June 7, 2016 Explain this bug: --*You do shop with items up to 120kkk, and another player can buy your items, but your bank online store you get only 2kkk, and the remaining money is erased. --* You need to do this check and function AddItem, because he still can not do this bug when you add items can add up to 120kkk. A guy asked me to help him solve this problem a few months ago, I helped and I offered this little fix free without any money and he was placed and sold to other users on a lot of money and he made a lot of money on this crap fixed which was written in 5 minutes. So I decided to put it for everyone to fix this problem, I mention this fix is for the offline shop's from Ken. This fix applies to people who have no limit increased to yang in bank offlineshop, shop etc.. - [ File: /Src/common/service.h ] #1.) Add this: #define __OFFLINE_SHOP_FIX_OPEN #define __OFFLINE_SHOP_VALUE_MAX 2000000000 #define __OFFLINE_SHOP_WARNING "[Protect Offline] Have more than 2.000.000.000 Yang!" - [ File: /Src/game/src/char.cpp ] #1.) Search function: if (!LC_IsBrazil()) { DWORD nTotalMoney = 0; for (BYTE n = 0; n < bItemCount; ++n) nTotalMoney += (pTable + n)->price; if (GOLD_MAX - 1 <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName()); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다")); return; } } #2.) Replace function with this: #ifdef __OFFLINE_SHOP_FIX_OPEN int64_t szTotalMoney = 0; for (int n = 0; n < bItemCount; ++n) { szTotalMoney += static_cast<int64_t>((pTable+n)->price); } std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT money FROM player.player WHERE id = %u", GetPlayerID())); if (pMsg->Get()->uiNumRows == 0) return; DWORD dwCurrentMoney = 0; MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult); str_to_number(dwCurrentMoney, row[0]); szTotalMoney += static_cast<int64_t>(dwCurrentMoney); if (__OFFLINE_SHOP_VALUE_MAX <= szTotalMoney) { ChatPacket(CHAT_TYPE_INFO, __OFFLINE_SHOP_WARNING); return; } #else if (!LC_IsBrazil()) { DWORD nTotalMoney = 0; for (BYTE n = 0; n < bItemCount; ++n) nTotalMoney += (pTable + n)->price; if (GOLD_MAX - 1 <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName()); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다")); return; } } #endif 8 Link to comment Share on other sites More sharing options...
alondark 59 Posted June 8, 2016 Share Posted June 8, 2016 Thank you 1 Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted June 8, 2016 Premium Share Posted June 8, 2016 Thanks, that's kind ! 1 Link to comment Share on other sites More sharing options...
VegaS 1090 Posted June 9, 2016 Author Share Posted June 9, 2016 21 hours ago, galet said: Thanks, that's kind ! Yeah xD 1 Link to comment Share on other sites More sharing options...
Kronzu 11 Posted July 1, 2016 Share Posted July 1, 2016 I limit 1,000,000,000,000,000 Yang. Wants to change from 2,000,000,000 to 500,000,000,000 Yang. What would have to change? Link to comment Share on other sites More sharing options...
Cilindro 14 Posted July 7, 2016 Share Posted July 7, 2016 now i don't can open store Link to comment Share on other sites More sharing options...
paquiito 9 Posted February 2, 2018 Share Posted February 2, 2018 Its possible do this for add new item and change price? Link to comment Share on other sites More sharing options...
Recommended Posts