diff --git a/server/wheelserver/mt/MapGrid.go b/server/wheelserver/mt/MapGrid.go index dc6bbbe9..1753a011 100644 --- a/server/wheelserver/mt/MapGrid.go +++ b/server/wheelserver/mt/MapGrid.go @@ -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 + }) +}