重构网关服务器

This commit is contained in:
flswld
2022-12-19 01:35:15 +08:00
parent d337799fd8
commit f773ba8df7
19 changed files with 686 additions and 1241 deletions

View File

@@ -12,7 +12,6 @@ var CONF *GameDataConfig = nil
type GameDataConfig struct {
binPrefix string
excelBinPrefix string
csvPrefix string
GameDepot *GameDepot
// 配置表
// BinOutput
@@ -33,8 +32,6 @@ type GameDataConfig struct {
// 角色技能
AvatarSkillDataMap map[int32]*AvatarSkillData
AvatarSkillDepotDataMap map[int32]*AvatarSkillDepotData
// 掉落组配置表
DropGroupDataMap map[int32]*DropGroupData
// GG
GadgetDataMap map[int32]*GadgetData
// 采集物
@@ -45,7 +42,6 @@ func InitGameDataConfig() {
CONF = new(GameDataConfig)
CONF.binPrefix = ""
CONF.excelBinPrefix = ""
CONF.csvPrefix = ""
CONF.loadAll()
}
@@ -65,8 +61,6 @@ func (g *GameDataConfig) load() {
// 角色技能
g.loadAvatarSkillData()
g.loadAvatarSkillDepotData()
// 掉落组配置表
g.loadDropGroupData()
// GG
g.loadGadgetData()
// 采集物
@@ -87,7 +81,6 @@ func (g *GameDataConfig) loadAll() {
}
g.binPrefix = resourcePath + "/BinOutput"
g.excelBinPrefix = resourcePath + "/ExcelBinOutput"
g.csvPrefix = resourcePath + "/Csv"
dirInfo, err = os.Stat(g.binPrefix)
if err != nil || !dirInfo.IsDir() {
logger.LOG.Error("open game data bin output config dir error: %v", err)
@@ -98,14 +91,8 @@ func (g *GameDataConfig) loadAll() {
logger.LOG.Error("open game data excel bin output config dir error: %v", err)
return
}
dirInfo, err = os.Stat(g.csvPrefix)
if err != nil || !dirInfo.IsDir() {
logger.LOG.Error("open game data csv config dir error: %v", err)
return
}
g.binPrefix += "/"
g.excelBinPrefix += "/"
g.csvPrefix += "/"
g.load()
}