Fix Script Condition#65
Conversation
📝 WalkthroughWalkthroughThe PR bumps the package version from 2.4.7 to 2.4.8 and adds two new dungeon reward ID fields ( ChangesDungeon Reward ID Schema
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3–5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Maple2.File.Parser/Xml/Table/Server/NpcScriptCondition.cs`:
- Around line 40-41: The two new XML-attribute integer fields
receivedRewardDungeonID and completeRewardDungeonID in class NpcScriptCondition
(and the same-named fields in QuestScriptCondition) must be given the same unset
sentinel as other optional ints; initialize both fields to -1 to preserve
"unset" semantics so they do not deserialize to 0 when the attribute is absent;
update the field declarations in NpcScriptCondition and in QuestScriptCondition
to include the default value -1.
In `@Maple2.File.Parser/Xml/Table/Server/QuestScriptCondition.cs`:
- Around line 40-41: QuestScriptCondition currently declares the fields
receivedRewardDungeonID and completeRewardDungeonID without default values so
they deserialize to 0; change their declarations in the QuestScriptCondition
class to initialize both fields to -1 (the sentinel used elsewhere for optional
condition attributes) so absent XML leaves them unset, and apply the same
initialization fix to the identical fields in NpcScriptCondition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 34c9b812-b2b9-4e2a-9de0-a5b4f3868364
📒 Files selected for processing (3)
Maple2.File.Parser/Maple2.File.Parser.csprojMaple2.File.Parser/Xml/Table/Server/NpcScriptCondition.csMaple2.File.Parser/Xml/Table/Server/QuestScriptCondition.cs
Summary by CodeRabbit
New Features
Chores