修复时间线bug

This commit is contained in:
hahwu 2026-03-20 16:36:15 +08:00
parent 3dda192a6f
commit 72ccca583b
2 changed files with 14 additions and 14 deletions

View File

@ -513,22 +513,22 @@ func (f *FriendMod) AgreeApply(UId int) {
} }
// 增加好友日志 // 增加好友日志
func (f *FriendMod) AddLog(Uid, Type int, Param string) int { func (f *FriendMod) AddLog(uid, ltype int, param string, send int64) int {
f.AutoId++ f.AutoId++
f.Log = append(f.Log, &LogInfo{ f.Log = append(f.Log, &LogInfo{
Id: f.AutoId, Id: f.AutoId,
Uid: Uid, Uid: uid,
Type: Type, Type: ltype,
Time: GoUtil.Now(), Time: send,
Param: Param, Param: param,
}) })
switch Type { switch ltype {
case LOG_TYPE_HANDBOOK_UPVOTE, LOG_TYPE_PLAYROOM_UPVOTE: case LOG_TYPE_HANDBOOK_UPVOTE, LOG_TYPE_PLAYROOM_UPVOTE:
f.AddBubble(f.AutoId, Type, nil) f.AddBubble(f.AutoId, ltype, nil)
case LOG_TYPE_TREASURE_HELP: case LOG_TYPE_TREASURE_HELP:
ItemNum := GoUtil.RandNum(2, 5) ItemNum := GoUtil.RandNum(2, 5)
ItemList := []*item.Item{item.NewItem(item.ITEM_STAR_ID, ItemNum)} ItemList := []*item.Item{item.NewItem(item.ITEM_STAR_ID, ItemNum)}
f.AddBubble(f.AutoId, Type, ItemList) f.AddBubble(f.AutoId, ltype, ItemList)
} }
if len(f.Log) > 30 { if len(f.Log) > 30 {
f.Log = f.Log[len(f.Log)-30:] f.Log = f.Log[len(f.Log)-30:]

View File

@ -1170,17 +1170,17 @@ func (p *Player) HandleInChampshipRank() {
SendMsgToCenterAsync(m) SendMsgToCenterAsync(m)
} }
func (p *Player) AddLog(Uid int, Type int, Param string, Time int64) { func (p *Player) AddLog(uid int, ltype int, param string, send int64) {
FriendMod := p.PlayMod.getFriendMod() FriendMod := p.PlayMod.getFriendMod()
Id := FriendMod.AddLog(Uid, Type, Param) Id := FriendMod.AddLog(uid, ltype, param, send)
p.PlayMod.save() p.PlayMod.save()
p.PushClientRes(&msg.NotifyFriendLog{ p.PushClientRes(&msg.NotifyFriendLog{
Info: &msg.ResFriendLog{ Info: &msg.ResFriendLog{
Player: G_GameLogicPtr.GetResSimplePlayerByUid(Uid), Player: G_GameLogicPtr.GetResSimplePlayerByUid(uid),
Type: int32(Type), Type: int32(ltype),
Param: Param, Param: param,
Id: int32(Id), Id: int32(Id),
Time: int32(Time), Time: int32(send),
}, },
Bubble: FriendMod.GetBubble(Id), Bubble: FriendMod.GetBubble(Id),
}) })