stage as a /internal/system

This commit is contained in:
stratic-dev
2024-10-17 20:22:53 +01:00
parent 674ac9bd47
commit 094855b984
10 changed files with 177 additions and 158 deletions

View File

@@ -28,20 +28,20 @@ func handleMsgSysEnumerateClient(s *Session, db *sqlx.DB, p mhfpacket.MHFPacket)
var clients []uint32
switch pkt.Get {
case 0: // All
for _, cid := range stage.clients {
for _, cid := range stage.Clients {
clients = append(clients, cid)
}
for cid := range stage.reservedClientSlots {
for cid := range stage.ReservedClientSlots {
clients = append(clients, cid)
}
case 1: // Not ready
for cid, ready := range stage.reservedClientSlots {
for cid, ready := range stage.ReservedClientSlots {
if !ready {
clients = append(clients, cid)
}
}
case 2: // Ready
for cid, ready := range stage.reservedClientSlots {
for cid, ready := range stage.ReservedClientSlots {
if ready {
clients = append(clients, cid)
}