Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
50f5108d23
@ -133,6 +133,8 @@ func (this *Buried) CheckCondition(uid string, condiIds ...int32) (condis []*pb.
|
||||
var (
|
||||
bdatas *pb.DBBuried
|
||||
conf *cfg.GameBuriedCondiData
|
||||
bdata *pb.DBBuriedItem
|
||||
ok bool
|
||||
)
|
||||
if bdatas, err = this.modelBuried.getUserBurieds(uid); err != nil {
|
||||
return
|
||||
@ -142,7 +144,7 @@ func (this *Buried) CheckCondition(uid string, condiIds ...int32) (condis []*pb.
|
||||
if conf, err = this.configure.getburiedcondidata(v); err != nil {
|
||||
return
|
||||
}
|
||||
if bdata, ok := bdatas.Items[conf.Type]; ok {
|
||||
if bdata, ok = bdatas.Items[conf.Type]; ok {
|
||||
ok = false
|
||||
for _, v1 := range bdata.Condi {
|
||||
if v1.Conid == v {
|
||||
@ -172,16 +174,8 @@ func (this *Buried) CheckCondition(uid string, condiIds ...int32) (condis []*pb.
|
||||
})
|
||||
}
|
||||
}
|
||||
if !ok { //未找到 初始化一个
|
||||
condis = append(condis, &pb.ConIProgress{
|
||||
Btype: conf.Type,
|
||||
Conid: v,
|
||||
Value: 0,
|
||||
Target: conf.Value,
|
||||
State: pb.BuriedItemFinishState_buried_unfinish,
|
||||
})
|
||||
}
|
||||
} else { //未找到 初始化一个
|
||||
if !ok { //未找到 初始化一个
|
||||
condis = append(condis, &pb.ConIProgress{
|
||||
Btype: conf.Type,
|
||||
Conid: v,
|
||||
|
Loading…
Reference in New Issue
Block a user