mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
场景group分suite加载、读取掉落表
This commit is contained in:
@@ -8,17 +8,16 @@ import (
|
||||
type GatherData struct {
|
||||
PointType int32 `csv:"挂节点类型"`
|
||||
GatherId int32 `csv:"ID"`
|
||||
GadgetId int32 `csv:"采集物ID"`
|
||||
ItemId int32 `csv:"获得物品ID"`
|
||||
GadgetId int32 `csv:"采集物ID,omitempty"`
|
||||
ItemId int32 `csv:"获得物品ID,omitempty"`
|
||||
}
|
||||
|
||||
func (g *GameDataConfig) loadGatherData() {
|
||||
g.GatherDataMap = make(map[int32]*GatherData)
|
||||
gatherDataList := make([]*GatherData, 0)
|
||||
readTable[GatherData](g.tablePrefix+"GatherData.txt", &gatherDataList)
|
||||
readTable[GatherData](g.txtPrefix+"GatherData.txt", &gatherDataList)
|
||||
g.GatherDataPointTypeMap = make(map[int32]*GatherData)
|
||||
for _, gatherData := range gatherDataList {
|
||||
// list -> map
|
||||
g.GatherDataMap[gatherData.GatherId] = gatherData
|
||||
g.GatherDataPointTypeMap[gatherData.PointType] = gatherData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user