From 886647346762256a4f660c71e4ce2d44fa6d6503 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 8 Nov 2024 14:33:24 +0800 Subject: [PATCH] no message --- model/player.go | 1 + worldsrv/player.go | 5 ++++- worldsrv/trascate_webapi.go | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/model/player.go b/model/player.go index 47cdda5..9175873 100644 --- a/model/player.go +++ b/model/player.go @@ -967,6 +967,7 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform AccountType: accountType, DeviceOS: deviceOS, ClientVer: clientVer, + GuideData: make(map[int32]int32), } pd.InitNewData(params) diff --git a/worldsrv/player.go b/worldsrv/player.go index 50f3f2e..448fce8 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -176,6 +176,9 @@ func (this *Player) init() bool { if this.VCardCost < 0 { this.VCardCost = 0 } + if this.GuideData == nil { + this.GuideData = make(map[int32]int32) + } this.InitRolesAndPets() return true } @@ -4534,7 +4537,7 @@ func (this *Player) GetSkillAdd(id int32) int32 { func (this *Player) SCGuide() { cfg := PlatformMgrSingleton.GetConfig(this.Platform).GuideConfig pack := &playerproto.SCGuideConfig{} - for _, data := range cfg.Info { + for _, data := range cfg.GetInfo() { var awards []*playerproto.ItemInfo for _, award := range data.Awards { item := &playerproto.ItemInfo{ diff --git a/worldsrv/trascate_webapi.go b/worldsrv/trascate_webapi.go index 8911dca..ba1a94e 100644 --- a/worldsrv/trascate_webapi.go +++ b/worldsrv/trascate_webapi.go @@ -2970,6 +2970,7 @@ func init() { CallBackFunc: func(code shop.OpResultCode) { pack.Tag = webapiproto.ExchangeCreateCode(code) pack.Id = msg.GetId() + logger.Logger.Tracef("/api/game/exchange_create return %v", pack) tNode.TransRep.RetFiels = pack tNode.Resume() },