Пример #1
0
            public static bool Prefix(GPOHFPAIEMA __instance, byte OPCIDHAAHLI, Hazel.MessageReader DNCHPFLHHEN)
            {
                switch (OPCIDHAAHLI)
                {
                case 22:
                    __instance.Close();
                    break;

                case 23: {
                    byte[] states = DNCHPFLHHEN.ReadBytesAndSize();
                    byte[] votes  = DNCHPFLHHEN.ReadBytesAndSize();
                    BAGGGBBOHOH.FGMBFCIIILC playerById = BAGGGBBOHOH.Instance.GetPlayerById(DNCHPFLHHEN.ReadByte());
                    bool tie = DNCHPFLHHEN.ReadBoolean();
                    VotingComplete(__instance, states, votes, playerById, tie);
                    break;
                }

                case 24: {
                    byte  srcPlayerId     = DNCHPFLHHEN.ReadByte();
                    sbyte suspectPlayerId = DNCHPFLHHEN.ReadSByte();
                    __instance.CastVote(srcPlayerId, suspectPlayerId);
                    break;
                }

                case 25:
                    __instance.ClearVote();
                    break;
                }
                return(false);
            }
Пример #2
0
            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);
            }
Пример #3
0
 public void Recycle()
 {
     this.Parent = null;
     ReaderPool.PutObject(this);
 }