notification功能开发
This commit is contained in:
parent
2835465e0d
commit
c26c3086af
@ -134,4 +134,5 @@ func init() {
|
|||||||
gob.Register([]*item.Item{}) // 注册 []*item.Item 类型
|
gob.Register([]*item.Item{}) // 注册 []*item.Item 类型
|
||||||
gob.Register(friend.ReplyInfo{})
|
gob.Register(friend.ReplyInfo{})
|
||||||
gob.Register(GameResult{})
|
gob.Register(GameResult{})
|
||||||
|
gob.Register(map[string]interface{}{})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -597,21 +597,8 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
case "resetTriggerMail":
|
case "resetTriggerMail":
|
||||||
player.PlayMod.mod_list.Mail.TriggerMail = make([]int, 0, 8)
|
player.PlayMod.mod_list.Mail.TriggerMail = make([]int, 0, 8)
|
||||||
case "debugMsg":
|
case "debugMsg":
|
||||||
to, _ := strconv.Atoi(arg[1])
|
NotifyFriendApply(100001, 100002)
|
||||||
num, _ := strconv.Atoi(arg[1])
|
NotifyPetroomGame(100002)
|
||||||
for i := 0; i < num; i++ {
|
|
||||||
uid := 100100000 + i
|
|
||||||
if uid == int(player.M_DwUin) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
SendMsgToCenterAsync(&MsgMod.Msg{
|
|
||||||
From: uid,
|
|
||||||
To: to,
|
|
||||||
Type: MsgMod.HANDLE_TYPE_APPLY,
|
|
||||||
SendT: GoUtil.Now(),
|
|
||||||
HandleType: MsgMod.HANDLE_MOD_PLAYER_MSG,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("Player %d ReqGmCommand:%v not found", player.M_DwUin, arg)
|
return fmt.Errorf("Player %d ReqGmCommand:%v not found", player.M_DwUin, arg)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,7 @@ const (
|
|||||||
func (f *VarMgr) Init() {
|
func (f *VarMgr) Init() {
|
||||||
gob.Register(&VarGoldCard{})
|
gob.Register(&VarGoldCard{})
|
||||||
gob.Register(&VarExpireData{})
|
gob.Register(&VarExpireData{})
|
||||||
|
gob.Register(map[string]interface{}{})
|
||||||
f.key = VAR_MGR_KEY
|
f.key = VAR_MGR_KEY
|
||||||
f.data = &VarData{
|
f.data = &VarData{
|
||||||
NewVar: map[string]*VarExpireData{},
|
NewVar: map[string]*VarExpireData{},
|
||||||
|
|||||||
@ -620,5 +620,5 @@ func NotifyPlayer(uid, pushid int, title, content string) {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug("notification send uid %d, type %d , res %v", uid, pushid, body)
|
log.Debug("notification send uid %d, type %d , res %v", uid, pushid, String(body))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user