Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

HardMode Player Settings Not Saving Correctly #10

@Auz-kiee

Description

@Auz-kiee

When enabling or disabling hard modes for players, the player settings were not being saved correctly in the hardmode_player_settings table. This issue caused players' hard mode statuses not to persist or update as expected.
This has occurred only once in perhaps 80 test characters/debug testing attempts.

Steps to Reproduce:
Enable a hard mode for a player.
Check the hardmode_player_settings table and observe that the player's GUID and mode are not correctly recorded.

Root Cause:
The SavePlayerSettings, SavePlayerSetting, and UpdateModeForPlayer methods in the HardModeHandler class did not have proper logging or handling for database operations, leading to failures in saving player settings.

Resolution:
Updated the following methods to include proper logging and ensure database operations execute correctly:
SavePlayerSettings
SavePlayerSetting
UpdateModeForPlayer

Fix Details:
Added logging after database execution in SavePlayerSetting to confirm data saving.
Ensured player settings are correctly fetched and saved in SavePlayerSettings.
Validated player mode updates in UpdateModeForPlayer to reflect changes accurately.

This issue occurred once only in all my time using this module but it could be isolated to just me, wanted to raise it in the event you also notice the issue. Cheers mate
-Auzkiee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions