模块注册
This commit is contained in:
parent
d581c883d8
commit
6ff124663d
@ -6,12 +6,12 @@ import (
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.HeroListReq) (errdata *pb.ErrorData) {
|
||||
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.DragonGetListReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) List(session comm.IUserSession, req *pb.HeroListReq) (errdata *pb.ErrorData) {
|
||||
rsp := &pb.HeroListResp{}
|
||||
func (this *apiComp) List(session comm.IUserSession, req *pb.DragonGetListReq) (errdata *pb.ErrorData) {
|
||||
rsp := &pb.DragonGetListResp{}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "", rsp)
|
||||
return
|
||||
|
@ -43,6 +43,7 @@ func (this *configureComp) LoadDragon() {
|
||||
if v, err := this.GetConfigure(dragon_trainlv); err == nil {
|
||||
this.hlock.Lock()
|
||||
defer this.hlock.Unlock()
|
||||
this.dragon = make(map[string]*cfg.GameTrainlvData)
|
||||
if _configure, ok := v.(*cfg.GameTrainlv); ok {
|
||||
for _, v := range _configure.GetDataList() {
|
||||
this.dragon[v.Id+"-"+strconv.Itoa(int(v.Lv))] = v
|
||||
|
@ -22,7 +22,7 @@ type Dragon struct {
|
||||
|
||||
// 模块名
|
||||
func (this *Dragon) GetType() core.M_Modules {
|
||||
return comm.ModuleHero
|
||||
return comm.ModuleDragon
|
||||
}
|
||||
|
||||
// 模块初始化接口 注册用户创建角色事件
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
"go_dreamfactory/modules/combat"
|
||||
"go_dreamfactory/modules/dailytask"
|
||||
"go_dreamfactory/modules/dispatch"
|
||||
"go_dreamfactory/modules/dragon"
|
||||
"go_dreamfactory/modules/enchant"
|
||||
"go_dreamfactory/modules/equipment"
|
||||
"go_dreamfactory/modules/forum"
|
||||
@ -156,6 +157,7 @@ func main() {
|
||||
uigame.NewModule(),
|
||||
battlerecord.NewModule(),
|
||||
weektask.NewModule(),
|
||||
dragon.NewModule(),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user