+++ /dev/null
-namespace Impostor.Api.Innersloth
-{
- public enum ChatType
- {
- FreeChatOrQuickChat = 1,
- QuickChatOnly = 2,
- }
-}
--- /dev/null
+namespace Impostor.Api.Innersloth
+{
+ public enum Platforms
+ {
+ Unknown,
+ StandaloneEpicPC,
+ StandaloneSteamPC,
+ StandaloneMac,
+ StandaloneWin10,
+ StandaloneItch,
+ IPhone,
+ Android,
+ Switch,
+ }
+}
--- /dev/null
+namespace Impostor.Api.Innersloth
+{
+ public enum QuickChatModes
+ {
+ FreeChatOrQuickChat = 1,
+ QuickChatOnly = 2,
+ }
+}
/// Deserialize a packet.
/// </summary>
/// <param name="reader"><see cref="IMessageReader" /> with <see cref="IMessageReader.Tag" /> 0.</param>
- /// <param name="chatType">The chat type selected in the client of the player.</param>
+ /// <param name="chatMode">The chat type selected in the client of the player.</param>
/// <returns>Deserialized <see cref="GameOptionsData" />.</returns>
- public static GameOptionsData Deserialize(IMessageReader reader, out ChatType chatType)
+ public static GameOptionsData Deserialize(IMessageReader reader, out QuickChatModes chatMode)
{
var gameOptionsData = GameOptionsData.DeserializeCreate(reader);
- chatType = (ChatType)reader.ReadByte();
+ chatMode = (QuickChatModes)reader.ReadByte();
return gameOptionsData;
}
throw new NotImplementedException();
}
- public static void Deserialize(IMessageReader reader, out GameOptionsData options, out ChatType chatType)
+ public static void Deserialize(IMessageReader reader, out GameOptionsData options, out QuickChatModes chatMode)
{
reader.ReadPackedInt32(); // Hardcoded 0.
options = GameOptionsData.DeserializeCreate(reader);
- chatType = (ChatType)reader.ReadByte();
+ chatMode = (QuickChatModes)reader.ReadByte();
}
}
}
public const byte SceneChangeFlag = 6;
public const byte ReadyFlag = 7;
public const byte ChangeSettingsFlag = 8;
- public const byte ClientInfoFlag = 205;
+ public const byte ConsoleDeclareClientPlatformFlag = 205;
+ public const byte PS4RoomRequest = 206;
}
}
{
private static readonly HashSet<int> SupportedVersions = new HashSet<int>
{
- GameVersion.GetVersion(2021, 3, 5), // 2021.3.5
+ GameVersion.GetVersion(2021, 3, 25), // 2021.3.31s
};
private static readonly string ServerBrand = $"Impostor {DotnetUtils.GetVersion()}";
break;
}
- case GameDataTag.ClientInfoFlag:
+ case GameDataTag.ConsoleDeclareClientPlatformFlag:
{
var clientId = reader.ReadPackedInt32();
var platform = (RuntimePlatform)reader.ReadPackedInt32();
if (clientId != sender.Client.Id)
{
- if (await sender.Client.ReportCheatAsync(new CheatContext(nameof(GameDataTag.ClientInfoFlag)), "Client sent info with wrong client id"))
+ if (await sender.Client.ReportCheatAsync(new CheatContext(nameof(GameDataTag.ConsoleDeclareClientPlatformFlag)), "Client sent info with wrong client id"))
{
return false;
}