Skip to content

[C++] [lua] Add equipment slot tracking to enchantment item usage, audit ring enchantments - #11093

Draft
Skold177 wants to merge 1 commit into
LandSandBoat:basefrom
Skold177:Enchantment-Rings-Audit
Draft

[C++] [lua] Add equipment slot tracking to enchantment item usage, audit ring enchantments#11093
Skold177 wants to merge 1 commit into
LandSandBoat:basefrom
Skold177:Enchantment-Rings-Audit

Conversation

@Skold177

@Skold177 Skold177 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Sets up onItemUse and onItemUnequip to pass the equipment slot so that enchantments in the ring/earring slots stack and remove their effects properly. Also closes an edge case where a subType in the item effect could unintentionally be fed as a itemID (which is part of the reason this didn't work correctly to begin with)

Test included.

Steps to test these changes

!additem Armored Ring x2
/checkparam yourself
note defense
equip them both, see items stack
remove one, see one enchantment leave + lose 9 defense (1+ 8 from the enchantment)
remove the other

@Skold177
Skold177 force-pushed the Enchantment-Rings-Audit branch from 577a501 to 767df1b Compare August 11, 2026 00:38
@Skold177

Copy link
Copy Markdown
Contributor Author

Don't 100% know if this is the best way to do it this, so opening as a draft for feedback, if we like it, i'll undraft!

@Skold177
Skold177 force-pushed the Enchantment-Rings-Audit branch 3 times, most recently from 4e7d918 to 51bb86c Compare August 11, 2026 00:44
Adds equipment slot tracking to item usage, which is needed to implement enchantment items like Vision Ring & Mighty Ring properly.
@Skold177
Skold177 force-pushed the Enchantment-Rings-Audit branch from 51bb86c to 0879a22 Compare August 11, 2026 01:05
Comment thread src/map/status_effect_container.cpp
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