Skip to content

Commit

Permalink
Merge pull request #3038 from planetarium/fix/adventureboss-bug
Browse files Browse the repository at this point in the history
fix floor error
  • Loading branch information
jonny-jeahyunchoi authored Nov 25, 2024
2 parents 57ec735 + 7db9074 commit 5946f1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib9c/Action/AdventureBoss/ExploreAdventureBoss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ public override IWorld Execute(IActionContext context)
for (var fl = explorer.Floor + 1; fl < explorer.MaxFloor + 1; fl++)
{
// Get Data for simulator
var floorRow = floorRows.First(row => row.Floor == fl);
if (!floorSheet.TryGetValue(fl, out var flRow))
var floorRow = floorRows.FirstOrDefault(row => row.Floor == fl);
if (floorRow == null)
{
throw new SheetRowNotFoundException(addressesHex, nameof(floorSheet), fl);
}
Expand All @@ -263,7 +263,7 @@ public override IWorld Execute(IActionContext context)
}

var rewards =
AdventureBossSimulator.GetWaveRewards(random, flRow, materialItemSheet);
AdventureBossSimulator.GetWaveRewards(random, floorRow, materialItemSheet);

// Use AP Potion
if (!avatarState.inventory.RemoveFungibleItem(material.ItemId, context.BlockIndex,
Expand Down

0 comments on commit 5946f1f

Please sign in to comment.