添加任务条件容错处理
This commit is contained in:
parent
a3b83dca02
commit
a986a225ca
@ -107,7 +107,7 @@ func (this *configureComp) getburiedcondidata(cid int32) (result *cfg.GameBuried
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if result, ok = v.(*cfg.GameBuriedCondi).GetDataMap()[cid]; !ok {
|
if result, ok = v.(*cfg.GameBuriedCondi).GetDataMap()[cid]; !ok {
|
||||||
err = comm.NewNotFoundConfErr(moduleName, game_buriedtype, cid)
|
err = comm.NewNotFoundConfErr(moduleName, game_buriedcondi, cid)
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,9 @@ func (this *Buried) ActiveCondition(uid string, condiIds ...int32) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range condiIds {
|
for _, v := range condiIds {
|
||||||
|
if v == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -150,6 +153,9 @@ func (this *Buried) CheckCondition(uid string, condiIds ...int32) (condis []*pb.
|
|||||||
}
|
}
|
||||||
condis = make([]*pb.ConIProgress, 0)
|
condis = make([]*pb.ConIProgress, 0)
|
||||||
for _, v := range condiIds {
|
for _, v := range condiIds {
|
||||||
|
if v == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -225,6 +231,9 @@ func (this *Buried) FinishConditionAndCheck(uid string, finishcondiIds []int32,
|
|||||||
|
|
||||||
condis = make([]*pb.ConIProgress, 0)
|
condis = make([]*pb.ConIProgress, 0)
|
||||||
for _, v := range finishcondiIds {
|
for _, v := range finishcondiIds {
|
||||||
|
if v == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -280,6 +289,9 @@ func (this *Buried) FinishConditionAndCheck(uid string, finishcondiIds []int32,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range condiIds {
|
for _, v := range condiIds {
|
||||||
|
if v == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user