From ec2b903fdc8b70edc5ab18d69304814209383d91 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 27 Sep 2022 19:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/chat/module.go | 4 ++-- modules/equipment/api_upgrade.go | 12 ++++++------ modules/gateway/agent.go | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/chat/module.go b/modules/chat/module.go index db70e1ef7..0cb723dee 100644 --- a/modules/chat/module.go +++ b/modules/chat/module.go @@ -127,8 +127,8 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter this.Errorf("err:%v", err) } else { data := map[string]interface{}{ - "0": map[string]interface{}{ - "key": "0", + agrs[1].(string): map[string]interface{}{ + "key": agrs[1].(string), "appendStr": string(jsonStr), "itemType": pb.ChatType_EquipmentShare, }, diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index 2c21eb87d..6e2cd4467 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -183,12 +183,12 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade this.module.ModuleRtask.SendToRtask(session, comm.Rtype47, 1) //聊天系统通知 if user = this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { - var color *cfg.GameGameColorData - if color, err = this.module.configure.GetColor(conf.Color); err == nil { - this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, user.Name, fmt.Sprintf("[color=%s]%s[/color]", color.Color, conf.Name)) - } else { - this.module.Errorf("GetColor err:%s", err.Error()) - } + // var color *cfg.GameGameColorData + // if color, err = this.module.configure.GetColor(conf.Color); err == nil { + this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, user.Name, fmt.Sprintf("[%s]", conf.Name)) + // } else { + // this.module.Errorf("GetColor err:%s", err.Error()) + // } } else { this.module.Errorf("no found userdata uid:%s", session.GetUserId()) } diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 38cd4c2a3..916e05928 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -279,7 +279,7 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { if err = this.gateway.Service().AcrossClusterRpcCall(context.Background(), serviceTag, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil { this.gateway.Error("[UserResponse]", log.Field{Key: "uid", Value: this.uId}, - log.Field{Key: "req", Value: req}, + log.Field{Key: "req", Value: req.String()}, log.Field{Key: "err", Value: err}, ) return @@ -288,8 +288,8 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { this.gateway.Debug("[UserResponse]", log.Field{Key: "uid", Value: this.uId}, log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, - log.Field{Key: "req", Value: req}, - log.Field{Key: "reply", Value: reply}, + log.Field{Key: "req", Value: req.String()}, + log.Field{Key: "reply", Value: reply.String()}, ) if reply.Code != pb.ErrorCode_Success { data, _ := anypb.New(&pb.NotifyErrorNotifyPush{