ecs/servers/game/data_old/charge_gift_ext.go

25 lines
438 B
Go
Raw Normal View History

2025-06-04 18:17:39 +08:00
package data
type ChargeGiftTableExtend struct {
*ChargeGiftTable
extMap map[int][]*ChargeGift
}
func (this *ChargeGiftTableExtend) init() error {
if this.ChargeGiftTable == nil {
return nil
}
this.extMap = map[int][]*ChargeGift{}
for _, d := range this.l {
this.extMap[d.Type] = append(this.extMap[d.Type], d)
}
return nil
}
func (this *ChargeGiftTableExtend) List(tipe int) []*ChargeGift {
return this.extMap[tipe]
}