This commit is contained in:
aozhiwei 2024-11-29 14:24:40 +08:00
parent b25affbbb7
commit 3c7e06bdd3

View File

@ -19,6 +19,7 @@ type MapGrid struct {
type MapGridTable struct {
f5.IdMetaTable[MapGrid]
maxGridId int32
}
func (this *MapGrid) Init1() {
@ -38,3 +39,12 @@ func (this *MapGrid) Init1() {
func (this *MapGrid) GetRewardItems() *[]*MapGridRewardItem {
return &this.rewardItems
}
func (this *MapGridTable) PostInit1() {
this.Traverse(func (gridMeta *MapGrid) bool {
if gridMeta.GetId() > this.maxGridId {
this.maxGridId = gridMeta.GetId()
}
return true
})
}