notification 优化
This commit is contained in:
parent
35f35d0a97
commit
2d6bcc09b9
@ -376,7 +376,7 @@ func CenterPlayerMsgHandler(data *msg.Msg) (interface{}, error) {
|
||||
}
|
||||
}
|
||||
if applycount > 1 && data.Type == msg.HANDLE_TYPE_APPLY {
|
||||
NotifyFriendApply(data.To, data.From)
|
||||
go NotifyFriendApply(data.To, data.From)
|
||||
}
|
||||
messages.mu.Unlock()
|
||||
}
|
||||
@ -902,7 +902,7 @@ func saveMessage(m *msg.Msg) error {
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
||||
@ -33,7 +33,7 @@ func NotifyPetroomGame(PlayerId int) {
|
||||
titlekey, infokey := notification_cfg.GetPetroomGameNotificationMsg()
|
||||
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_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)
|
||||
}
|
||||
|
||||
|
||||
@ -3985,7 +3985,7 @@ func ReqPlayroomSelectReward(player *Player, buf []byte) error {
|
||||
PlayroomMod.ResetGame()
|
||||
player.PlayerDecoSetLog("emoji", int(req.EmojiId), "playroom_select_reward")
|
||||
player.PlayroomBackData()
|
||||
NotifyPetroomGame(Target)
|
||||
go NotifyPetroomGame(Target)
|
||||
player.PlayMod.save()
|
||||
player.PushClientRes(&msg.ResPlayroomSelectReward{
|
||||
Code: msg.RES_CODE_SUCCESS,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user