Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix floor order #2656

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ public override IWorld Execute(IActionContext context)
.First(row => row.BossId == latestSeason.BossId).Id;
var floorRows = states.GetSheet<AdventureBossFloorSheet>().OrderedList
.Where(row => row.AdventureBossId == adventureBossId).ToList();
var firstFloorId = floorRows.First(r => r.Floor == 1).Id;
var floorId = floorRows.First(r => r.Floor == explorer.Floor).Id;

var simulator = new AdventureBossSimulator(
Expand Down
7 changes: 4 additions & 3 deletions Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public Player Simulate()
return Player;
}

public void AddBreakthrough(IEnumerable<int> floorIdList,
public void AddBreakthrough(List<int> floorIdList,
AdventureBossFloorWaveSheet adventureBossFloorWaveSheet)
{
if (Log.events.Count == 0)
Expand All @@ -255,10 +255,11 @@ public void AddBreakthrough(IEnumerable<int> floorIdList,
}

// Add event in reversed order to keep insert position
foreach (var floorId in floorIdList)
for (var i = 0; i < floorIdList.Count; i++)
{
var floorId = floorIdList[i];
var floorWave = adventureBossFloorWaveSheet[floorId].Waves[0];
Log.events.Insert(1, new Breakthrough(Player, floorId, floorWave.Monsters));
Log.events.Insert(i + 1, new Breakthrough(Player, floorId, floorWave.Monsters));
}
}

Expand Down
Loading