race quit, transfer state, refactor
This commit is contained in:
@@ -43,7 +43,7 @@ func (c *Cache) ShipGroupShipClass(groupIndex int) *game.ShipType {
|
||||
func (c *Cache) RaceIndex(ID uuid.UUID) int {
|
||||
if c.cacheRaceIndexByID == nil {
|
||||
c.cacheRaceIndexByID = make(map[uuid.UUID]int)
|
||||
for i := range c.g.Race {
|
||||
for i := range c.listRaceIdx() {
|
||||
c.cacheRaceIndexByID[c.g.Race[i].ID] = i
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user