离线消息优化

This commit is contained in:
hahwu 2026-03-06 15:35:35 +08:00
parent 0e97028a25
commit db3a30b61d

View File

@ -533,35 +533,41 @@ func (p *Player) handle(m *msg.Msg) error {
if ok && len(applyUids) > 0 {
var faceList []int
var name string
var facebookPic []string
for _, v := range applyUids {
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
if ps != nil {
faceList = append(faceList, ps.Face)
name = ps.Name
facebookPic = append(facebookPic, ps.FaceBookPic)
}
}
p.PushClientRes(&proto.ResPlayerLougouMsg{
Name: name,
Face: GoUtil.IntToInt32(faceList),
Count: GoUtil.Int32(info["apply_count"]),
Name: name,
Face: GoUtil.IntToInt32(faceList),
Count: GoUtil.Int32(info["apply_count"]),
FacebookPic: facebookPic,
})
}
otherUids, ok := info["other_uids"].([]int64)
if ok && len(otherUids) > 0 {
var faceList []int
var name string
var facebookPic []string
for _, v := range otherUids {
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
if ps != nil {
faceList = append(faceList, ps.Face)
name = ps.Name
facebookPic = append(facebookPic, ps.FaceBookPic)
}
}
p.PushClientRes(&proto.ResPlayerLougouMsg{
Type: 1,
Name: name,
Face: GoUtil.IntToInt32(faceList),
Count: GoUtil.Int32(info["other_count"]),
Type: 1,
Name: name,
Face: GoUtil.IntToInt32(faceList),
Count: GoUtil.Int32(info["other_count"]),
FacebookPic: facebookPic,
})
}
default: