MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / HasVisitedRoom

Method HasVisitedRoom

internal/characters/character.go:1010–1019  ·  view source on GitHub ↗

HasVisitedRoom reports whether this character has ever visited roomId in zone.

(roomId int, zone string)

Source from the content-addressed store, hash-verified

1008
1009// HasVisitedRoom reports whether this character has ever visited roomId in zone.
1010func (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

Callers 6

buildWorldMapMethod · 0.80
GetRoomNodeMethod · 0.80
GetLimitedMapMethod · 0.80
GetDetailsFunction · 0.80

Calls 1

HasMethod · 0.45