Compare commits
No commits in common. "42302a32a551be0ce9092f2adfe2f385ce32618a" and "40822ad4d0e92ecfdcf2fe67456478ea8098111b" have entirely different histories.
42302a32a5
...
40822ad4d0
|
@ -374,6 +374,24 @@ func (this *Player) OnLogined() {
|
|||
TaskSubjectSingleton.Touch(common.TaskTypeLogin, &TaskData{SnId: this.SnId, Num: 1}) // 登录游戏
|
||||
|
||||
this.LoadAfter()
|
||||
//周卡领取奖励
|
||||
now := time.Now().Unix()
|
||||
for id, endTime := range this.WeekCardTime {
|
||||
if endTime < now {
|
||||
this.WeekCardTime[id] = 0
|
||||
continue
|
||||
}
|
||||
if this.WeekCardTime[id] == 0 {
|
||||
continue
|
||||
}
|
||||
if now > this.WeekCardTime[id] {
|
||||
logger.Logger.Trace("周卡已过期,不能领取!")
|
||||
continue
|
||||
}
|
||||
if !this.WeekCardAward[id] {
|
||||
this.GetWeekCardAwary(id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2235,24 +2253,6 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
//周卡领取奖励
|
||||
now := time.Now().Unix()
|
||||
for id, endTime := range this.WeekCardTime {
|
||||
if endTime < now {
|
||||
this.WeekCardTime[id] = 0
|
||||
continue
|
||||
}
|
||||
if this.WeekCardTime[id] == 0 {
|
||||
continue
|
||||
}
|
||||
if now > this.WeekCardTime[id] {
|
||||
logger.Logger.Trace("周卡已过期,不能领取!")
|
||||
continue
|
||||
}
|
||||
if !this.WeekCardAward[id] {
|
||||
this.GetWeekCardAwary(id)
|
||||
}
|
||||
}
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeFirstLogin, &TaskData{SnId: this.SnId, Num: 1}) // 首次登录游戏
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeLogin, &TaskData{SnId: this.SnId, Num: 1}) // 登录游戏
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue