From 94a06fbbe682701ca4d4bd2a70cd74d8df29c932 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 25 Jun 2026 00:44:47 -0400 Subject: refactor: replaced map[string]any with typed structs for Data --- internal/game/cmd_shop.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/game/cmd_shop.go') diff --git a/internal/game/cmd_shop.go b/internal/game/cmd_shop.go index 59cf5ee..b293ff9 100644 --- a/internal/game/cmd_shop.go +++ b/internal/game/cmd_shop.go @@ -393,15 +393,15 @@ func (g *Game) leaveShop(sess *net.Session) { return } - nodeKey, _ := p.Action.Data["node"].(string) - - cfg, ok := p.Action.Data["talk_cfg"].(*action.TalkConfig) - if !ok || cfg == nil { + td, ok := p.Action.Data.(*action.TalkData) + if !ok || td.Cfg == nil { sess.State = net.StateGame g.cancelAction(p) g.writePrompt(sess) return } + nodeKey := td.Node + cfg := td.Cfg node, ok := cfg.Nodes[nodeKey] if !ok { -- cgit v1.2.3