Align pending-death XP logic and runtime config snapshot usage#31
Merged
Conversation
Agent-Logs-Url: https://github.com/Alexteens24/DynamicKeepInv/sessions/f4ca5fc6-a29f-4788-ab89-b1e94d4672a9 Co-authored-by: Alexteens24 <207885348+Alexteens24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Alexteens24/DynamicKeepInv/sessions/120bce4f-3272-4bd6-ada6-0999a42603f2 Co-authored-by: Alexteens24 <207885348+Alexteens24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Alexteens24/DynamicKeepInv/sessions/0224c97d-5332-4b52-bb3c-bfc4d1d7bbc7 Co-authored-by: Alexteens24 <207885348+Alexteens24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Alexteens24/DynamicKeepInv/sessions/59edc7c2-e399-4395-81f4-f7e140bd98e4 Co-authored-by: Alexteens24 <207885348+Alexteens24@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Alexteens24
April 13, 2026 14:04
View session
Alexteens24
marked this pull request as ready for review
April 13, 2026 14:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Static analysis highlighted a logic mismatch in XP handling and configuration reads that could cause inconsistent behavior across death-resolution paths. This PR consolidates those paths so runtime decisions use a single XP model and the active
DKIConfigsnapshot.XP handling parity in pending-death resolution
calculateTotalExperience(savedLevel, savedExp)across grave and natural-drop fallback flows.Runtime config reads moved to snapshot
getConfig()reads withplugin.getDKIConfig()in core runtime components (DynamicKeepInvPlugin,IntegrationManager,CommandCompleter,CommandDispatcher,StatsGUI,PendingDeathManager).Immediate snapshot refresh after command-driven config writes
enable/disable/togglemutations,refreshDKIConfig()is called to keep command behavior and runtime state synchronized.