玩家消息bug修复

This commit is contained in:
hahwu 2026-02-03 17:14:15 +08:00
parent 52fbce102f
commit 6824df5a1c
2 changed files with 7 additions and 6 deletions

View File

@ -429,6 +429,12 @@ func (ad *GameLogic) GetResFriendPlayerByUid(Id int) *msg.ResFriendPlayerSimple
return nil
}
}
LastActLog := player.ActLog
Last := &msg.ActLog{
Type: int32(LastActLog.Type),
Time: LastActLog.Time,
Param: LastActLog.Param,
}
return &msg.ResFriendPlayerSimple{
Uid: int64(player.Uid),
Name: player.Name,
@ -444,6 +450,7 @@ func (ad *GameLogic) GetResFriendPlayerByUid(Id int) *msg.ResFriendPlayerSimple
DressSet: GoUtil.MapIntToInt32(player.DressSet),
Friend: GoUtil.IntToInt32(player.Friend),
Physiology: GoUtil.MapIntToInt32(player.Physiology),
Last: Last,
PetName: player.PetName,
}
}

View File

@ -102,12 +102,6 @@ func ReqFriendPlayerSimple(player *Player, buf []byte) error {
FriendMod := player.PlayMod.getFriendMod()
PlayerSimpleData.AddTime = FriendMod.GetAddTime(Uid)
PlayerSimpleData.Interact = FriendMod.GetInteractTime(Uid)
LastActLog := FriendMod.GetActLogLast()
PlayerSimpleData.Last = &msg.ActLog{
Type: int32(LastActLog.Type),
Time: LastActLog.Time,
Param: LastActLog.Param,
}
player.PushClientRes(PlayerSimpleData)
return nil
}