diff --git a/src/CommandHandlers/JoinLimboHandler.cs b/src/CommandHandlers/JoinLimboHandler.cs new file mode 100644 index 0000000..ca4554f --- /dev/null +++ b/src/CommandHandlers/JoinLimboHandler.cs @@ -0,0 +1,17 @@ +using sodoffmmo.Attributes; +using sodoffmmo.Core; +using sodoffmmo.Data; + +namespace sodoffmmo.CommandHandlers +{ + [ExtensionCommandHandler("JL")] + public class JoinLimboHandler : CommandHandler + { + public override Task Handle(Client client, NetworkObject receivedObject) + { + client.SetRoom(Room.GetOrAdd("LIMBO")); + + return Task.CompletedTask; + } + } +} diff --git a/src/CommandHandlers/LoginHandler.cs b/src/CommandHandlers/LoginHandler.cs index 0c6eacf..0714226 100644 --- a/src/CommandHandlers/LoginHandler.cs +++ b/src/CommandHandlers/LoginHandler.cs @@ -49,18 +49,6 @@ class LoginHandler : CommandHandler r2.Add(WorldEvent.Get().EventInfoArray(true)); rl.Add(r2); - NetworkArray r3 = new(); - r3.Add(2); - r3.Add("LIMBO"); - r3.Add("default"); - r3.Add(false); - r3.Add(false); - r3.Add(false); - r3.Add((short)31); - r3.Add((short)10000); - r3.Add(new NetworkArray()); - rl.Add(r3); - NetworkObject content = new(); content.Add("rl", rl); content.Add("zn", client.PlayerData.ZoneName); diff --git a/src/Core/Client.cs b/src/Core/Client.cs index 455a6a3..0ff7659 100644 --- a/src/Core/Client.cs +++ b/src/Core/Client.cs @@ -69,7 +69,7 @@ public class Client { Room.AddClient(this); Send(Room.SubscribeRoom()); - UpdatePlayerUserVariables(); + if (Room.Name != "LIMBO") UpdatePlayerUserVariables(); // do not update user vars if room is limbo } } }