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.
This pull request includes several changes to the
WorldBossReward
andWorldBossSeasonReward
classes to improve the handling of null states and update reward calculations. The most important changes include adding null checks, modifying error messages, and updating damage display logic.Improvements to null state handling:
nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossReward.cs
: Added a null check forpreRaiderState
to ensure notifications are set correctly and avoid potential null reference exceptions.nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossSeasonReward.cs
: Added a null check forworldBossState
in theSet
method to handle cases whereworldBossState
might be null and to modify the error message accordingly.Updates to reward calculations and display:
nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossSeasonReward.cs
: Updated the logic to displayworldBossTotalDamage
anduserTotalDamage
correctly, ensuring thatworldBossTotalDamage
is set before checking ifraider
is null.nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossSeasonReward.cs
: Removed redundant setting ofworldBossTotalDamage
whenraider
is null and streamlined the damage display logic.Miscellaneous changes:
nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossSeasonReward.cs
: Changed the condition to check if the calculatedamount
is greater than zero usingMath.Floor
to avoid potential issues with floating-point precision.nekoyume/Assets/_Scripts/UI/Module/WorldBoss/WorldBossSeasonReward.cs
: Added theSystem
namespace import for better handling of mathematical operations.