上传代码优化
This commit is contained in:
parent
4d171b8901
commit
ec2b903fdc
@ -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,
|
||||
},
|
||||
|
@ -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("<a href='0'>[color=%s]%s[/color]</a>", 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())
|
||||
}
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user