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