Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: supreme revelation modifiers initialization #3009

Merged
merged 7 commits into from
Oct 27, 2024

Conversation

dudantas
Copy link
Member

@dudantas dudantas commented Oct 24, 2024

Description

This fixes several issues causing the "Supreme Revelation Perks" from the wheel to not work correctly.

Firstly, the m_value in wheel_gems.hpp was not being initialized, resulting in the extra points value always being 0.
Secondly, the order of variable initialization was incorrect, which caused the points to be used before they were loaded, also resulting in a value of 0.

Additionally, smaller functions were created to improve readability and maintainability, thus preventing future errors like this one.

Removed several unused Lua functions.

Behaviour

Actual

Attempting to use "Supreme Revelation Perks" results in no points being applied.

Expected

"Supreme Revelation Perks" should correctly apply the expected extra points.

Fixes #2780

How Has This Been Tested

  1. Insert a supreme revelation gem (tested with "Exori Amp Kor").
  2. Fill all slots on one side, except for one slot worth 150 points (making it a total of 850).
  3. With the supreme revelation gem active, the system correctly counted the total as 1000 points due to the additional 150 points provided by the gem, even with one slot missing. And the spell cooldown is set from 13 to 10 (the supreme revelation bonus).

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • My changes generate no new warnings

dudantas and others added 2 commits October 23, 2024 21:08
This fixes several issues causing the "Supreme Revelation Perks" from the wheel to not work correctly.

Firstly, the `m_value` in `wheel_gems.hpp` was not being initialized, resulting in the extra points value always being 0.
Secondly, the order of variable initialization was incorrect, which caused the points to be used before they were loaded, also resulting in a value of 0.

Additionally, smaller functions were created to improve readability and maintainability, thus preventing future errors like this one.
phacUFPE

This comment was marked as resolved.

@dudantas
Copy link
Member Author

Vessels stopped to work, I tested with a Knight using a lesser gem that grants 100 mana, and it didn't applied. It seems to be because the vessel bonus are applied before the player bonus register and when the player bonus is registered it resets the stats, meaning that all vessel stats applied will be lost.

Fixed, please test again.

Copy link
Contributor

@phacUFPE phacUFPE left a comment

Choose a reason for hiding this comment

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

Now it's working as expected.

Copy link

@dudantas dudantas merged commit 567d139 into main Oct 27, 2024
35 checks passed
@dudantas dudantas deleted the dudantas/fix-wheel-revelation-perks branch October 27, 2024 19:47
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.

Gems Not working
3 participants