Open pedrohfk opened 2 months ago
I didn't understand, what bugged?
I didn't understand, what bugged?
44 upgrade potions = 2kkk gold coins 1405 upgrade potions = 1kkk500kk gold coins.
It seems to me that the NPC is getting lost in the midst of so much money.
Surely someone type of variable is like uint32_t and makes values above 4,294,967,295 impossible. You can test, values above this should be buggy.
I also have this problem
Does anyone know if there is a way to enable purchases up to x value?
the problem is with the cip client limitation, it receives a 32-bit integer, the maximum transaction value must be 4,294,967,295
the problem is with the cip client limitation, it receives a 32-bit integer, the maximum transaction value must be 4,294,967,295
But in this case there is some lock that we can put in place to prevent this bug from occurring.?
the problem is with the cip client limitation, it receives a 32-bit integer, the maximum transaction value must be 4,294,967,295
But in this case there is some lock that we can put in place to prevent this bug from occurring.?
I would use another currency on the NPC, something worth 1kk for example
@dudantas Can you see if we can put a check so this doesn't happen?
@pedrohfk try putting it here: https://github.com/opentibiabr/canary/blob/main/src/server/network/protocol/protocolgame.cpp#L8128//
if (shopBlock.itemBuyPrice >= 4294967295 || shopBlock.itemSellPrice >= 4294967295) {
g_logger().error("[{}] itemid {} being sold/bought above the allowed value.", __FUNCTION__, shopBlock.itemId);
return;
}
Priority
Critical
Area
What happened?
I have a custom NPC that sells items with very high prices, however, if the player has a very high amount of gold he may end up bugging the NPC.
What OS are you seeing the problem on?
Linux
Code of Conduct