Skip to content

Commit

Permalink
Fix ClaimStakingReward reward method
Browse files Browse the repository at this point in the history
  • Loading branch information
boscohyun committed May 4, 2021
1 parent e6cbf7a commit fc13b0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib9c/Action/ClaimStakingReward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public override IAccountStateDelta Execute(IActionContext context)
avatarState.UpdateV3(mail);
foreach (var rewardInfo in rewards)
{
ItemBase item = ItemFactory.CreateItem(itemSheet[rewardInfo.ItemId], context.Random);
var row = itemSheet[rewardInfo.ItemId];
var item = row is MaterialItemSheet.Row materialRow
? ItemFactory.CreateTradableMaterial(materialRow)
: ItemFactory.CreateItem(row, context.Random);
avatarState.inventory.AddItem(item, rewardInfo.Quantity);
}
stakingState.UpdateRewardMap(level, result, context.BlockIndex);
Expand Down

0 comments on commit fc13b0f

Please sign in to comment.