From a5b7e7c07d3b7e850c70965ac4d069dca6c6883a Mon Sep 17 00:00:00 2001 From: hyeon Date: Thu, 27 Jun 2024 10:24:46 +0900 Subject: [PATCH] INsert Breakthrough event in order --- Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs | 1 - Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs b/Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs index b433852f6d..5773592754 100644 --- a/Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs +++ b/Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs @@ -187,7 +187,6 @@ public override IWorld Execute(IActionContext context) .First(row => row.BossId == latestSeason.BossId).Id; var floorRows = states.GetSheet().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( diff --git a/Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs b/Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs index 7dccfd388e..2a0f875c28 100644 --- a/Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs +++ b/Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs @@ -246,7 +246,7 @@ public Player Simulate() return Player; } - public void AddBreakthrough(IEnumerable floorIdList, + public void AddBreakthrough(List floorIdList, AdventureBossFloorWaveSheet adventureBossFloorWaveSheet) { if (Log.events.Count == 0) @@ -255,10 +255,11 @@ public void AddBreakthrough(IEnumerable 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)); } }