Skip to content

✨ (gui) allow including oceania if cross-dc selected#110

Merged
fmauNeko merged 1 commit intodevelopfrom
feature/include_oceania_in_cross_dc
Dec 17, 2025
Merged

✨ (gui) allow including oceania if cross-dc selected#110
fmauNeko merged 1 commit intodevelopfrom
feature/include_oceania_in_cross_dc

Conversation

@fmauNeko
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 11:37
Copy link

Copilot AI left a 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 adds a configurable option to include Oceania data center market data when using Cross-DC filtering for players in other regions (Japan, North America, Europe). The feature helps players access broader market data across all regions.

  • Adds a new configuration property IncludeOceaniaDC (default: true) to control Oceania DC inclusion
  • Implements market data fetching and merging logic to combine Oceania listings with the player's region when Cross-DC is selected
  • Fixes region name detection to use HomeWorld instead of CurrentWorld

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
MarketBoardPlugin/MBPluginConfig.cs Adds new IncludeOceaniaDC configuration property with documentation
MarketBoardPlugin/GUI/MarketBoardWindow.cs Updates region detection logic and implements Oceania data fetching/merging when Cross-DC filter is active
MarketBoardPlugin/GUI/MarketBoardConfigWindow.cs Adds UI checkbox to toggle Oceania DC inclusion with config save and market data reset

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1206 to +1230
if (this.marketData == null)
{
this.marketData = oceaniaMarketData;
}
else
{
foreach (var listing in oceaniaMarketData.Listings)
{
this.marketData.Listings.Add(listing);
}

foreach (var history in oceaniaMarketData.RecentHistory)
{
this.marketData.RecentHistory.Add(history);
}

this.marketData.Listings = this.marketData.Listings
.OrderBy(l => l.PricePerUnit)
.Take(this.plugin.Config.ListingCount)
.ToList();
this.marketData.RecentHistory = this.marketData.RecentHistory
.OrderByDescending(h => h.Timestamp)
.Take(this.plugin.Config.HistoryCount)
.ToList();
}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When merging Oceania market data with the existing region's data, the metadata fields (DcName, LastUploadTime, AveragePrice, AveragePriceNq, AveragePriceHq, SaleVelocity, SaleVelocityNq, SaleVelocityHq, and StackSizeHistogram fields) from the original response are not updated. This means the merged data will only reflect the metadata from the first region's response, which could be misleading since the data now includes listings and history from both regions. Consider recalculating or appropriately handling these metadata fields after merging.

Copilot uses AI. Check for mistakes.
@fmauNeko fmauNeko merged commit 31f86d2 into develop Dec 17, 2025
6 checks passed
@fmauNeko fmauNeko deleted the feature/include_oceania_in_cross_dc branch December 17, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants