Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
193deb145d
@ -27,6 +27,7 @@ type Activity struct {
|
||||
pay comm.IPay // 支付
|
||||
shopcenter comm.IShopcenter // 活动中心
|
||||
addrecharge comm.IAddrecharge // 活动中心
|
||||
kftask comm.IActivityNotice // 开服任务
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -77,6 +78,10 @@ func (this *Activity) Start() (err error) {
|
||||
return
|
||||
}
|
||||
this.addrecharge = module.(comm.IAddrecharge)
|
||||
if module, err = this.service.GetModule(comm.ModuleKFTask); err != nil {
|
||||
return
|
||||
}
|
||||
this.kftask = module.(comm.IActivityNotice)
|
||||
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
|
||||
if !db.IsCross() {
|
||||
this.modelhdList.LoadActivityData()
|
||||
@ -94,6 +99,9 @@ func (this *Activity) Start() (err error) {
|
||||
case pb.HdType_AddUpRecharge:
|
||||
this.addrecharge.ActivityOpenNotice(v)
|
||||
break
|
||||
case pb.HdType_KFSevenTask:
|
||||
this.kftask.ActivityOpenNotice(v)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,6 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
||||
this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{
|
||||
"item": info.Item,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "complete", &pb.StorylineCompleteResp{Level: req.Level, Award: award})
|
||||
session.SendMsg(string(this.module.GetType()), "complete", &pb.StorylineCompleteResp{Level: req.Level, Story: req.Story, Award: award})
|
||||
return
|
||||
}
|
||||
|
@ -42,20 +42,22 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
|
||||
case 2: //关卡ID
|
||||
// 查询主线进度
|
||||
if levels := this.moduleSys.mainline.InquireMainLinePassLevel(uid); len(levels) > 0 {
|
||||
if _, ok := levels[conf.Param]; ok {
|
||||
return condData.Id
|
||||
} else {
|
||||
if _, ok := levels[conf.Param]; !ok {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
case 3: //世界任务ID
|
||||
d := this.moduleSys.wtask.InquireCompletes(uid)
|
||||
ok := false
|
||||
for _, taskId := range d {
|
||||
if taskId == conf.Param {
|
||||
return condData.Id
|
||||
ok = true
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
|
||||
case 4:
|
||||
module, err := this.service.GetModule(comm.ModuleFriend)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user