no message

This commit is contained in:
sk 2024-11-08 14:33:24 +08:00
parent 970db216f4
commit 752ef5d6e0
3 changed files with 8 additions and 3 deletions

View File

@ -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)

View File

@ -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{

View File

@ -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()
},