playroom过滤今天已拜访过的好友
This commit is contained in:
parent
1714e9d27e
commit
054cbdf1e8
@ -656,6 +656,7 @@ func GetVisitorPlayer(p *Player) int {
|
||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||
VisitorList := PlayroomMod.GetVisitor()
|
||||
HasVisit := PlayroomMod.GetHasVisit()
|
||||
TodayVisitedUsers := PlayroomMod.GetTodayVisitedUsers()
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
type sortData struct {
|
||||
Uid int
|
||||
@ -668,6 +669,9 @@ func GetVisitorPlayer(p *Player) int {
|
||||
if _, ok := HasVisit[k]; ok {
|
||||
continue
|
||||
}
|
||||
if GoUtil.InArray(k, TodayVisitedUsers) {
|
||||
continue
|
||||
}
|
||||
if v.Time < Now-86400 {
|
||||
continue
|
||||
}
|
||||
@ -696,6 +700,9 @@ func GetVisitorPlayer(p *Player) int {
|
||||
if uid == int(p.M_DwUin) {
|
||||
continue
|
||||
}
|
||||
if GoUtil.InArray(uid, TodayVisitedUsers) {
|
||||
continue
|
||||
}
|
||||
ps := G_GameLogicPtr.GetSimplePlayerByUid(uid)
|
||||
if ps == nil {
|
||||
continue
|
||||
|
||||
@ -3219,7 +3219,7 @@ func ReqPlayroomSetRoom(player *Player, buf []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 玩游戏 Desprecated
|
||||
// 玩游戏
|
||||
func ReqPlayroomGame(player *Player, buf []byte) error {
|
||||
req := &msg.ReqPlayroomGame{}
|
||||
proto.Unmarshal(buf, req)
|
||||
@ -3261,6 +3261,7 @@ func ReqPlayroomGame(player *Player, buf []byte) error {
|
||||
Type: MsqMod.HANDLE_TYPE_PLAYROOM_GAME,
|
||||
SendT: GoUtil.Now(),
|
||||
})
|
||||
PlayroomMod.ResetGame()
|
||||
player.PlayMod.save()
|
||||
ItemsMsg := make(map[int32]*msg.ItemInfo, 0)
|
||||
for k, v := range PlayroomMod.GameReward {
|
||||
|
||||
@ -12,49 +12,50 @@ import (
|
||||
)
|
||||
|
||||
type PlayroomMod struct {
|
||||
Collect map[int]int // 装饰
|
||||
Room map[int]int // 房间
|
||||
Dress map[int][]int // 服装仓库
|
||||
DressSet map[int]int // 服装穿戴
|
||||
PetAir []int // 宠物空气背包
|
||||
PetAirSet int // 宠物空气背包穿戴
|
||||
Status int // 0: 未拜访 1: 拜访
|
||||
Endtime int64 // 结束时间
|
||||
Starttime int64 // 开始时间
|
||||
WorkStatus int // 0: 未开始 1: 进行中 2: 结束
|
||||
Visitor map[int]*Info // 访客
|
||||
MoodInfo map[int]*Mood // 心情
|
||||
AllMood int // 总心情
|
||||
Reward []*item.Item // 奖励
|
||||
DayFirstT int // 每日未首次触发次数
|
||||
Trigger int // 未触发次数
|
||||
TriggerTime int64 // 触发时间
|
||||
HasVisit map[int]int64 // 今日已拜访的玩家
|
||||
Target int // 拜访的目标
|
||||
GameId int // 游戏ID
|
||||
GameReward map[int]*item.Item // 游戏奖励
|
||||
GameStatus int // 游戏状态
|
||||
GameInfo map[int]interface{} // 游戏信息
|
||||
Exclude bool // 是否排除
|
||||
LoseItem []*item.Item // 失去的物品
|
||||
ChipList []*ChipInfo // 碎片列表
|
||||
Flip map[int]int // 翻牌
|
||||
FlipReward []*item.Item // 翻牌奖励
|
||||
WorkOutline int // 是否离线
|
||||
LastFlip int // 上次翻牌奖励档次
|
||||
NoFlip int // 连续未获取最高翻牌奖励次数
|
||||
TodayFlip bool // 今日是否已获得最高档奖励
|
||||
JackpotNum int // 每日转盘数量
|
||||
Upvote int // 收到点赞次数
|
||||
UpvoteList []int // 点赞列表
|
||||
RoomPoint int // 房间点数
|
||||
UnlockList map[int]int64 // 解锁
|
||||
DailyTask map[int]*DailyTask // 每日任务
|
||||
DailyTaskReward []int // 每日任务奖励
|
||||
Physiology map[int]*Physiology
|
||||
InteractNum int // 互动次数
|
||||
RevengeUid int64 // 复仇Uid
|
||||
FilterVisitor bool // 是否过滤访客
|
||||
Collect map[int]int // 装饰
|
||||
Room map[int]int // 房间
|
||||
Dress map[int][]int // 服装仓库
|
||||
DressSet map[int]int // 服装穿戴
|
||||
PetAir []int // 宠物空气背包
|
||||
PetAirSet int // 宠物空气背包穿戴
|
||||
Status int // 0: 未拜访 1: 拜访
|
||||
Endtime int64 // 结束时间
|
||||
Starttime int64 // 开始时间
|
||||
WorkStatus int // 0: 未开始 1: 进行中 2: 结束
|
||||
Visitor map[int]*Info // 访客
|
||||
MoodInfo map[int]*Mood // 心情
|
||||
AllMood int // 总心情
|
||||
Reward []*item.Item // 奖励
|
||||
DayFirstT int // 每日未首次触发次数
|
||||
Trigger int // 未触发次数
|
||||
TriggerTime int64 // 触发时间
|
||||
HasVisit map[int]int64 // 今日已拜访的玩家
|
||||
Target int // 拜访的目标
|
||||
GameId int // 游戏ID
|
||||
GameReward map[int]*item.Item // 游戏奖励
|
||||
GameStatus int // 游戏状态
|
||||
GameInfo map[int]interface{} // 游戏信息
|
||||
Exclude bool // 是否排除
|
||||
LoseItem []*item.Item // 失去的物品
|
||||
ChipList []*ChipInfo // 碎片列表
|
||||
Flip map[int]int // 翻牌
|
||||
FlipReward []*item.Item // 翻牌奖励
|
||||
WorkOutline int // 是否离线
|
||||
LastFlip int // 上次翻牌奖励档次
|
||||
NoFlip int // 连续未获取最高翻牌奖励次数
|
||||
TodayFlip bool // 今日是否已获得最高档奖励
|
||||
JackpotNum int // 每日转盘数量
|
||||
Upvote int // 收到点赞次数
|
||||
UpvoteList []int // 点赞列表
|
||||
RoomPoint int // 房间点数
|
||||
UnlockList map[int]int64 // 解锁
|
||||
DailyTask map[int]*DailyTask // 每日任务
|
||||
DailyTaskReward []int // 每日任务奖励
|
||||
Physiology map[int]*Physiology
|
||||
InteractNum int // 互动次数
|
||||
RevengeUid int64 // 复仇Uid
|
||||
FilterVisitor bool // 是否过滤访客
|
||||
TodayVisitedUsers []int // 今日已拜访过的用户
|
||||
}
|
||||
|
||||
type DailyTask struct {
|
||||
@ -190,6 +191,7 @@ func (p *PlayroomMod) ZeroUpdate() {
|
||||
p.JackpotNum = playroomCfg.GetJackpotNum()
|
||||
p.UpvoteList = make([]int, 0)
|
||||
p.DailyTaskReward = make([]int, 0)
|
||||
p.TodayVisitedUsers = make([]int, 0)
|
||||
p.InitDailyTask()
|
||||
}
|
||||
|
||||
@ -281,6 +283,10 @@ func (p *PlayroomMod) GetHasVisit() map[int]int64 {
|
||||
return p.HasVisit
|
||||
}
|
||||
|
||||
func (p *PlayroomMod) GetTodayVisitedUsers() []int {
|
||||
return p.TodayVisitedUsers
|
||||
}
|
||||
|
||||
func (p *PlayroomMod) GetMood() map[int]int {
|
||||
Mood := make(map[int]int)
|
||||
for k, v := range p.MoodInfo {
|
||||
@ -460,6 +466,7 @@ func (p *PlayroomMod) AddDress(Id int) {
|
||||
}
|
||||
|
||||
func (p *PlayroomMod) ResetGame() {
|
||||
p.TodayVisitedUsers = append(p.TodayVisitedUsers, p.Target)
|
||||
p.Target = 0
|
||||
p.Status = STATUS_IDLE
|
||||
p.GameId = 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user