离线消息优化
This commit is contained in:
parent
0e97028a25
commit
db3a30b61d
@ -533,28 +533,33 @@ func (p *Player) handle(m *msg.Msg) error {
|
|||||||
if ok && len(applyUids) > 0 {
|
if ok && len(applyUids) > 0 {
|
||||||
var faceList []int
|
var faceList []int
|
||||||
var name string
|
var name string
|
||||||
|
var facebookPic []string
|
||||||
for _, v := range applyUids {
|
for _, v := range applyUids {
|
||||||
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
|
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
|
||||||
if ps != nil {
|
if ps != nil {
|
||||||
faceList = append(faceList, ps.Face)
|
faceList = append(faceList, ps.Face)
|
||||||
name = ps.Name
|
name = ps.Name
|
||||||
|
facebookPic = append(facebookPic, ps.FaceBookPic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.PushClientRes(&proto.ResPlayerLougouMsg{
|
p.PushClientRes(&proto.ResPlayerLougouMsg{
|
||||||
Name: name,
|
Name: name,
|
||||||
Face: GoUtil.IntToInt32(faceList),
|
Face: GoUtil.IntToInt32(faceList),
|
||||||
Count: GoUtil.Int32(info["apply_count"]),
|
Count: GoUtil.Int32(info["apply_count"]),
|
||||||
|
FacebookPic: facebookPic,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
otherUids, ok := info["other_uids"].([]int64)
|
otherUids, ok := info["other_uids"].([]int64)
|
||||||
if ok && len(otherUids) > 0 {
|
if ok && len(otherUids) > 0 {
|
||||||
var faceList []int
|
var faceList []int
|
||||||
var name string
|
var name string
|
||||||
|
var facebookPic []string
|
||||||
for _, v := range otherUids {
|
for _, v := range otherUids {
|
||||||
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
|
ps := G_GameLogicPtr.GetSimplePlayerByUid(int(v))
|
||||||
if ps != nil {
|
if ps != nil {
|
||||||
faceList = append(faceList, ps.Face)
|
faceList = append(faceList, ps.Face)
|
||||||
name = ps.Name
|
name = ps.Name
|
||||||
|
facebookPic = append(facebookPic, ps.FaceBookPic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.PushClientRes(&proto.ResPlayerLougouMsg{
|
p.PushClientRes(&proto.ResPlayerLougouMsg{
|
||||||
@ -562,6 +567,7 @@ func (p *Player) handle(m *msg.Msg) error {
|
|||||||
Name: name,
|
Name: name,
|
||||||
Face: GoUtil.IntToInt32(faceList),
|
Face: GoUtil.IntToInt32(faceList),
|
||||||
Count: GoUtil.Int32(info["other_count"]),
|
Count: GoUtil.Int32(info["other_count"]),
|
||||||
|
FacebookPic: facebookPic,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user