Skip to content

Fix Script Condition#65

Merged
AngeloTadeucci merged 1 commit intoMS2Community:masterfrom
Zintixx:script-condition-fix
May 6, 2026
Merged

Fix Script Condition#65
AngeloTadeucci merged 1 commit intoMS2Community:masterfrom
Zintixx:script-condition-fix

Conversation

@Zintixx
Copy link
Copy Markdown

@Zintixx Zintixx commented May 6, 2026

Summary by CodeRabbit

  • New Features

    • Added dungeon-related attributes to quest and NPC systems.
  • Chores

    • Updated package version to 2.4.8.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

📝 Walkthrough

Walkthrough

The PR bumps the package version from 2.4.7 to 2.4.8 and adds two new dungeon reward ID fields (receivedRewardDungeonID and completeRewardDungeonID) to both the NpcScriptCondition and QuestScriptCondition XML-serializable classes.

Changes

Dungeon Reward ID Schema

Layer / File(s) Summary
Data Schema
Maple2.File.Parser/Xml/Table/Server/NpcScriptCondition.cs, Maple2.File.Parser/Xml/Table/Server/QuestScriptCondition.cs
Added receivedRewardDungeonID and completeRewardDungeonID as [XmlAttribute] integer fields to both NpcScriptCondition and QuestScriptCondition classes for XML deserialization.
Version Release
Maple2.File.Parser/Maple2.File.Parser.csproj
PackageVersion incremented from 2.4.7 to 2.4.8.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3–5 minutes

Possibly related PRs

  • MS2Community/Maple2.File#47: Modifies QuestScriptCondition class with field initializations, related to the same schema being extended in this PR.

Suggested reviewers

  • AngeloTadeucci

Poem

🐰 A dungeon reward doth bloom,
Two ID fields make their room,
In quest and NPC script so bright,
Version bumps to 2.4.8's light!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix Script Condition' is vague and does not clearly describe what specific issue is being fixed or what changes are being made. Consider revising the title to be more specific, such as 'Add dungeon ID fields to Script Condition classes' or 'Add receivedRewardDungeonID and completeRewardDungeonID to NpcScriptCondition and QuestScriptCondition'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 714f64d and b92b754.

📒 Files selected for processing (3)
  • Maple2.File.Parser/Maple2.File.Parser.csproj
  • Maple2.File.Parser/Xml/Table/Server/NpcScriptCondition.cs
  • Maple2.File.Parser/Xml/Table/Server/QuestScriptCondition.cs

Comment thread Maple2.File.Parser/Xml/Table/Server/NpcScriptCondition.cs
Comment thread Maple2.File.Parser/Xml/Table/Server/QuestScriptCondition.cs
@AngeloTadeucci AngeloTadeucci merged commit 2e17cc3 into MS2Community:master May 6, 2026
3 checks passed
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