public static bool Prefix(MeetingHud __instance, byte HKHMBLJFLMC, Hazel.MessageReader ALMCIJKELCP) { switch (HKHMBLJFLMC) { case 22: __instance.Close(); break; case 23: { byte[] states = ALMCIJKELCP.ReadBytesAndSize(); byte[] votes = ALMCIJKELCP.ReadBytesAndSize(); PlayerInfo playerById = GameData.Instance.GetPlayerById(ALMCIJKELCP.ReadByte()); bool tie = ALMCIJKELCP.ReadBoolean(); VotingComplete(__instance, states, votes, playerById, tie); break; } case 24: { byte srcPlayerId = ALMCIJKELCP.ReadByte(); sbyte suspectPlayerId = ALMCIJKELCP.ReadSByte(); __instance.CastVote(srcPlayerId, suspectPlayerId); break; } case 25: __instance.ClearVote(); break; } return(false); }
static bool Prefix(MeetingHud __instance, [HarmonyArgument(0)] byte callId, [HarmonyArgument(1)] MessageReader reader) { switch (callId) { case 22: __instance.Close(); break; case 23: { byte[] states = reader.ReadBytesAndSize(); byte[] votes = reader.ReadBytesAndSize(); PlayerInfo playerById = GameData.Instance.GetPlayerById(reader.ReadByte()); bool tie = reader.ReadBoolean(); VotingComplete(__instance, states, votes, playerById, tie); break; } case 24: { byte srcPlayerId = reader.ReadByte(); sbyte suspectPlayerId = reader.ReadSByte(); __instance.CastVote(srcPlayerId, suspectPlayerId); break; } case 25: __instance.ClearVote(); break; } return(false); }