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