Implement MsgSysEnumerateStage w/ stage map

This commit is contained in:
Andrew Gutekanst
2020-01-22 17:53:27 -05:00
parent b898614ddc
commit fa245e53fb
4 changed files with 62 additions and 10 deletions

View File

@@ -32,8 +32,8 @@ type Server struct {
isShuttingDown bool
gameObjectLock sync.Mutex
gameObjectCount uint32
stagesLock sync.RWMutex
stages map[string]*Stage
}
// NewServer creates a new Server type.
@@ -45,7 +45,12 @@ func NewServer(config *Config) *Server {
acceptConns: make(chan net.Conn),
deleteConns: make(chan net.Conn),
sessions: make(map[net.Conn]*Session),
stages: make(map[string]*Stage),
}
// Default town stage that clients try to enter without creating.
s.stages["sl1Ns200p0a0u0"] = &Stage{}
return s
}