非埋点的任务校验
This commit is contained in:
parent
d48e2a9454
commit
4a86e8523f
@ -628,16 +628,14 @@ const (
|
||||
Rtype152 TaskType = 152 //熊猫武馆解锁柱子
|
||||
Rtype153 TaskType = 153 //商队交易x次
|
||||
Rtype154 TaskType = 154 //狩猎副本掉落x个觉醒材料
|
||||
Rtype155 TaskType = 155 //调整助战英雄n次
|
||||
|
||||
Rtype156 TaskType = 156 //完成工会任务n次
|
||||
Rtype157 TaskType = 157 //战斗在xx系统中完成xx事件
|
||||
Rtype158 TaskType = 158 //主线第X章关卡总星数达到N星
|
||||
Rtype159 TaskType = 159 //主线第X章关卡全部达到三星
|
||||
Rtype160 TaskType = 160 //主线总星数达到X星
|
||||
Rtype161 TaskType = 161 //在自动战斗过程中完成另一场战斗
|
||||
Rtype162 TaskType = 162 //收藏X件攻击套装部件(激活一个套装部位+1)
|
||||
Rtype163 TaskType = 163 //收藏X件防御套装部件(激活一个套装部位+1)
|
||||
Rtype164 TaskType = 164 //收藏X件辅助套装部件(激活一个套装部位+1)
|
||||
|
||||
Rtype165 TaskType = 165 //铁匠铺收藏X件收藏品
|
||||
Rtype166 TaskType = 166 //铁匠铺图鉴收藏总计达到X个
|
||||
Rtype167 TaskType = 167 //铁匠铺收藏积分达到X分
|
||||
|
@ -91,7 +91,6 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
||||
handle := &rtaskCondHandle{
|
||||
condId: v.Id,
|
||||
verify: this.modelRtask.verifyRtype3,
|
||||
update: this.modelRtaskRecord.overrideUpdate,
|
||||
}
|
||||
handles = append(handles, handle)
|
||||
this.registerVerifyHandle(v.Id, handle)
|
||||
@ -107,7 +106,6 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
||||
handle := &rtaskCondHandle{
|
||||
condId: v.Id,
|
||||
verify: this.modelRtask.verfiyRtype9,
|
||||
update: this.modelRtaskRecord.overrideUpdate,
|
||||
}
|
||||
handles = append(handles, handle)
|
||||
this.registerVerifyHandle(v.Id, handle)
|
||||
@ -125,8 +123,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
||||
comm.Rtype128, comm.Rtype130, comm.Rtype131, comm.Rtype132, comm.Rtype135,
|
||||
comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146,
|
||||
comm.Rtype147, comm.Rtype148, comm.Rtype149, comm.Rtype152, comm.Rtype153, comm.Rtype154,
|
||||
comm.Rtype155, comm.Rtype156, comm.Rtype161, comm.Rtype162, comm.Rtype163, comm.Rtype164,
|
||||
comm.Rtype165, comm.Rtype166, comm.Rtype167,
|
||||
comm.Rtype156, comm.Rtype161, comm.Rtype165, comm.Rtype166, comm.Rtype167,
|
||||
comm.Rtype171, comm.Rtype172, comm.Rtype173, comm.Rtype175, comm.Rtype177,
|
||||
comm.Rtype181, comm.Rtype182, comm.Rtype183, comm.Rtype184, comm.Rtype185, comm.Rtype186, comm.Rtype187:
|
||||
handle := &rtaskCondHandle{
|
||||
@ -148,7 +145,6 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
||||
handle := &rtaskCondHandle{
|
||||
condId: v.Id,
|
||||
verify: this.modelRtask.verifyRtype20,
|
||||
update: this.modelRtaskRecord.overrideUpdate,
|
||||
}
|
||||
|
||||
handles = append(handles, handle)
|
||||
@ -162,6 +158,14 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
||||
update: this.modelRtaskRecord.overrideUpdate,
|
||||
}
|
||||
|
||||
handles = append(handles, handle)
|
||||
this.registerVerifyHandle(v.Id, handle)
|
||||
case comm.Rtype138:
|
||||
handle := &rtaskCondHandle{
|
||||
condId: v.Id,
|
||||
verify: this.modelRtask.verifyRtype138,
|
||||
}
|
||||
|
||||
handles = append(handles, handle)
|
||||
this.registerVerifyHandle(v.Id, handle)
|
||||
case comm.Rtype16, comm.Rtype17,
|
||||
|
@ -4,6 +4,7 @@ package rtask
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
@ -345,3 +346,20 @@ func (this *ModelRtask) verifyRtype63(uid string, record *pb.DBRtaskRecord, cfg
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 记录玩家在线时间并记入进度
|
||||
func (this *ModelRtask) verifyRtype138(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if um, y := userModule.(comm.IUser); y {
|
||||
if user := um.GetUser(uid); user != nil {
|
||||
now := configure.Now().Unix()
|
||||
l := (now - user.Logintime) / 60
|
||||
return soGreatEqual(int32(l), cfg.Data1)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user