Skip to content

Commit

Permalink
Fix InvalidBlockStateRootHashException
Browse files Browse the repository at this point in the history
  • Loading branch information
ipdae committed Jul 25, 2023
1 parent 4ab3207 commit c543f7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Lib9c/Model/Quest/ItemEnhancementQuest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public int Count
private Integer? _serializedGrade;
private int _grade;
private Integer? _serializedCount;
// Do not use this field. it can be different check result
private int _count;
public override float Progress => (float) _current / Count;

Expand All @@ -65,15 +66,15 @@ public override void Check()
if (Complete)
return;

Complete = _count == _current;
Complete = Count == _current;
}

public override string GetProgressText() =>
string.Format(
CultureInfo.InvariantCulture,
GoalFormat,
Math.Min(_count, _current),
_count
Math.Min(Count, _current),
Count
);

public void Update(Equipment equipment)
Expand All @@ -94,6 +95,6 @@ public void Update(Equipment equipment)
public override IValue Serialize() =>
((Dictionary) base.Serialize())
.Add("grade", _serializedGrade ?? Grade)
.Add("count", _serializedCount ?? _count);
.Add("count", _serializedCount ?? Count);
}
}

0 comments on commit c543f7e

Please sign in to comment.