You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A guild raid clear should add guild exp and guild fund. Each level's base amounts are in table/guildproperty.xml, and table/guildraid.xml holds the factor that scales them for each raid room. Nothing parsed guildraid.xml, so the emulator can't read those factors. This adds the type and TableParser.ParseGuildRaid().
Xml/Table/GuildRaid.cs, new: the four attributes each guildRaid row carries, dungeonRoomID, clearRaidPoint, clearGuildExp and clearGuildFund. The two factors are floats because the XML ships values like 1.25 and 1.75. feature and locale come from M2dFeatureLocale keyed on dungeonRoomID, the same way GuildQuestRewardFactor and GuildBuff filter their rows.
TableParser.cs: ParseGuildRaid() yields each row that survives feature filtering, keyed by room id. The file needs no sanitising.
TableParserTest.TestGuildRaid: under NA Live the parser returns exactly rooms 26001001 to 26005001. The test checks room 26001001 at 1000, 1 and 1, room 26004001 at 1000, 1.3 and 1.75, and room 26005001 at 1.4 and 2, as the shipped XML states. All rows are under GuildRaid01, which feature.xml sets to 35 for NA, below the NA Live setting of 47.
Version: 2.4.39.
The GMS2 file and the KMS2 end-of-service copy are the same 5 rows with the same attributes and values. They differ only in line endings, so the type fits both.
The consumer is MS2Community/PrivateMaple2#2272. Guild raid clears there add no guild exp or fund, and the fix needs this package.
Verification
dotnet build succeeds.
dotnet test Maple2.File.Tests --filter "FullyQualifiedName~TableParserTest" ran against the GMS2 archives. 158 passed and 1 failed. TestGuildRaid passes.
The failure is TestFieldMetaData, and it fails the same way on master without this change. Its assertion expects field 2000250's portal to field 2000114 to have portalIndoor set, but the shipped NA fieldmetadata.xml row has portalIndoor="0". I left it alone because it falls outside this change.
dotnet format whitespace --verify-no-changes is clean on the touched files.
dotnet pack Maple2.File.Parser/Maple2.File.Parser.csproj -c Release -p:PackageVersion=2.4.39-debug.0 was restored into a scratch emulator worktree, with Maple2.File.Ingest pointed at it. dotnet build Maple2.File.Ingest succeeded. A small probe there opened the real Xml.m2d the ingest reads, ran Filter.Load(reader, "NA", "Live") and ParseGuildRaid(), and printed 5 rows: 26001001 1000/1/1, 26002001 1000/1.1/1.25, 26003001 1000/1.2/1.5, 26004001 1000/1.3/1.75, 26005001 1000/1.4/2, all GuildRaid01.
Not run: the emulator's ingest, and anything in game. The emulator doesn't read this table yet.
I ran only TableParserTest, not the rest of Maple2.File.Tests.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
New Features
Added support for reading guild raid information, including dungeon identifiers, clear rewards, guild experience, and guild funds.
Raid entries now support locale-specific feature selection.
No actionable comments were generated in the recent review.
Walkthrough
The parser adds XML models and a ParseGuildRaid() method for guild raid table entries. The method yields each raid keyed by its dungeon room ID. A test checks five expected IDs and selected parsed values.
Changes: Guild raid parsing
Layer / File(s)
Summary
Guild raid XML model Maple2.File.Parser/Xml/Table/GuildRaid.cs
Adds XML models for the ms2 root and guild raid entries. The entry model exposes dungeon room ID and reward attributes, and the root applies locale selection to the raid list.
Parser integration and validation Maple2.File.Parser/TableParser.cs, Maple2.File.Tests/TableParserTest.cs, Maple2.File.Parser/Maple2.File.Parser.csproj
TableParser initializes the guild raid serializer and adds ParseGuildRaid() to deserialize table/guildraid.xml and yield entries keyed by dungeon room ID. The test checks five IDs and selected values. The package version changes from 2.4.38 to 2.4.39.
This adds parsing for the guild raid table with a matching test and a version bump. No functional risk was found, and the change is low risk to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "Parse table/guildraid.xml" names the main change. The PR adds a GuildRaid row type, GuildRaidRoot, and TableParser.ParseGuildRaid() to read table/guildraid.xml. The title is short, specific…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Parse table/guildraid.xml" names the main change. The PR adds a GuildRaid row type, GuildRaidRoot, and TableParser.ParseGuildRaid() to read table/guildraid.xml. The title is short, specific, and matches the changeset. It does not cover the version bump or the test, which is expected.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: ffc6d7c7-6c3b-4449-ab1a-60e24c1c3144
Commits
Reviewing files that changed from the base of the PR and between 7cbe52b and 378ed46.
Files selected for processing: 4
Maple2.File.Parser/Maple2.File.Parser.csproj
Maple2.File.Parser/TableParser.cs
Maple2.File.Parser/Xml/Table/GuildRaid.cs
Maple2.File.Tests/TableParserTest.cs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A guild raid clear should add guild exp and guild fund. Each level's base amounts are in
table/guildproperty.xml, andtable/guildraid.xmlholds the factor that scales them for each raid room. Nothing parsedguildraid.xml, so the emulator can't read those factors. This adds the type andTableParser.ParseGuildRaid().Xml/Table/GuildRaid.cs, new: the four attributes eachguildRaidrow carries,dungeonRoomID,clearRaidPoint,clearGuildExpandclearGuildFund. The two factors are floats because the XML ships values like1.25and1.75.featureandlocalecome fromM2dFeatureLocalekeyed ondungeonRoomID, the same wayGuildQuestRewardFactorandGuildBufffilter their rows.TableParser.cs:ParseGuildRaid()yields each row that survives feature filtering, keyed by room id. The file needs no sanitising.TableParserTest.TestGuildRaid: under NA Live the parser returns exactly rooms 26001001 to 26005001. The test checks room 26001001 at 1000, 1 and 1, room 26004001 at 1000, 1.3 and 1.75, and room 26005001 at 1.4 and 2, as the shipped XML states. All rows are underGuildRaid01, whichfeature.xmlsets to 35 for NA, below the NA Live setting of 47.The GMS2 file and the KMS2 end-of-service copy are the same 5 rows with the same attributes and values. They differ only in line endings, so the type fits both.
The consumer is MS2Community/PrivateMaple2#2272. Guild raid clears there add no guild exp or fund, and the fix needs this package.
Verification
dotnet buildsucceeds.dotnet test Maple2.File.Tests --filter "FullyQualifiedName~TableParserTest"ran against the GMS2 archives. 158 passed and 1 failed.TestGuildRaidpasses.TestFieldMetaData, and it fails the same way onmasterwithout this change. Its assertion expects field 2000250's portal to field 2000114 to haveportalIndoorset, but the shipped NAfieldmetadata.xmlrow hasportalIndoor="0". I left it alone because it falls outside this change.dotnet format whitespace --verify-no-changesis clean on the touched files.dotnet pack Maple2.File.Parser/Maple2.File.Parser.csproj -c Release -p:PackageVersion=2.4.39-debug.0was restored into a scratch emulator worktree, withMaple2.File.Ingestpointed at it.dotnet build Maple2.File.Ingestsucceeded. A small probe there opened the realXml.m2dthe ingest reads, ranFilter.Load(reader, "NA", "Live")andParseGuildRaid(), and printed 5 rows: 26001001 1000/1/1, 26002001 1000/1.1/1.25, 26003001 1000/1.2/1.5, 26004001 1000/1.3/1.75, 26005001 1000/1.4/2, allGuildRaid01.TableParserTest, not the rest ofMaple2.File.Tests.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit