卡牌打点补充

This commit is contained in:
hahwu 2026-04-08 10:51:40 +08:00
parent f4eb4d0371
commit 7e94e515e1

View File

@ -2008,6 +2008,11 @@ func ReqAgreeCardExchange(player *Player, req *msg.ReqAgreeCardExchange) error {
"card_id_reply": cardInfo.ExId, "card_id_reply": cardInfo.ExId,
"player_id_reply": cardInfo.BUid, "player_id_reply": cardInfo.BUid,
}) })
player.TeLog("card_exchange_claim", map[string]interface{}{
"player_id_from": cardInfo.BUid,
"card_id": cardInfo.ExId,
"is_gift": false,
})
return nil return nil
} }
@ -2102,8 +2107,10 @@ func ReqGetFriendCard(player *Player, req *msg.ReqGetFriendCard) error {
FriendMod.DelCardInfo(req.Id) FriendMod.DelCardInfo(req.Id)
player.AddCard(cardInfo.CardId) player.AddCard(cardInfo.CardId)
uid := cardInfo.AUid uid := cardInfo.AUid
var isGift bool
if cardInfo.Type == card.TYPE_CARD_GIVE { if cardInfo.Type == card.TYPE_CARD_GIVE {
uid = cardInfo.BUid uid = cardInfo.BUid
isGift = true
} }
player.AddLog(uid, friend.LOG_TYPE_CARD_SEND_ACCEPT, fmt.Sprintf("%d", cardInfo.CardId), GoUtil.Now()) player.AddLog(uid, friend.LOG_TYPE_CARD_SEND_ACCEPT, fmt.Sprintf("%d", cardInfo.CardId), GoUtil.Now())
player.PlayMod.save() player.PlayMod.save()
@ -2113,6 +2120,11 @@ func ReqGetFriendCard(player *Player, req *msg.ReqGetFriendCard) error {
CardId: int32(cardInfo.CardId), CardId: int32(cardInfo.CardId),
Emoji: int32(cardInfo.Emoji), Emoji: int32(cardInfo.Emoji),
}) })
player.TeLog("card_exchange_claim", map[string]interface{}{
"player_id_from": uid,
"card_id": cardInfo.CardId,
"is_gift": isGift,
})
player.PushClientRes(CardMod.NotifyCard()) player.PushClientRes(CardMod.NotifyCard())
return nil return nil
} }