SorinSmon 494 Posted January 9, 2020 Share Posted January 9, 2020 Hello, dear community! I come here with this problem... and i dont have any idea how to solve it.. Video: Hmm, how to explain.. i want after the player x buy the item he chooses.. to disappear the item or appear another... And if you ask why.. is simple they will exploit on this.. they gather 999 gaya and wait for the best item to appear and buy with all gaya money the same item over and over.. and destroy the whole concept of gaya system.. and is sad Any help guys please? 1 1 Link to comment Share on other sites More sharing options...
iFreakTime~.~ 47 Posted January 10, 2020 Share Posted January 10, 2020 Easiest solution ? Refresh the whole shop when someone buys something. Search in game/char.cpp in void CHARACTER::GemShopBuy(BYTE bPos) LPITEM item = ITEM_MANAGER::instance().CreateItem(dwVnum, bCount); if(item) { add before } RefreshGemShopItems(); 1 Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 10, 2020 Author Share Posted January 10, 2020 On 1/10/2020 at 2:42 AM, iFreakTime~.~ said: Easiest solution ? Refresh the whole shop when someone buys something. Search in game/char.cpp in void CHARACTER::GemShopBuy(BYTE bPos) LPITEM item = ITEM_MANAGER::instance().CreateItem(dwVnum, bCount); if(item) { add before } RefreshGemShopItems(); respect sir for answer ty for helping me but now another little problem 1 Link to comment Share on other sites More sharing options...
iFreakTime~.~ 47 Posted January 10, 2020 Share Posted January 10, 2020 Can show me the void CHARACTER::GemShopBuy(BYTE bPos) function? 1 Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 10, 2020 Author Share Posted January 10, 2020 https://pastebin.com/SyiSsw87 Link to comment Share on other sites More sharing options...
iFreakTime~.~ 47 Posted January 10, 2020 Share Posted January 10, 2020 Try this https://pastebin.com/f42V8mHj 2 Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 10, 2020 Author Share Posted January 10, 2020 1 hour ago, iFreakTime~.~ said: Try this https://pastebin.com/f42V8mHj the same sir.. same like on first gif.. Link to comment Share on other sites More sharing options...
ManiacRobert 427 Posted January 10, 2020 Share Posted January 10, 2020 void CHARACTER::GemShopBuy(BYTE bPos) { if (bPos >= GEM_SLOTS_MAX_NUM){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Slot overflow.")); return; } DWORD dwVnum = CShopManager::instance().GemShopGetVnumById(m_gemItems[bPos].bItemId); BYTE bCount = CShopManager::instance().GemShopGetCountById(m_gemItems[bPos].bItemId); DWORD dwPrice = CShopManager::instance().GemShopGetPriceById(m_gemItems[bPos].bItemId); if (GetGem() < (int) dwPrice){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Nu ai suficient Gaya.")); return; } if(m_gemItems[bPos].bSlotStatus == 1){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Acest slot nu este deblocat.")); return; } LPITEM item = AutoGiveItem(dwVnum, bCount); if(item) PointChange(POINT_GEM, -dwPrice, false); RefreshGemShopItems(); } 1 Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 10, 2020 Author Share Posted January 10, 2020 On 1/10/2020 at 9:16 PM, ManiacRobert said: void CHARACTER::GemShopBuy(BYTE bPos) { if (bPos >= GEM_SLOTS_MAX_NUM){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Slot overflow.")); return; } DWORD dwVnum = CShopManager::instance().GemShopGetVnumById(m_gemItems[bPos].bItemId); BYTE bCount = CShopManager::instance().GemShopGetCountById(m_gemItems[bPos].bItemId); DWORD dwPrice = CShopManager::instance().GemShopGetPriceById(m_gemItems[bPos].bItemId); if (GetGem() < (int) dwPrice){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Nu ai suficient Gaya.")); return; } if(m_gemItems[bPos].bSlotStatus == 1){ ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Acest slot nu este deblocat.")); return; } LPITEM item = AutoGiveItem(dwVnum, bCount); if(item) PointChange(POINT_GEM, -dwPrice, false); RefreshGemShopItems(); } Hello sir. thanks for trying to help me with this little problem! UPDATE: i test this code and no result.. Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 12, 2020 Author Share Posted January 12, 2020 up! Link to comment Share on other sites More sharing options...
iFreakTime~.~ 47 Posted January 12, 2020 Share Posted January 12, 2020 With original function you will get the correct item ? Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 13, 2020 Author Share Posted January 13, 2020 4 hours ago, iFreakTime~.~ said: With original function you will get the correct item ? yep.. but i need something like after a player buy a item to be unable to buy again same item or to remain after a empty slot or replace with another item.. something like this.. i hope you can come with a method sir Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 14, 2020 Author Share Posted January 14, 2020 up? Link to comment Share on other sites More sharing options...
iFreakTime~.~ 47 Posted January 14, 2020 Share Posted January 14, 2020 Hmm.. I will test something in my test server and i come with a solution. 1 Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 15, 2020 Author Share Posted January 15, 2020 21 hours ago, iFreakTime~.~ said: Hmm.. I will test something in my test server and i come with a solution. test it because if you use same gaya system like me you will have a problem.. and is a BIG problem can destroy the hole gameplay this little function. PS: is a high chance to have same system gaya like me.. because i ask a friend and he builds the gameplay with gaya and guesses what.. this friend have the same problem as me and he didn't notice.. test it also for you sir on your server to see if is the same. (OFICIAL WORKS IS: after buying an item to replace with another.. but for me, i like also do not have access to buy another or to remain an empty slot.. one of this all 3 is perfect) Link to comment Share on other sites More sharing options...
SorinSmon 494 Posted January 23, 2020 Author Share Posted January 23, 2020 up? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now