玩家信件优化
This commit is contained in:
parent
2bafc5fca6
commit
77653ea35e
@ -625,6 +625,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
player.PlayMod.mod_list.Mail.TriggerMail = make([]int, 0, 8)
|
player.PlayMod.mod_list.Mail.TriggerMail = make([]int, 0, 8)
|
||||||
case "notification":
|
case "notification":
|
||||||
Id, _ := strconv.Atoi(arg[1])
|
Id, _ := strconv.Atoi(arg[1])
|
||||||
|
SetFriendApplyNotification(Id, 2)
|
||||||
NotifyFriendApply(Id, int(player.M_DwUin))
|
NotifyFriendApply(Id, int(player.M_DwUin))
|
||||||
NotifyPetroomGame(Id)
|
NotifyPetroomGame(Id)
|
||||||
case "notificationTest":
|
case "notificationTest":
|
||||||
|
|||||||
@ -554,7 +554,7 @@ func (p *Player) handle(m *msg.Msg) error {
|
|||||||
"apply_count": info["apply_count"],
|
"apply_count": info["apply_count"],
|
||||||
"other_count": info["other_count"],
|
"other_count": info["other_count"],
|
||||||
})
|
})
|
||||||
if ok && len(applyUids) > 0 {
|
if ok && len(applyUids) >= 3 {
|
||||||
var faceList []int
|
var faceList []int
|
||||||
var name string
|
var name string
|
||||||
var facebookPic []string
|
var facebookPic []string
|
||||||
@ -575,7 +575,7 @@ func (p *Player) handle(m *msg.Msg) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
otherUids, ok := info["other_uids"].([]int64)
|
otherUids, ok := info["other_uids"].([]int64)
|
||||||
if ok && len(otherUids) > 0 {
|
if ok && len(otherUids) >= 3 {
|
||||||
var faceList []int
|
var faceList []int
|
||||||
var name string
|
var name string
|
||||||
var facebookPic []string
|
var facebookPic []string
|
||||||
|
|||||||
@ -290,6 +290,9 @@ func PlayerLoginHandler(data *msg.Msg) (interface{}, error) {
|
|||||||
now := GoUtil.Now()
|
now := GoUtil.Now()
|
||||||
validMessages := make([]*msg.Msg, 0, len(messages.Messages))
|
validMessages := make([]*msg.Msg, 0, len(messages.Messages))
|
||||||
for _, message := range messages.Messages {
|
for _, message := range messages.Messages {
|
||||||
|
if message.HandleType != msg.HANDLE_MOD_PLAYER_MSG {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if message.End == 0 || message.End >= now {
|
if message.End == 0 || message.End >= now {
|
||||||
validMessages = append(validMessages, message)
|
validMessages = append(validMessages, message)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.bywaystudios.com/pet_home/leaf/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VarMgr struct {
|
type VarMgr struct {
|
||||||
@ -261,6 +263,7 @@ func SetUserVarDataHandler(m *msg.Msg) (interface{}, error) {
|
|||||||
ved.T = m.End
|
ved.T = m.End
|
||||||
}
|
}
|
||||||
varData[v.Key] = ved
|
varData[v.Key] = ved
|
||||||
|
log.Debug("SetUserVarDataHandler: uid %d, key %s, value %v, setType %d, end %d", m.To, v.Key, v.Value, v.SetType, m.End)
|
||||||
SaveCacheVarData(GoUtil.GetVarKey(m.To), varData)
|
SaveCacheVarData(GoUtil.GetVarKey(m.To), varData)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
@ -297,6 +300,7 @@ func SetDailyVarDataHandler(m *msg.Msg) (interface{}, error) {
|
|||||||
varData.T = m.End
|
varData.T = m.End
|
||||||
}
|
}
|
||||||
data.DailyVar[info.Key] = varData
|
data.DailyVar[info.Key] = varData
|
||||||
|
log.Debug("set daily var m:%v", m)
|
||||||
SaveCacheVarData(GoUtil.GetVarKey(m.To), varData)
|
SaveCacheVarData(GoUtil.GetVarKey(m.To), varData)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user