上传战斗配置

This commit is contained in:
liwei 2022-11-15 14:18:45 +08:00
parent 36c8b45e57
commit 38eceed9d4

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"sync" "sync"
) )
@ -32,26 +33,26 @@ type configureComp struct {
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.MCompConfigure.Init(service, module, comp, options) this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Battle) this.module = module.(*Battle)
// this.LoadConfigure(game_equipsuit, cfg.NewGameEquipSuit) this.LoadConfigure(game_equipsuit, cfg.NewGameEquipSuit)
// this.LoadConfigure(game_monster, cfg.NewGameMonster) this.LoadConfigure(game_monster, cfg.NewGameMonster)
// configure.RegisterConfigure(game_monsterformat, cfg.NewGameMonsterFormat, func() { configure.RegisterConfigure(game_monsterformat, cfg.NewGameMonsterFormat, func() {
// this.mformatlock.Lock() this.mformatlock.Lock()
// if v, err := this.GetConfigure(game_monsterformat); err != nil { if v, err := this.GetConfigure(game_monsterformat); err != nil {
// this.module.Errorf("err:%v", err) this.module.Errorf("err:%v", err)
// return return
// } else { } else {
// this.mformat = make(map[int32][]*cfg.GameMonsterFormatData) this.mformat = make(map[int32][]*cfg.GameMonsterFormatData)
// for _, v := range v.(*cfg.GameMonsterFormat).GetDataList() { for _, v := range v.(*cfg.GameMonsterFormat).GetDataList() {
// if this.mformat[v.Id] == nil { if this.mformat[v.Id] == nil {
// this.mformat[v.Id] = make([]*cfg.GameMonsterFormatData, 5) this.mformat[v.Id] = make([]*cfg.GameMonsterFormatData, 5)
// } }
// if v.Monster != -1 { if v.Monster != -1 {
// this.mformat[v.Id][v.Pos-1] = v this.mformat[v.Id][v.Pos-1] = v
// } }
// } }
// } }
// this.mformatlock.Unlock() this.mformatlock.Unlock()
// }) })
// configure.RegisterConfigure(game_skillatk, cfg.NewGameSkillAtk, func() { // configure.RegisterConfigure(game_skillatk, cfg.NewGameSkillAtk, func() {
// this.skillatklock.Lock() // this.skillatklock.Lock()
// if v, err := this.GetConfigure(game_skillatk); err != nil { // if v, err := this.GetConfigure(game_skillatk); err != nil {