From 7066908dfd141ca541b4a64bd205518c1d379a6c Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Fri, 1 Nov 2024 15:15:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=AF=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_player.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index 353eacf..63a1df9 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -3134,12 +3134,19 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in if msg.GuideId == 0 { return nil } - if PlatformMgrSingleton.GetConfig(p.Platform).GuideConfig.Info[msg.GuideId] == nil { + var cfg *webapi_proto.GuideInfo + for _, info := range PlatformMgrSingleton.GetConfig(p.Platform).GuideConfig.Info { + if info.GuideId == msg.GuideId { + cfg = info + break + } + } + if cfg == nil { pack.OpRetCode = player_proto.OpResultCode_OPRC_Guide_Close send() return nil } - cfg := PlatformMgrSingleton.GetConfig(p.Platform).GuideConfig.Info[msg.GuideId] + switch msg.GetTp() { case common.AttributeGuideStep: if len(msg.GetParam()) == 0 || msg.GetParam()[0] == 0 {