Closed kaleohanopahala closed 4 months ago
The problem that you can sell for more than your buy price it's not a problem because it's fully configurable by the developer. But you may want to tell us which NPC is having this behavior if you found one in the datapack.
The problem that you can sell for more than your buy price it's not a problem because it's fully configurable by the developer. But you may want to tell us which NPC is having this behavior if you found one in the datapack.
In the event that there is an NPC with an issue among the 1000+, adding a warning would be useful, wouldn't it? Additionally, if someone uses the base to create something custom and mistakenly configures it incorrectly, the same warning would be useful... PS: In the case of the image, I created an example of an error.
Try replacing this: https://github.com/opentibiabr/canary/blob/main/data/scripts/lib/register_npc_type.lua#L157-L162
that's why:
if shopItems.buy then
parent:setBuyPrice(shopItems.buy)
end
if shopItems.sell then
parent:setSellPrice(shopItems.sell)
end
if shopItems.buy and shopItems.sell then
if shopItems.buy <= shopItems.sell then
logger.warn("The item {} ({}) is being purchased by the NPC for a value greater than the value of its sale by the same NPC.", shopItems.itemName or shopItems.itemname, shopItems.clientId or shopItems.clientid)
end
end
This is the tenth time this nonsensical issue has been opened. This code from [luanluciano93] shows that there are no problems...
Leave and go dance the hula, please. Jajajajaj.
Priority
Missing Content
Area
What is missing?
Hello, I noticed that there isn't a check that could be important.
It's possible for an item to be sold at a price lower than its purchase price. Currently, there are no checks for this. Such a flaw may exist in one or more NPCs.
I can buy it for 12.
I can sell it for 22.
Code of Conduct