Active Member Mind Rapist 188 Posted January 10, 2019 Active Member Share Posted January 10, 2019 (edited) I have a little bug on selling items to vendors. Images below explain everything: The real price is in the second image. Does someone know what is going on? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
SussyFlore 14 Posted January 10, 2019 Share Posted January 10, 2019 Show uishop.py Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 10, 2019 Author Active Member Share Posted January 10, 2019 8 hours ago, SussyFlore said: Show uishop.py Thanks for the reply, here it is: https://pastebin.com/ET8xDdFu Link to comment Share on other sites More sharing options...
[RaffaeL] 28 Posted January 10, 2019 Share Posted January 10, 2019 Your "gold" and "shop_buy_price" have the same value? 1 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 11, 2019 Author Active Member Share Posted January 11, 2019 5 hours ago, [RaffaeL] said: Your "gold" and "shop_buy_price" have the same value? If you are talking about the database records then yes many items came with the same values on those 2. Link to comment Share on other sites More sharing options...
SussyFlore 14 Posted January 11, 2019 Share Posted January 11, 2019 13 hours ago, Mind Rapist said: Thanks for the reply, here it is: https://pastebin.com/ET8xDdFu Try this: https://pastebin.com/xXbh5ipa Change def OnSellItem and def SellAttachedItem(self): Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 11, 2019 Author Active Member Share Posted January 11, 2019 5 hours ago, SussyFlore said: Try this: https://pastebin.com/xXbh5ipa Change def OnSellItem and def SellAttachedItem(self): Hey, thanks for the response. Unfortunatelly, it didn't work Link to comment Share on other sites More sharing options...
SussyFlore 14 Posted January 11, 2019 Share Posted January 11, 2019 6 minutes ago, Mind Rapist said: Hey, thanks for the response. Unfortunatelly, it didn't work Syserr empty? The price is the same? Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 11, 2019 Author Active Member Share Posted January 11, 2019 5 minutes ago, SussyFlore said: Syserr empty? The price is the same? Yes and yes. No sysett, works almost normally... With your version, I'm not getting a confirmation dialog on sell, thus, the price is the same. Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 12, 2019 Author Active Member Share Posted January 12, 2019 F5 Link to comment Share on other sites More sharing options...
OtherChoice 77 Posted January 12, 2019 Share Posted January 12, 2019 Check those things : 1) item_proto table (serverside either txt or sql) and item_proto (client side) prices matches 2) In PythonPlayerModule.cpp in PyObject * playerGetSellItemPrice(PyObject * poSelf, PyObject * poArgs) there's a line: iPrice /= 5; and the same exact value should be set in shop_manager.cpp (server source/game) in void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) like this: dwPrice /= 5; (If any of those two is missing or has a different value make sure to correct it). 2 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 13, 2019 Author Active Member Share Posted January 13, 2019 17 hours ago, OtherChoice said: Check those things : 1) item_proto table (serverside either txt or sql) and item_proto (client side) prices matches 2) In PythonPlayerModule.cpp in PyObject * playerGetSellItemPrice(PyObject * poSelf, PyObject * poArgs) there's a line: iPrice /= 5; and the same exact value should be set in shop_manager.cpp (server source/game) in void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) like this: dwPrice /= 5; (If any of those two is missing or has a different value make sure to correct it). Hey, thanks for replying and saving me once again Seems like what you gave me actually helped. Once I checked what you describe in 2), I remembered that I changed those divisions in uiShop.py to / 1 so I changed them back to / 5. The result was that the wrong price was showing on the tooltip as well! So I did the obvious: I removed the division from the sources and python. And that's what fixed it Thank you so much guys Best regards 1 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