mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
配置表访问接口化,简化常量访问
This commit is contained in:
@@ -10,8 +10,7 @@ import (
|
||||
"github.com/jszwec/csvutil"
|
||||
)
|
||||
|
||||
// 角色卡牌配置表
|
||||
|
||||
// GCGCharData 角色卡牌配置表
|
||||
type GCGCharData struct {
|
||||
CharId int32 `csv:"CharId"` // ID
|
||||
TagId1 int32 `csv:"TagId1,omitempty"` // 卡牌标签列表1
|
||||
@@ -64,3 +63,11 @@ func (g *GameDataConfig) loadGCGCharData() {
|
||||
}
|
||||
logger.Info("GCGCharData count: %v", len(g.GCGCharDataMap))
|
||||
}
|
||||
|
||||
func GetGCGCharDataById(charId int32) *GCGCharData {
|
||||
return CONF.GCGCharDataMap[charId]
|
||||
}
|
||||
|
||||
func GetGCGCharDataMap() map[int32]*GCGCharData {
|
||||
return CONF.GCGCharDataMap
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user