forked from SoDOff-Project/sodoff-mmo

- 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
13 lines
281 B
C#
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);
|
|
}
|
|
}
|