-
-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Price Discrepancy Issue in NPC Trading. #2702
Comments
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? |
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 |
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.
![image](https://private-user-images.githubusercontent.com/168607226/340972375-9414acda-e7c5-43ef-b777-e27eda6b4c0a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzczOTcsIm5iZiI6MTczOTU3NzA5NywicGF0aCI6Ii8xNjg2MDcyMjYvMzQwOTcyMzc1LTk0MTRhY2RhLWU3YzUtNDNlZi1iNzc3LWUyN2VkYTZiNGMwYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMzUxMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YWIyZDg2ZGFkYWFlZWJiNDEyOWEzYTcwZjVmNmU0YjNiNTIxZGMzZTkxYzAwNzVkOGVhMDk5NDliYWQwNTFkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.SomGQlGLvElrAb4yHcX7c8TLtNbnYlkpTd_Z_YtVgD8)
I can sell it for 22.
![image](https://private-user-images.githubusercontent.com/168607226/340972504-33b73a38-7659-4343-8e62-eee275434a52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzczOTcsIm5iZiI6MTczOTU3NzA5NywicGF0aCI6Ii8xNjg2MDcyMjYvMzQwOTcyNTA0LTMzYjczYTM4LTc2NTktNDM0My04ZTYyLWVlZTI3NTQzNGE1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMzUxMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZTgxN2Y2YmI0NGU0NjU5NzEyOTk5M2ZjNzIxN2ZjYmY4NmMyYjJlZjMwMGZmNmQyYzM3Mjg2NGIzMjliYWM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.i1E7kzVisYsDfkosHvyAZB86F-L05qpdjPxmITnazOI)
Code of Conduct
The text was updated successfully, but these errors were encountered: