From 7eab582d8a8ee2af1a6baae7baf0696c7005de2e Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 15:16:44 -0400 Subject: fix: harden triggers, economy, casino, world data, and admin/net paths --- internal/game/cmd_swapid.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'internal/game/cmd_swapid.go') diff --git a/internal/game/cmd_swapid.go b/internal/game/cmd_swapid.go index ef862b9..9ee832a 100644 --- a/internal/game/cmd_swapid.go +++ b/internal/game/cmd_swapid.go @@ -141,12 +141,13 @@ func (g *Game) executeSwapID(sess *net.Session, args []string, rawInput string) updated++ } - // Migrate room-ID-embedded state across all characters (online + offline): - // discovered-exit player flags, current RoomID, EnterSeqRoom, MapSymbols, - // and RoomsVisited. This is what the player asked for — without it, - // swapid leaves every character's hidden_exit__ flags (and more) - // pointing at stale room IDs. - g.RewriteRoomIDs(idMap) + // Full runtime migration: Hub room buckets, casino room keys, world + // room-keyed state (ground items, seeded markers, object states), live + // mob instances, the room index, and every character's embedded room-ID + // state. Without this, a swap leaves live gameplay attached to the old + // locations until restart. This runs on the owner (swapid is executed + // from the owner command loop) and must not dispatch again. + g.MigrateRoomIDsOnOwner(idMap) sess.WriteLine(fmt.Sprintf("Swapped room IDs %d and %d (%d files updated).", id1, id2, updated)) } -- cgit v1.2.3