Skip to content

Commit

Permalink
implement rpc 31: climb ladder
Browse files Browse the repository at this point in the history
  • Loading branch information
miniduikboot committed Apr 2, 2021
1 parent 16a2b0a commit d5ae007
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Impostor.Api/Net/Messages/Rpcs/Rpc31ClimbLadder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Impostor.Api.Net.Messages.Rpcs
{
public static class Rpc31ClimbLadder
{
public static void Serialize(IMessageWriter writer, byte ladderId, byte lastClimbLadderSid)
{
writer.Write(ladderId);
writer.Write(lastClimbLadderSid);
}

public static void Deserialize(IMessageReader reader, out byte ladderId, out byte lastClimbLadderSid)
{
ladderId = reader.ReadByte();
lastClimbLadderSid = reader.ReadByte();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public override async ValueTask<bool> HandleRpcAsync(ClientPlayer sender, Client
Rpc19EnterVent.Deserialize(reader, out ventId);
break;

case RpcCalls.ClimbLadder:
Rpc31ClimbLadder.Deserialize(reader, out byte ladderId, out byte lastClimbLadderSid);
return true;

default:
return await UnregisteredCall(call, sender);
}
Expand Down

0 comments on commit d5ae007

Please sign in to comment.