diff options
Diffstat (limited to 'internal/game/cmd_estate_directory.go')
| -rw-r--r-- | internal/game/cmd_estate_directory.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/game/cmd_estate_directory.go b/internal/game/cmd_estate_directory.go index 9966e52..83c5b80 100644 --- a/internal/game/cmd_estate_directory.go +++ b/internal/game/cmd_estate_directory.go @@ -2,6 +2,7 @@ package game import ( "fmt" + "log" "os" "path/filepath" "sort" @@ -182,12 +183,20 @@ func (g *Game) getOwnedHouseRoom(p *player.Player, flagKey string) int { } houseMap := map[string]int{ - "local_neighborhood": 99999300, + "local_neighborhood": estateNeighborhoodID, } return houseMap[v] } func (g *Game) teleportPlayer(sess *net.Session, p *player.Player, roomID int) { + // Refuse a destination that does not exist: persisting a nonexistent + // RoomID soft-locks the character on login (see the login rescue in + // core_login_char.go). This is the single choke point every trigger, + // module, and estate teleport flows through. + if _, err := g.World.LoadRoom(roomID); err != nil { + log.Printf("teleport %s: destination room %d does not exist; ignoring", p.Name, roomID) + return + } if g.Hub != nil { for _, other := range g.Hub.PlayersInRoom(p.RoomID) { if other != sess { |
