任务触发区分接取和创号
This commit is contained in:
parent
ae069e2504
commit
cd798d8c34
@ -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 (
|
||||||
|
@ -311,15 +311,13 @@ 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{
|
||||||
|
return
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
record.Vals[handle.condId] = &pb.RtaskData{
|
|
||||||
Flag: 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if handle.update != nil {
|
if handle.update != nil {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user