HasVisitedRoom reports whether this character has ever visited roomId in zone.
(roomId int, zone string)
| 1008 | |
| 1009 | // HasVisitedRoom reports whether this character has ever visited roomId in zone. |
| 1010 | func (c *Character) HasVisitedRoom(roomId int, zone string) bool { |
| 1011 | if c.ZonesVisited == nil { |
| 1012 | return false |
| 1013 | } |
| 1014 | bs, ok := c.ZonesVisited[zone] |
| 1015 | if !ok { |
| 1016 | return false |
| 1017 | } |
| 1018 | return bs.Has(roomId) |
| 1019 | } |
| 1020 | |
| 1021 | // ZoneVisitProgress returns how many rooms the character has visited in zone |
| 1022 | // and the total number of rooms in that zone, allowing callers to compute a |