Persist Explosive Shot cooldown in SQL database - #5345
Open
cyrne1-7208 wants to merge 1 commit into
Open
cyrne1-7208 wants to merge 1 commit into
cyrne1-7208 wants to merge 1 commit into
Conversation
In SQLDatabaseManager, cooldowns.archery is mapped to SuperAbilityType.EXPLOSIVE_SHOT on load, but updateCooldowns() omitted the column from its UPDATE query and parameter bindings. As a result, Explosive Shot cooldowns were never persisted to SQL. This change: - Adds archery to updateCooldowns() and binds profile.getAbilityDATS(SuperAbilityType.EXPLOSIVE_SHOT) in schema/load order. - Adds whenSavingUserShouldPersistExplosiveShotCooldown() parameterized test in SQLDatabaseManagerTest to verify cooldown preservation on save and reload across supported SQL databases. Signed-off-by: Cyrne1_7208 <127477265+cyrne1-7208@users.noreply.github.com>
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.
Summary
Persists the Explosive Shot cooldown (
SuperAbilityType.EXPLOSIVE_SHOT) in the SQL database duringsaveUser().Previously,
SQLDatabaseManager.loadFromResult()loadedcooldowns.archeryintoskillsDATSasEXPLOSIVE_SHOT, butSQLDatabaseManager.updateCooldowns()omitted thearcherycolumn from itsUPDATEstatement and parameter bindings. As a result, Explosive Shot cooldowns were not persisted across server restarts or reconnects on SQL-backed databases.Changes
SQLDatabaseManager.java, addarchery = ?to thecooldownsUPDATE query and bindprofile.getAbilityDATS(SuperAbilityType.EXPLOSIVE_SHOT)in schema/load order.SQLDatabaseManagerTest.java, add parameterized integration testwhenSavingUserShouldPersistExplosiveShotCooldown(DbFlavor)under// Saving cooldownsverifying cooldown preservation acrosssaveUser()andloadPlayerProfile()on both MySQL and MariaDB.Testing
mvn test-compile.mvn test(1,789 non-Docker tests passed).mvn test -Psql-tests -Dtest=SQLDatabaseManagerTest(all 89 MySQL and MariaDB integration tests passed, including the newwhenSavingUserShouldPersistExplosiveShotCooldowntest on both engines).