任务触发区分接取和创号

This commit is contained in:
wh_zcy 2023-05-23 09:45:02 +08:00
parent ae069e2504
commit cd798d8c34
3 changed files with 15 additions and 8 deletions

View File

@ -652,7 +652,7 @@ const (
Rtype183 TaskType = 183 Rtype183 TaskType = 183
Rtype184 TaskType = 184 Rtype184 TaskType = 184
Rtype185 TaskType = 185 Rtype185 TaskType = 185
Rtype186 TaskType = 186 Rtype186 TaskType = 186 //武馆的派遣悬赏X次
) )
const ( const (

View File

@ -311,13 +311,11 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com
if conf.Data == 1 { //接取 if conf.Data == 1 { //接取
if r, ok := record.Vals[handle.condId]; ok { if r, ok := record.Vals[handle.condId]; ok {
if r.Flag == 0 { if r.Flag == 0 { //非接取
r.Data = make(map[int32]int32) r.Data = make(map[int32]int32)
r.Flag = 1 r.Rtype = conf.Type
} }else{
} else { return
record.Vals[handle.condId] = &pb.RtaskData{
Flag: 1,
} }
} }
} }

View File

@ -146,6 +146,15 @@ func (this *ModelWorldtask) checkCondi(uid string, condiId int32) bool {
) )
return false return false
} }
//update flag=1
dr := iwt.GetCondiData(uid)
if dr != nil {
if v, ok := dr.Vals[condiId]; ok {
v.Flag = 1
iwt.ChangeCondi(uid, dr.Vals)
}
}
return true return true
} }
} }