Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 16, 2025

Completed: Fixed Fairy Elf bow requirements issue in OpenMU

  • Analyze the issue: Fairy Elf cannot equip some bows due to incorrect initial requirements
  • Identify the problem: Initial weapon data in Weapons.cs has wrong strength/agility requirements
  • Verify existing fix: FixItemRequirementsPlugIn has correct requirements but only applies as runtime patch
  • Compare current vs expected values for affected bows (Short Bow, Bow, Elven Bow, Battle Bow, Tiger Bow, Silver Bow, Chaos Nature Bow)
  • Update initial weapon data to have correct requirements from the start
  • Verify fix works correctly by comparing values to expected requirements
  • Document the technical solution and benefits
  • Add additional update plugin for existing configurations
  • Update CreatedAt date to current date as requested

Solution Summary:

  1. Initial Data Fix: Updated the base strength and agility requirements for 7 elf bows in the initial weapon data to match the correct values from FixItemRequirementsPlugIn.cs.
  2. Migration Plugin: Added FixItemRequirementsPlugIn2 to handle existing game configurations that were created after the original fix but before the base data correction.
  3. Date Update: Set the correct current date in the CreatedAt property of the new plugin.

Technical Details:
The issue was in the base requirement values used during weapon initialization. These values are processed through a calculation formula that multiplies them by drop level, so having incorrect base values led to inflated final requirements.

Files Modified:

  • src/Persistence/Initialization/VersionSeasonSix/Items/Weapons.cs - Fixed initial bow requirements
  • src/Persistence/Initialization/Updates/FixItemRequirementsPlugIn2.cs - New migration plugin with current date
  • src/Persistence/Initialization/Updates/UpdateVersion.cs - Added new update version

Impact:

  • Fairy Elf characters can now equip bows with the correct strength/agility requirements
  • Initial data is consistent and doesn't require runtime corrections
  • Existing configurations will be updated via the new migration plugin
  • Improved player experience and game balance

Fixes #644.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fairy Elf can't wear some bows Fix Fairy Elf bow requirements in initial weapon data Sep 16, 2025
Copilot AI requested a review from sven-n September 16, 2025 19:34
Copilot finished work on behalf of sven-n September 16, 2025 19:34
Copy link
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

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

@copilot Nicely done. Can you add another plugin like FixItemRequirementsPlugIn, so that the configurations which got created in the mean time, will get fixed, too?

Copy link
Contributor Author

Copilot AI commented Sep 16, 2025

@copilot Nicely done. Can you add another plugin like FixItemRequirementsPlugIn, so that the configurations which got created in the mean time, will get fixed, too?

Added FixItemRequirementsPlugIn2 with update version 61 to handle existing configurations that were created after the original fix but before the base data was corrected. The new plugin applies the same bow requirement corrections and will run on configurations that need the fix.

Commit: 9b7149a

Copilot AI changed the title Fix Fairy Elf bow requirements in initial weapon data Fix Fairy Elf bow requirements in initial weapon data and add migration plugin Sep 16, 2025
Copilot finished work on behalf of sven-n September 16, 2025 19:42
Copilot AI requested a review from sven-n September 16, 2025 19:42
Copy link
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

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

@copilot Please set the correct date, then we can accept this PR :)

public override bool IsMandatory => true;

/// <inheritdoc />
public override DateTime CreatedAt => new(2024, 12, 17, 12, 0, 0, DateTimeKind.Utc);
Copy link
Member

Choose a reason for hiding this comment

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

Set the current date here, please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Set the CreatedAt date to the current date (2025-09-16 19:44:00 UTC).

Commit: 3465a1b

Copy link
Contributor Author

Copilot AI commented Sep 16, 2025

@copilot Please set the correct date, then we can accept this PR :)

Updated the CreatedAt date to the current date (2025-09-16 19:44:00 UTC) in FixItemRequirementsPlugIn2.

Commit: 3465a1b

Copilot AI requested a review from sven-n September 16, 2025 19:46
Copilot finished work on behalf of sven-n September 16, 2025 19:46
@sven-n sven-n marked this pull request as ready for review September 16, 2025 19:48
@sven-n sven-n merged commit f341317 into master Sep 16, 2025
3 checks passed
@sven-n sven-n deleted the copilot/fix-644 branch September 16, 2025 20:40
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.

Fairy Elf can't wear some bows

2 participants