jsgr-mmo/src/CommandHandlers/ExitHandler.cs
Robert Paciorek 82e83722da fix client stay in room and add Room.Send
- fix client stay in room:
  - replace Client.JoinRoom and Client.LeaveRoom by Client.SetRoom
  - do not call Client.LeaveRoom / Client.SetRoom(null) for SheduleDisconnect cases
    (only quietly remove client from room and the rest do in disconnect realisation)
- add Room.Send for send message to all clients in room
  - replace Room.Client sending loops by calls Room.Send
2024-03-24 21:29:57 +00:00

13 lines
281 B
C#

using sodoffmmo.Attributes;
using sodoffmmo.Core;
using sodoffmmo.Data;
namespace sodoffmmo.CommandHandlers;
[CommandHandler(26)]
class ExitHandler : ICommandHandler {
public void Handle(Client client, NetworkObject receivedObject) {
client.SetRoom(null);
}
}