-
-
Notifications
You must be signed in to change notification settings - Fork 753
fix: party hunt loot values (market data) #3725
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
base: main
Are you sure you want to change the base?
Conversation
|
Ready to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the party hunt loot value calculation to use market historical data instead of NPC prices when "Market Data" is selected. The change ensures party hunt analyzer behavior matches the global market value system by using average historical market prices as the primary source, with NPC prices as fallback.
- Implements new
getItemMarketAveragePricefunction that calculates average from historical purchase and sale data - Updates party hunt loot and supply price calculations to use market averages when market price type is selected
- Cleans up garbage item definitions in shop configuration
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| src/game/game.hpp | Adds declaration for new market average price calculation function |
| src/game/game.cpp | Implements market average price calculation and adds debug logging to existing price function |
| src/creatures/players/grouping/party.cpp | Updates party loot/supply tracking to use market averages instead of NPC prices when market mode is selected |
| data/scripts/lib/shops.lua | Removes most garbage items from the list and adds conditional check to prevent empty iterations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
db15b07 to
1c8c416
Compare
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
Description
Currently, Party Hunt loot values (specifically for market data) don't behave like Global values.
### OBSERVATION
Small differences still occur due to missing NPCs in the canary folders. For example, Meat has the highest price value from an NPC called 'Fral the Butcher' (15GP), but due to its being missing, the canary server will send NPC Arito/Jezzara (10GP). Creating differences between Supply Analyzer and Party Hunt Analyzer.
Behaviour
Actual
When selecting Market from Party Hunt analyzer, the values never use market historical data to generate an average of value.
Expected
Expects to get the item's average historical data from the market (Buy Average + Sell Average) / 2. If no historical data in the server, then fall back to buy data value (NPCs).
Type of change
Please delete options that are not relevant.
How Has This Been Tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
CIP Client
OTC Redemption + Party Member

Test Configuration:
Checklist