23 lines
431 B
Go
23 lines
431 B
Go
package data
|
|
|
|
type SceneMapTableExtend struct {
|
|
*SceneMapTable
|
|
|
|
extMap map[int][]*SceneMap
|
|
}
|
|
|
|
func (this *SceneMapTableExtend) init() error {
|
|
if this.SceneMapTable == nil {
|
|
return nil
|
|
}
|
|
this.extMap = map[int][]*SceneMap{}
|
|
for _, d := range this.l {
|
|
this.extMap[d.SceneId] = append(this.extMap[d.SceneId], d)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (this *SceneMapTableExtend) Get(sceneId int) []*SceneMap {
|
|
return this.extMap[sceneId]
|
|
}
|