上传装备强化分享超链接处理
This commit is contained in:
parent
862a7b8f8b
commit
868d2ca99a
@ -121,15 +121,23 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
|
||||
Content: fmt.Sprintf(st.Text, agrs...),
|
||||
}
|
||||
if ctype == comm.EquipmentUpgradeNotice { //装备分享
|
||||
msg.Ctype = pb.ChatType_EquipmentShare
|
||||
}
|
||||
msg.Ctype = pb.ChatType_Share
|
||||
if appenddata != nil {
|
||||
if jsonStr, err = json.Marshal(appenddata); err != nil {
|
||||
this.Errorf("err:%v", err)
|
||||
} else {
|
||||
data := map[string]interface{}{
|
||||
"0": map[string]interface{}{
|
||||
"key": "0",
|
||||
"appendStr": jsonStr,
|
||||
"itemType": 1,
|
||||
},
|
||||
}
|
||||
jsonStr, _ = json.Marshal(data)
|
||||
msg.AppendStr = string(jsonStr)
|
||||
}
|
||||
}
|
||||
}
|
||||
code = this.modelChat.sendSystemChat(msg)
|
||||
}
|
||||
return
|
||||
|
@ -185,13 +185,14 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
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, fmt.Sprintf("[color=%s]%s[/color]", color.Color, user.Name), conf.Name)
|
||||
this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, fmt.Sprintf("<a href='{0}'>[color=%s]%s[/color]</a>", color.Color, user.Name), conf.Name)
|
||||
} else {
|
||||
this.module.Errorf("GetColor err:%s", err.Error())
|
||||
}
|
||||
} else {
|
||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user