卡牌时间线优化

This commit is contained in:
hahwu 2026-02-04 10:33:20 +08:00
parent 87aef36237
commit 00809c8484

View File

@ -2514,7 +2514,11 @@ func ReqGetFriendCard(player *Player, buf []byte) error {
}
FriendMod.DelCardInfo(req.Id)
player.AddCard(CardInfo.CardId)
player.AddLog(CardInfo.AUid, friend.LOG_TYPE_CARD_SEND_ACCEPT, fmt.Sprintf("%d", CardInfo.CardId), GoUtil.Now())
uid := CardInfo.AUid
if CardInfo.Type == card.TYPE_CARD_GIVE {
uid = CardInfo.BUid
}
player.AddLog(uid, friend.LOG_TYPE_CARD_SEND_ACCEPT, fmt.Sprintf("%d", CardInfo.CardId), GoUtil.Now())
player.PlayMod.save()
player.PushClientRes(&msg.ResGetFriendCard{
Code: msg.RES_CODE_SUCCESS,