notification 优化

This commit is contained in:
hahwu 2026-02-26 20:09:43 +08:00
parent 1e58dccf11
commit 11baae6ea5
3 changed files with 4 additions and 4 deletions

View File

@ -376,7 +376,7 @@ func CenterPlayerMsgHandler(data *msg.Msg) (interface{}, error) {
} }
} }
if applycount > 1 && data.Type == msg.HANDLE_TYPE_APPLY { if applycount > 1 && data.Type == msg.HANDLE_TYPE_APPLY {
NotifyFriendApply(data.To, data.From) go NotifyFriendApply(data.To, data.From)
} }
messages.mu.Unlock() messages.mu.Unlock()
} }
@ -902,7 +902,7 @@ func saveMessage(m *msg.Msg) error {
} }
} }
if applycount > 1 && m.Type == msg.HANDLE_TYPE_APPLY { if applycount > 1 && m.Type == msg.HANDLE_TYPE_APPLY {
NotifyFriendApply(m.To, m.From) go NotifyFriendApply(m.To, m.From)
} }
// 添加消息 // 添加消息
messages.Messages = append(messages.Messages, m) messages.Messages = append(messages.Messages, m)

View File

@ -33,7 +33,7 @@ func NotifyPetroomGame(PlayerId int) {
titlekey, infokey := notification_cfg.GetPetroomGameNotificationMsg() titlekey, infokey := notification_cfg.GetPetroomGameNotificationMsg()
title := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), titlekey) title := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), titlekey)
info := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), infokey) info := languageCfg.GetLanguage(msg.LANG_TYPE(PlayerSimpleData.Lang), infokey)
GoUtil.NotifyPlayer(GoUtil.Int(PlayerSimpleData.Account), NOTIFY_TYPE_PETROOM_GAME, title, fmt.Sprintf(info, PlayerSimpleData.PetName)) GoUtil.NotifyPlayer(GoUtil.Int(PlayerSimpleData.Account), NOTIFY_TYPE_PETROOM_GAME, fmt.Sprintf(title, PlayerSimpleData.PetName), fmt.Sprintf(info, PlayerSimpleData.PetName))
SetPetroomGameNotification(PlayerId, count+1) SetPetroomGameNotification(PlayerId, count+1)
} }

View File

@ -3986,7 +3986,7 @@ func ReqPlayroomSelectReward(player *Player, buf []byte) error {
PlayroomMod.ResetGame() PlayroomMod.ResetGame()
player.PlayerDecoSetLog("emoji", int(req.EmojiId), "playroom_select_reward") player.PlayerDecoSetLog("emoji", int(req.EmojiId), "playroom_select_reward")
player.PlayroomBackData() player.PlayroomBackData()
NotifyPetroomGame(Target) go NotifyPetroomGame(Target)
player.PlayMod.save() player.PlayMod.save()
player.PushClientRes(&msg.ResPlayroomSelectReward{ player.PushClientRes(&msg.ResPlayroomSelectReward{
Code: msg.RES_CODE_SUCCESS, Code: msg.RES_CODE_SUCCESS,