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