package jsonload // 活动active表 type ZoneActiveItem struct { IncreaseID int `json:"ID"` Name string `json:"Name"` ActiveTime []int `json:"timeInterval"` //活动时间 FreeCount int `json:"OpenTimes"` BuysCost [][2]int64 `json:"OpenBuy"` ChapterID uint `json:"MapChapter"` Restrict []int `json:"Restrict"` // 限制掉落道具类型 } // 加载活动 func LoadZoneActive() []*ZoneActiveItem { filePath := "../serverjson/activity.json" var zoneActives []*ZoneActiveItem LoadJsonFile(filePath, &zoneActives) return zoneActives } // func (zai []*ZoneActiveItem) GetItem(id int) *jsonload.ZoneActiveItem { // for _, v := range zai.ZoneActives { // if v.IncreaseID == id { // return v // } // } // return nil // }