Skip to content

Comments

741 custom character stat storing#781

Open
Iir0R wants to merge 1 commit intodevfrom
741-custom-character-stat-storing
Open

741 custom character stat storing#781
Iir0R wants to merge 1 commit intodevfrom
741-custom-character-stat-storing

Conversation

@Iir0R
Copy link
Collaborator

@Iir0R Iir0R commented Feb 21, 2026

Brief description

Updated customCharacter.service to meet required changes in #741 Custom character stat storing. Also changes to tests.

Change list

  • New function: addValues, gets document as POJO, adds matching base stats, returns result.
  • New function: getFieldsToUpdate, adds key value pairs to correct key, $inc or $set.
  • createOne creates a new character with stat deltas starting at 0, returns base + deltas.
  • readOneById, readOne, readMany and readPlayerBattleCharacters use addValues, return base + deltas.
  • updateOneById and updateOneByCondition use getFieldsToUpdate to increment deltas and set others.
  • Changes to tests custom character files to match new results.

Copy link
Member

@hoan301298 hoan301298 left a comment

Choose a reason for hiding this comment

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

Sorry for this inconvenience, but this PR has many changes and need to be tested later on. I am still reviewing it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants