--- /dev/null
+namespace Impostor.Api.Net.Messages.Rpcs
+{
+ public static class Rpc62CheckVanish
+ {
+ public static void Serialize(IMessageWriter writer, float maxDuration)
+ {
+ writer.Write(maxDuration);
+ }
+
+ public static void Deserialize(IMessageReader reader, out float maxDuration)
+ {
+ maxDuration = reader.ReadSingle();
+ }
+ }
+}
--- /dev/null
+namespace Impostor.Api.Net.Messages.Rpcs
+{
+ public static class Rpc64CheckAppear
+ {
+ public static void Serialize(IMessageWriter writer, bool shouldAnimate)
+ {
+ writer.Write(shouldAnimate);
+ }
+
+ public static void Deserialize(IMessageReader reader, out bool shouldAnimate)
+ {
+ shouldAnimate = reader.ReadBoolean();
+ }
+ }
+}
--- /dev/null
+namespace Impostor.Api.Net.Messages.Rpcs
+{
+ public static class Rpc65StartAppear
+ {
+ public static void Serialize(IMessageWriter writer, bool shouldAnimate)
+ {
+ writer.Write(shouldAnimate);
+ }
+
+ public static void Deserialize(IMessageReader reader, out bool shouldAnimate)
+ {
+ shouldAnimate = reader.ReadBoolean();
+ }
+ }
+}
return false;
}
- Rpc55CheckShapeshift.Deserialize(reader, Game, out var playerControl, out var shouldAnimate);
+ Rpc55CheckShapeshift.Deserialize(reader, Game, out var playerControl, out _);
break;
}
break;
}
+ case RpcCalls.CheckVanish:
+ {
+ if (!await ValidateOwnership(call, sender) ||
+ !await ValidateRole(call, sender, PlayerInfo, RoleTypes.Phantom) ||
+ !await ValidateCmd(call, sender, target))
+ {
+ return false;
+ }
+
+ Rpc62CheckVanish.Deserialize(reader, out var maxDuration);
+ break;
+ }
+
+ case RpcCalls.StartVanish:
+ {
+ if (!await ValidateHost(call, sender) ||
+ !await ValidateBroadcast(call, sender, target))
+ {
+ return false;
+ }
+
+ Rpc63StartVanish.Deserialize(reader);
+ break;
+ }
+
+ case RpcCalls.CheckAppear:
+ {
+ if (!await ValidateOwnership(call, sender) ||
+ !await ValidateRole(call, sender, PlayerInfo, RoleTypes.Phantom) ||
+ !await ValidateCmd(call, sender, target))
+ {
+ return false;
+ }
+
+ Rpc64CheckAppear.Deserialize(reader, out bool shouldAnimate);
+ break;
+ }
+
+ case RpcCalls.StartAppear:
+ {
+ if (!await ValidateHost(call, sender) ||
+ !await ValidateBroadcast(call, sender, target))
+ {
+ return false;
+ }
+
+ Rpc65StartAppear.Deserialize(reader, out _);
+ break;
+ }
+
default:
return await base.HandleRpcAsync(sender, target, call, reader);
}