cleanup
This commit is contained in:
parent
011269acab
commit
bb8f50116a
5 changed files with 98 additions and 89 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 MiB After Width: | Height: | Size: 7.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 MiB After Width: | Height: | Size: 6.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 332 KiB |
|
|
@ -58,6 +58,8 @@ public class BossRunExecutor : GameExecutor
|
|||
public override void Stop()
|
||||
{
|
||||
base.Stop();
|
||||
_nav.Frozen = false;
|
||||
FightPosition = null;
|
||||
Log.Information("Boss run executor stop requested");
|
||||
}
|
||||
|
||||
|
|
@ -358,7 +360,10 @@ public class BossRunExecutor : GameExecutor
|
|||
FightPosition = (fightWorldX, fightWorldY);
|
||||
await WalkToWorldPosition(fightWorldX, fightWorldY, cancelWhen: IsBossAlive);
|
||||
_nav.Frozen = true; // Lock canvas — position tracking only
|
||||
if (_stopped) { _nav.Frozen = false; return; }
|
||||
|
||||
try
|
||||
{
|
||||
if (_stopped) return;
|
||||
|
||||
// 3x fight-then-well loop
|
||||
for (var phase = 1; phase <= 3; phase++)
|
||||
|
|
@ -455,9 +460,13 @@ public class BossRunExecutor : GameExecutor
|
|||
if (_stopped) return;
|
||||
|
||||
StopBossDetection();
|
||||
Log.Information("Fight complete");
|
||||
}
|
||||
finally
|
||||
{
|
||||
_nav.Frozen = false;
|
||||
FightPosition = null;
|
||||
Log.Information("Fight complete");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ internal sealed class D2dEnemyBoxLayer : ID2dOverlayLayer, IDisposable
|
|||
if (state.FightPosition is var (fx, fy))
|
||||
{
|
||||
const double worldToScreen = 835.0 / 97.0; // inverse of screenToWorld
|
||||
const int screenCx = 1280, screenCy = 720;
|
||||
const int screenCx = 1280, screenCy = 660; // player character screen position
|
||||
var wp = state.NavPosition;
|
||||
var sx = (float)(screenCx + (fx - wp.X) * worldToScreen);
|
||||
var sy = (float)(screenCy + (fy - wp.Y) * worldToScreen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue