-
Notifications
You must be signed in to change notification settings - Fork 551
Trade confirmation doesn't work with amounts over 255(applicable to Gil trades) #6282
Comments
The reason is the data type UINT8, range is between 0 and 255. Type needs to be changed and proper value checking should be implemented. I would do it, but I'm trying to update everything right now, and I have to set things back up for a client for darkstar. I looked at the source code for the version I already had (I last downloaded a zip around mar2018) and everything that involves quantities for items does use UINT32 instead of UINT8, but anything that says amount uses UINT8... could this be the problem? ( I only took a quick look) |
Yep. I've corrected this on my own server, but due to all the other funky customizations I've made it makes pull requests difficult. |
Clone dsp again, make a new branch and pull request. Or change branches on your own server to newest dsp |
in getConfirmedStatus that's the slot ID not the amount, so that one should be uint8 still. |
change amount values from uint8 to uint32 fixes issue #6282
I have:
Client Version (type
/ver
in game) :0.0.8319
Source Branch (master/stable) :
master
Additional Information (Steps to reproduce/Expected behavior) :
Should be able to reproduce this by attempting to confirmSlot or confirmItem on a trade involving Gil with an amount over 255, and then call trade:confirmTrade(). All of the amount parameters in the functions involved are defined as uint8.
src/map/trade_container.cpp
getConfirmedStatus
setConfirmedStatus
src/map/trade_container.h
getConfirmedStatus
setConfirmedStatus
std::vector m_confirmed;
The text was updated successfully, but these errors were encountered: