上传代码优化
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)
|
this.Errorf("err:%v", err)
|
||||||
} else {
|
} else {
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"0": map[string]interface{}{
|
agrs[1].(string): map[string]interface{}{
|
||||||
"key": "0",
|
"key": agrs[1].(string),
|
||||||
"appendStr": string(jsonStr),
|
"appendStr": string(jsonStr),
|
||||||
"itemType": pb.ChatType_EquipmentShare,
|
"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)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype47, 1)
|
||||||
//聊天系统通知
|
//聊天系统通知
|
||||||
if user = this.module.ModuleUser.GetUser(session.GetUserId()); user != nil {
|
if user = this.module.ModuleUser.GetUser(session.GetUserId()); user != nil {
|
||||||
var color *cfg.GameGameColorData
|
// var color *cfg.GameGameColorData
|
||||||
if color, err = this.module.configure.GetColor(conf.Color); err == nil {
|
// 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))
|
this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, user.Name, fmt.Sprintf("[%s]", conf.Name))
|
||||||
} else {
|
// } else {
|
||||||
this.module.Errorf("GetColor err:%s", err.Error())
|
// this.module.Errorf("GetColor err:%s", err.Error())
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
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 {
|
if err = this.gateway.Service().AcrossClusterRpcCall(context.Background(), serviceTag, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil {
|
||||||
this.gateway.Error("[UserResponse]",
|
this.gateway.Error("[UserResponse]",
|
||||||
log.Field{Key: "uid", Value: this.uId},
|
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},
|
log.Field{Key: "err", Value: err},
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@ -288,8 +288,8 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) {
|
|||||||
this.gateway.Debug("[UserResponse]",
|
this.gateway.Debug("[UserResponse]",
|
||||||
log.Field{Key: "uid", Value: this.uId},
|
log.Field{Key: "uid", Value: this.uId},
|
||||||
log.Field{Key: "t", Value: time.Since(stime).Milliseconds()},
|
log.Field{Key: "t", Value: time.Since(stime).Milliseconds()},
|
||||||
log.Field{Key: "req", Value: req},
|
log.Field{Key: "req", Value: req.String()},
|
||||||
log.Field{Key: "reply", Value: reply},
|
log.Field{Key: "reply", Value: reply.String()},
|
||||||
)
|
)
|
||||||
if reply.Code != pb.ErrorCode_Success {
|
if reply.Code != pb.ErrorCode_Success {
|
||||||
data, _ := anypb.New(&pb.NotifyErrorNotifyPush{
|
data, _ := anypb.New(&pb.NotifyErrorNotifyPush{
|
||||||
|
Loading…
Reference in New Issue
Block a user