mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 00:08:50 -07:00
implement JL (Join LIMBO) command
Join Limbo command based on Alan Moon PR --------- Co-authored-by: Alan Moon <alanmoonbase2004@gmail.com>
This commit is contained in:
parent
7321b95821
commit
7d96a03042
17
src/CommandHandlers/JoinLimboHandler.cs
Normal file
17
src/CommandHandlers/JoinLimboHandler.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user