增加日志
This commit is contained in:
parent
ce81961798
commit
5649f3dbe7
@ -6,6 +6,8 @@ import (
|
||||
notification_cfg "server/conf/notification"
|
||||
GoUtil "server/game_util"
|
||||
"server/msg"
|
||||
|
||||
"gitea.bywaystudios.com/pet_home/leaf/log"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -44,19 +46,23 @@ func NotifyPetroomGame(PlayerId int) {
|
||||
func NotifyFriendApply(PlayerId, FriendId int) {
|
||||
PlayerSimpleData := G_GameLogicPtr.GetSimplePlayerByUid(PlayerId)
|
||||
if !checkLogout(PlayerSimpleData) {
|
||||
log.Debug("NotifyFriendApply checkLogout failed for PlayerId: %d", PlayerId)
|
||||
return
|
||||
}
|
||||
FriendSimpleData := G_GameLogicPtr.GetSimplePlayerByUid(FriendId)
|
||||
if FriendSimpleData == nil {
|
||||
log.Debug("NotifyFriendApply GetSimplePlayerByUid failed for FriendId: %d", FriendId)
|
||||
return
|
||||
}
|
||||
if !SetFriendApplyNotification(PlayerId) {
|
||||
log.Debug("NotifyFriendApply SetFriendApplyNotification failed for PlayerId: %d", PlayerId)
|
||||
return
|
||||
}
|
||||
titlekey, infokey := notification_cfg.GetFriendApplyNotificationMsg()
|
||||
title := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), titlekey)
|
||||
info := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), infokey)
|
||||
GoUtil.NotifyPlayer(GoUtil.Int(PlayerSimpleData.Account), NOTIFY_TYPE_FRIEND_APPLY, title, fmt.Sprintf(info, FriendSimpleData.Name))
|
||||
log.Debug("NotifyFriendApply sent notification for PlayerId: %d, FriendId: %d", PlayerId, FriendId)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user