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..0aeab5c 100644 --- a/worldsrv/trascate_webapi.go +++ b/worldsrv/trascate_webapi.go @@ -2795,10 +2795,10 @@ func init() { // 离线获取 var address []string task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { - address, _ = model.GetPlayerAddress(msg.GetPlatform(), msg.GetSnId()) + address, err = model.GetPlayerAddress(msg.GetPlatform(), msg.GetSnId()) return nil }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) { - if address == nil { + if err != nil { pack.Tag = webapiproto.TagCode_FAILED pack.Msg = "获取失败" } else { @@ -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() },