From 72ccca583b1d7935023e620b5e68cade1e32e822 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4=E7=BA=BFbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/mod/friend/Friend.go | 16 ++++++++-------- src/server/game/player_data.go | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/server/game/mod/friend/Friend.go b/src/server/game/mod/friend/Friend.go index 97525533..b7636ab6 100644 --- a/src/server/game/mod/friend/Friend.go +++ b/src/server/game/mod/friend/Friend.go @@ -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.Log = append(f.Log, &LogInfo{ Id: f.AutoId, - Uid: Uid, - Type: Type, - Time: GoUtil.Now(), - Param: Param, + Uid: uid, + Type: ltype, + Time: send, + Param: param, }) - switch Type { + switch ltype { 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: ItemNum := GoUtil.RandNum(2, 5) 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 { f.Log = f.Log[len(f.Log)-30:] diff --git a/src/server/game/player_data.go b/src/server/game/player_data.go index e67560bb..783ab598 100644 --- a/src/server/game/player_data.go +++ b/src/server/game/player_data.go @@ -1170,17 +1170,17 @@ func (p *Player) HandleInChampshipRank() { 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() - Id := FriendMod.AddLog(Uid, Type, Param) + Id := FriendMod.AddLog(uid, ltype, param, send) p.PlayMod.save() p.PushClientRes(&msg.NotifyFriendLog{ Info: &msg.ResFriendLog{ - Player: G_GameLogicPtr.GetResSimplePlayerByUid(Uid), - Type: int32(Type), - Param: Param, + Player: G_GameLogicPtr.GetResSimplePlayerByUid(uid), + Type: int32(ltype), + Param: param, Id: int32(Id), - Time: int32(Time), + Time: int32(send), }, Bubble: FriendMod.GetBubble(Id), })