mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Close expedition/run seam on combat loss & flee
Run-loss paths (turn-based elite/boss death + flee, exploration combat death/retreat, interrupt/patrol death) abandoned the zone run but left the wrapping expedition row at status='active', so the ambient ticker kept DMing about a dungeon the player had walked away from. Adds forceExtractExpeditionForRunLoss helper and wires it into every run-loss site; ambient ticker also skips when the expedition's run is no longer active as a safety net. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,15 @@ func (p *AdventurePlugin) fireExpeditionAmbients(now time.Time) {
|
||||
if e.Status != ExpeditionStatusActive {
|
||||
continue
|
||||
}
|
||||
// Safety net: if the wrapping zone run is abandoned or completed,
|
||||
// the player has functionally left the dungeon even though the
|
||||
// expedition row hasn't been flipped. Skip silently rather than
|
||||
// DM about a place they're no longer in.
|
||||
if e.RunID != "" {
|
||||
if run, _ := getZoneRun(e.RunID); run != nil && !run.IsActive() {
|
||||
continue
|
||||
}
|
||||
}
|
||||
uid := id.UserID(e.UserID)
|
||||
if hasActiveCombatSession(uid) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user