Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
471730d46f
@ -4,7 +4,6 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"sort"
|
||||
|
||||
"go_dreamfactory/lego/base"
|
||||
@ -97,9 +96,10 @@ func (this *Passon) HeroUpLv(uid string, heroid string, lv int32) {
|
||||
if heros[i].Ispasson {
|
||||
change[heros[i].Id] = false
|
||||
for ii, v := range passon.Student {
|
||||
if v.Heroid == heros[ii].Id {
|
||||
passon.Student[ii].State = 2
|
||||
passon.Student[ii].Cdtime = configure.Now().Unix()
|
||||
if v.Heroid == heros[i].Id {
|
||||
passon.Student[ii].State = 0
|
||||
passon.Student[ii].Cdtime = 0
|
||||
passon.Student[ii].Heroid = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.WTaskBattle
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, isWin = this.module.modelBattle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
if errdata, isWin = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ func (this *apiComp) BattleStart(session comm.IUserSession, req *pb.WTaskBattleS
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, record = this.module.modelBattle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_moonfantasy,
|
||||
Format: req.Battle,
|
||||
Mformat: battleConf.FormatList,
|
||||
|
@ -122,5 +122,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) (
|
||||
}
|
||||
return
|
||||
}
|
||||
if conf.Des == 5 {
|
||||
this.module.caravan.TaskComplete(session, req.Tid)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -14,12 +14,13 @@ const modulename = "世界任务"
|
||||
|
||||
type WTask struct {
|
||||
modules.ModuleBase
|
||||
service core.IService
|
||||
modelBattle comm.IBattle
|
||||
modelSys comm.ISys
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
modelwtask *ModelWTask
|
||||
service core.IService
|
||||
caravan comm.ICaravan
|
||||
battle comm.IBattle
|
||||
sys comm.ISys
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
modelwtask *ModelWTask
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -42,12 +43,15 @@ func (this *WTask) Start() (err error) {
|
||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||
return
|
||||
}
|
||||
this.modelBattle = module.(comm.IBattle)
|
||||
this.battle = module.(comm.IBattle)
|
||||
if module, err = this.service.GetModule(comm.ModuleSys); err != nil {
|
||||
return
|
||||
}
|
||||
this.modelSys = module.(comm.ISys)
|
||||
// event.Register(comm.EventBuriedComplete, this.BuriedsNotify)
|
||||
this.sys = module.(comm.ISys)
|
||||
if module, err = this.service.GetModule(comm.ModuleCaravan); err != nil {
|
||||
return
|
||||
}
|
||||
this.caravan = module.(comm.ICaravan)
|
||||
return
|
||||
}
|
||||
|
||||
@ -357,7 +361,7 @@ func (this *WTask) fishtask(session comm.IUserSession, wtask *pb.DBWTask, ispush
|
||||
user *pb.DBUser
|
||||
)
|
||||
|
||||
if opencmdMap, errdata = this.modelSys.QueryOpenCondData(session.GetUserId()); errdata != nil {
|
||||
if opencmdMap, errdata = this.sys.QueryOpenCondData(session.GetUserId()); errdata != nil {
|
||||
this.Error("查询用户功能是否开启表 失败!", log.Field{Key: "key", Value: errdata})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user