Skip to content

Commit

Permalink
Fix update of inventory panel weight label
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Mar 29, 2022
1 parent ca5dc9d commit 8459c42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions EndlessClient/HUD/Panels/InventoryPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ protected override void OnUpdateControl(GameTime gameTime)
some: stats =>
{
stats.SomeWhen(s => s != _characterProvider.MainCharacter.Stats)
.MatchSome(s =>
.MatchSome(_ =>
{
_cachedStats = Option.Some(_characterProvider.MainCharacter.Stats);
_weightLabel.Text = $"{stats[CharacterStat.Weight]} / {stats[CharacterStat.MaxWeight]}";
var newStats = _characterProvider.MainCharacter.Stats;
_cachedStats = Option.Some(newStats);
_weightLabel.Text = $"{newStats[CharacterStat.Weight]} / {newStats[CharacterStat.MaxWeight]}";
});
},
none: () =>
Expand Down

0 comments on commit 8459c42

Please sign in to comment.