예제 #1
0
        public void DontTakeReq(ControllableObject id, Player to)
        {
            if (Program.Client == null)
            {
                return;
            }
            MemoryStream stream = new MemoryStream(512);

            stream.Seek(4, SeekOrigin.Begin);
            BinaryWriter writer = new BinaryWriter(stream);

            if (Program.Client.Muted != 0)
            {
                writer.Write(Program.Client.Muted);
            }
            else
            {
                writer.Write(0);
            }
            writer.Write((byte)68);
            writer.Write(id.Id);
            writer.Write(to.Id);
            writer.Flush(); writer.Seek(0, SeekOrigin.Begin);
            writer.Write((int)stream.Length);
            writer.Close();
            Send(stream.ToArray());
        }
예제 #2
0
 private void OnEnable()
 {
     if (_inputHandler == null)
     {
         _inputHandler = GetComponent <ControllableObject>();
     }
 }
    private void OnEnable()
    {
        _controller     = GetComponent <ControllableObject>();
        _collisionState = GetComponent <PlayerCollisionState>();

        _shotgunGO = GetComponentInChildren <Shotgun>();
    }
예제 #4
0
 public override void AltFire(ControllableObject player)
 {
     player.movementMask |= 1 << MovementFlags.Floating;
     if ((player.inputMask & (1 << OmniInput.Left)) != 0)
     {
         player.accel.x = -flySpeed;
         if (player.vel.x - player.accel.x * OmniWorld.timeStep < -flySpeed)
             player.accel.x = 0;
     }
     else if ((player.inputMask & (1 << OmniInput.Right)) != 0)
     {
         player.accel.x = flySpeed;
         if (player.vel.x + player.accel.x * OmniWorld.timeStep > flySpeed)
             player.accel.x = 0;
     }
     else
         player.accel.x = 0;
     if ((player.inputMask & (1 << OmniInput.Up)) != 0)
     {
         player.accel.y = flySpeed;
         if (player.vel.y + player.accel.y * OmniWorld.timeStep > flySpeed)
             player.accel.y = 0;
     }
     else if ((player.inputMask & (1 << OmniInput.Down)) != 0)
     {
         player.accel.y = -flySpeed;
         if (player.vel.y - player.accel.y * OmniWorld.timeStep < -flySpeed)
             player.accel.y = 0;
     }
     else
         player.accel.y = 0;
 }
예제 #5
0
 private void Update()
 {
     if (_controller == null)
     {
         _controller = GameObject.FindGameObjectWithTag("Player").GetComponent <ControllableObject>();
     }
 }
예제 #6
0
    void collisionTest(ControllableObject owner)
    {
        r.Clear();
        int c1 = (int)((bounds.x + bounds.width) - bounds.x);
        int c2 = (int)((bounds.y + bounds.height) - bounds.y);

        for (int x = 0; x <= type.Size; x++)
            for (int y = 0; y <= type.Size; y++)
            {
                int c1x = (int)bounds.x + x;
                int c1y = (int)bounds.y + y;
                int id = x + y * (int)type.Size;
                if (OmniTerrain.isSolid(c1x, c1y))
                {
                    r.Add(new Rect(c1x, c1y, 1, 1));
                }
            }

        for (int i = 0; i < owner.activeChunks.Count; i++)
        {
            for (int j = 0; j < owner.activeChunks[i].objects.Count; j++)
            {

                if (owner.activeChunks[i].objects[j].id != owner.id)
                    r.Add(owner.activeChunks[i].objects[j].bounds);
            }
        }
    }
예제 #7
0
    private void OnEnable()
    {
        ControllableObject.OnButton     += OnButton;
        ControllableObject.OnButtonDown += OnButtonDown;

        _controller = GetComponent <ControllableObject>();
    }
예제 #8
0
 public void OnLevelWasLoaded(int level)
 {
     if (level > 0)
     {
         _player = null;
     }
 }
예제 #9
0
 public override void AltFire(ControllableObject player)
 {
     if (player.item == this)
     {
         player.vel.y += hoverPower * 0.5f;
     }
 }
 private void OnEnable()
 {
     _body2d         = GetComponent <Rigidbody2D>();
     _controller     = GetComponent <ControllableObject>();
     _collisionState = GetComponent <PlayerCollisionState>();
     _audioSource    = GetComponent <AudioSource>();
 }
예제 #11
0
    public override void OnUse(ControllableObject player, Vector3 pos2)
    {
        if (Network.isClient)
            return;

        bool flag = false;

        if(player.mountedTo != null)
        if (player.selected >= 0)
            if (player.bagItems[player.selected] != null)
                if (player.bagItems[player.selected].stack > 0)
                {
                    OmniItemType item = OmniItems.itemTypes[player.bagItems[player.selected].id];

                    Vector2 vel = new Vector2(Mathf.Cos((player.mountedTo.rotation + 90) * Mathf.Deg2Rad) * str, Mathf.Sin((player.mountedTo.rotation + 90) * Mathf.Deg2Rad) * str);
                    if (player.flipped)
                        vel.x *= -1;
                    Matrix4x4 tr = player.mountedTo.item.animList[0].skelMatrix2(player.mountedTo, player.mountedTo.Position, 1);

                    vel.x += player.mountedTo.vel.x;
                    vel.y += player.mountedTo.vel.y;

                    Vector2 pos = tr.MultiplyPoint(new Vector3(0,0,0));
                    pos.x -= item.Size / 2f;
                    pos.y -= item.Size / 2f;
                    pos += player.mountedTo.vel * OmniWorld.timeStep;
                    SpawnEvent e = new SpawnEvent(OmniWorld.tick, OmniItems.itemTypes[player.bagItems[player.selected].id].name, pos, vel, -1, true, typeof(DamageableObject));
                    e.firedBy = player.mountedTo;
                    OmniEvents.AddEvent(e);
                    flag = true;
                }
        if (!flag)
        base.OnUse(player, pos2);
    }
예제 #12
0
 public void PassTo(Player who, ControllableObject obj, Player player, bool requested)
 {
     // Ignore message that we sent in the first place
     if (who != Player.LocalPlayer)
     {
         obj.PassControlTo(player, who, false, requested);
     }
 }
    //private bool _animating = false;

    private void OnEnable()
    {
        _collisionState = GetComponent <PlayerCollisionState>();
        _controller     = GetComponent <ControllableObject>();

        // START THE GAME MANAGER, WINDOW MANAGER, AND THE EVENT SYSTEM
        // They are not used in this script, but they started for the reset of the game.
        GameManager          GM  = GameManager.Instance.GetComponent <GameManager>();
        WindowManager        WM  = WindowManager.Instance.GetComponent <WindowManager>();
        EventSystemSingleton ESS = EventSystemSingleton.Instance.GetComponent <EventSystemSingleton>();
    }
예제 #14
0
    public override void AltFire(ControllableObject player)
    {
        if (player.grounded)
            return;
        player.stun = 2;
        player.rotSpeed = 1080;

        if (!player.flipped)
            player.rotSpeed *= -1;

        player.mount0 = id;
    }
예제 #15
0
 public void PassTo(Player who, ControllableObject obj, Player player, bool requested)
 {
     // Ignore message that we sent in the first place
     if (who != Player.LocalPlayer)
     {
         obj.PassControlTo(player, who, false, requested);
     }
     if (obj is Card)
     {
         Program.GameEngine.EventProxy.OnCardControllerChanged_3_1_0_2((Card)obj, who, player);
     }
 }
예제 #16
0
    // Update is called once per frame
    private void FixedUpdate()
    {
        if (_player == null && GameObject.FindGameObjectWithTag("Player") != null)
        {
            _player = GameObject.FindGameObjectWithTag("Player").GetComponent <ControllableObject>();
        }

        if (!_canTakeInput && _limitedTime)
        {
            _timer = _timer > 0.0f ? _timer : Time.time;

            if (Time.time - _timer > _pauseDuration)
            {
                _canTakeInput = true;
                _timer        = 0.0f;
            }
        }

        if (_player != null)
        {
            // Depending on the controller type, run through all the inputs and check if any of the
            // button states has changed.
            if (controllerType == 0)
            {
                foreach (InputAxisState input in _DS4Inputs.inputs)
                {
                    if (_canTakeInput)
                    {
                        _player.SetButtonState(input.Button, input.IsPressed);
                    }
                    else
                    {
                        _player.SetButtonState(input.Button, false);
                    }
                }
            }
            else
            {
                foreach (InputAxisState input in _XBOXInputs.inputs)
                {
                    if (_canTakeInput)
                    {
                        _player.SetButtonState(input.Button, input.IsPressed);
                    }
                    else
                    {
                        _player.SetButtonState(input.Button, false);
                    }
                }
            }
        }
    }
예제 #17
0
    public override void OnUse(ControllableObject cplayer, Vector3 pos)
    {
        base.OnUse(cplayer, pos);

            if(cplayer.selected >= 0 && cplayer.selected < OmniQuickBar.QuickBar_Capacity)
                if (cplayer.bagItems[cplayer.selected + 1] != null)
                {
                    if (cplayer.bagItems[cplayer.selected + 1].stack > 0)
                    {
                        cplayer.mount2 = cplayer.bagItems[cplayer.selected + 1].type.id;
                    }
                }
    }
예제 #18
0
    Dictionary <string, int> storedVariables; // contains variables stored by the user

    private void Start()
    {
        // Setup required object references;
        cam = GameObject.FindObjectOfType <Camera>();

        if (robotController is null)
        {
            robotController = thisRobot.GetComponent <ControllableObject>();
        }
        SetupInputField();

        markedLines = new Dictionary <string, int>();
    }
예제 #19
0
    public override void AltFire(ControllableObject player)
    {
        player.Stamina -= DrainSpeed * OmniWorld.timeStep;
        if (player.Stamina < 0)
            player.Stamina = 0;

        if (player.Stamina > 0)
        {
            player.accel.y = 10;
        }
        else
        {
            player.mount1 = -1;
        }
    }
예제 #20
0
        internal static void Print(Player player, string text)
        {
            string finalText = text;
            int    i         = 0;
            var    args      = new List <object>(2);
            Match  match     = Regex.Match(text, "{([^}]*)}");

            while (match.Success)
            {
                string token = match.Groups[1].Value;
                finalText = finalText.Replace(match.Groups[0].Value, "##$$%%^^LEFTBRACKET^^%%$$##" + i + "##$$%%^^RIGHTBRACKET^^%%$$##");
                i++;
                object tokenValue = token;
                switch (token)
                {
                case "me":
                    tokenValue = player;
                    break;

                default:
                    if (token.StartsWith("#"))
                    {
                        int id;
                        if (!int.TryParse(token.Substring(1), out id))
                        {
                            break;
                        }
                        ControllableObject obj = ControllableObject.Find(id);
                        if (obj == null)
                        {
                            break;
                        }
                        tokenValue = obj;
                        break;
                    }
                    break;
                }
                args.Add(tokenValue);
                match = match.NextMatch();
            }
            args.Add(player);
            finalText = finalText.Replace("{", "").Replace("}", "");
            finalText = finalText.Replace("##$$%%^^LEFTBRACKET^^%%$$##", "{").Replace(
                "##$$%%^^RIGHTBRACKET^^%%$$##", "}");
            Trace.TraceEvent(TraceEventType.Information,
                             EventIds.Event | EventIds.PlayerFlag(player) | EventIds.Explicit, finalText, args.ToArray());
        }
예제 #21
0
    public override void OnUse(ControllableObject player, Vector3 pos)
    {
        int x2 = (int)(pos.x) / OmniTerrain.chunkSize;
        int y2 = (int)(pos.y) / OmniTerrain.chunkSize;
        int x = (int)(pos.x) % OmniTerrain.chunkSize;
        int y = (int)(pos.y) % OmniTerrain.chunkSize;

        if(OmniTerrain.chunks.ContainsKey(x2 + y2 * OmniTerrain.Width))
        {
        TerrainChunk ch = OmniTerrain.chunks[x2 + y2 * OmniTerrain.Width];
            if (ch.tileMap[x + y * OmniTerrain.chunkSize] == -1)
            {
                terrainAddBlock t = new terrainAddBlock(player, this, (int)pos.x, (int)pos.y);
                OmniTerrain.terrainUpdates.Add(t);
            }

        }
    }
예제 #22
0
        public void TakeFromReq(ControllableObject id, Player from)
        {
            MemoryStream stream = new MemoryStream(512);

            stream.Seek(4, SeekOrigin.Begin);
            BinaryWriter writer = new BinaryWriter(stream);

            if (Program.Client.Muted != 0)
            {
                writer.Write(Program.Client.Muted);
            }
            else
            {
                writer.Write(0);
            }
            writer.Write((byte)66);
            writer.Write(id.Id);
            writer.Write(from.Id);
            writer.Flush(); writer.Seek(0, SeekOrigin.Begin);
            writer.Write((int)stream.Length);
            writer.Close();
            Send(stream.ToArray());
        }
예제 #23
0
 public override void OnUse(ControllableObject player, Vector3 pos)
 {
 }
예제 #24
0
 public virtual void AltFire(ControllableObject player)
 {
 }
예제 #25
0
 public virtual void OnUse(ControllableObject player, Vector3 pos)
 {
 }
예제 #26
0
        public void Parse(byte[] data)
        {
            MemoryStream stream = new MemoryStream(data);
            BinaryReader reader = new BinaryReader(stream);
            short        length;

            Program.Client.Muted = reader.ReadInt32();
            byte method = reader.ReadByte();

            switch (method)
            {
            case 0:
            {
                handler.Binary();
                break;
            }

            case 1:
            {
                string arg0 = reader.ReadString();
                handler.Error(arg0);
                break;
            }

            case 3:
            {
                byte arg0 = reader.ReadByte();
                handler.Welcome(arg0);
                break;
            }

            case 4:
            {
                bool arg0 = reader.ReadBoolean();
                handler.Settings(arg0);
                break;
            }

            case 5:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSettings] Player not found."); return;
                }
                bool arg1 = reader.ReadBoolean();
                handler.PlayerSettings(arg0, arg1);
                break;
            }

            case 6:
            {
                byte   arg0 = reader.ReadByte();
                string arg1 = reader.ReadString();
                ulong  arg2 = reader.ReadUInt64();
                handler.NewPlayer(arg0, arg1, arg2);
                break;
            }

            case 7:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Leave] Player not found."); return;
                }
                handler.Leave(arg0);
                break;
            }

            case 9:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Nick] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Nick(arg0, arg1);
                break;
            }

            case 10:
            {
                handler.Start();
                break;
            }

            case 12:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Reset] Player not found."); return;
                }
                handler.Reset(arg0);
                break;
            }

            case 13:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[NextTurn] Player not found."); return;
                }
                handler.NextTurn(arg0);
                break;
            }

            case 15:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StopTurn] Player not found."); return;
                }
                handler.StopTurn(arg0);
                break;
            }

            case 17:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Chat] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Chat(arg0, arg1);
                break;
            }

            case 19:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Print] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Print(arg0, arg1);
                break;
            }

            case 21:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Random] Player not found."); return;
                }
                int arg1 = reader.ReadInt32();
                int arg2 = reader.ReadInt32();
                int arg3 = reader.ReadInt32();
                handler.Random(arg0, arg1, arg2, arg3);
                break;
            }

            case 23:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RandomAnswer1] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                ulong arg2 = reader.ReadUInt64();
                handler.RandomAnswer1(arg0, arg1, arg2);
                break;
            }

            case 25:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RandomAnswer2] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                ulong arg2 = reader.ReadUInt64();
                handler.RandomAnswer2(arg0, arg1, arg2);
                break;
            }

            case 27:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Counter] Player not found."); return;
                }
                Counter arg1 = Counter.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Counter] Counter not found."); return;
                }
                int arg2 = reader.ReadInt32();
                handler.Counter(arg0, arg1, arg2);
                break;
            }

            case 28:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                length = reader.ReadInt16();
                Group[] arg2 = new Group[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = Group.Find(reader.ReadInt32());
                    if (arg2[i] == null)
                    {
                        Debug.WriteLine("[LoadDeck] Group not found.");
                    }
                }
                handler.LoadDeck(arg0, arg1, arg2);
                break;
            }

            case 29:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[CreateCard] Group not found."); return;
                }
                handler.CreateCard(arg0, arg1, arg2);
                break;
            }

            case 30:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                length = reader.ReadInt16();
                Guid[] arg2 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                int[] arg3 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                int[] arg4 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg4[i] = reader.ReadInt32();
                }
                bool arg5 = reader.ReadBoolean();
                bool arg6 = reader.ReadBoolean();
                handler.CreateCardAt(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 31:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                handler.CreateAlias(arg0, arg1);
                break;
            }

            case 33:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCard] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[MoveCard] Card not found."); return;
                }
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[MoveCard] Group not found."); return;
                }
                int  arg3 = reader.ReadInt32();
                bool arg4 = reader.ReadBoolean();
                handler.MoveCard(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 35:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCardAt] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[MoveCardAt] Card not found."); return;
                }
                int  arg2 = reader.ReadInt32();
                int  arg3 = reader.ReadInt32();
                int  arg4 = reader.ReadInt32();
                bool arg5 = reader.ReadBoolean();
                handler.MoveCardAt(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 36:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Reveal] Card not found."); return;
                }
                ulong arg1 = reader.ReadUInt64();
                Guid  arg2 = new Guid(reader.ReadBytes(16));
                handler.Reveal(arg0, arg1, arg2);
                break;
            }

            case 38:
            {
                length = reader.ReadInt16();
                Player[] arg0 = new Player[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = Player.Find(reader.ReadByte());
                    if (arg0[i] == null)
                    {
                        Debug.WriteLine("[RevealTo] Player not found.");
                    }
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[RevealTo] Card not found."); return;
                }
                length = reader.ReadInt16();
                ulong[] arg2 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadUInt64();
                }
                handler.RevealTo(arg0, arg1, arg2);
                break;
            }

            case 40:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Peek] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Peek] Card not found."); return;
                }
                handler.Peek(arg0, arg1);
                break;
            }

            case 42:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Untarget] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Untarget] Card not found."); return;
                }
                handler.Untarget(arg0, arg1);
                break;
            }

            case 44:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Target] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Target] Card not found."); return;
                }
                handler.Target(arg0, arg1);
                break;
            }

            case 46:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TargetArrow] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                Card arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                handler.TargetArrow(arg0, arg1, arg2);
                break;
            }

            case 47:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Highlight] Card not found."); return;
                }
                string temp1 = reader.ReadString();
                Color? arg1  = temp1 == "" ? (Color?)null : (Color?)ColorConverter.ConvertFromString(temp1);
                handler.Highlight(arg0, arg1);
                break;
            }

            case 49:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Turn] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Turn] Card not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                handler.Turn(arg0, arg1, arg2);
                break;
            }

            case 51:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Rotate] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Rotate] Card not found."); return;
                }
                CardOrientation arg2 = (CardOrientation)reader.ReadByte();
                handler.Rotate(arg0, arg1, arg2);
                break;
            }

            case 52:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Shuffle] Group not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg1 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                handler.Shuffle(arg0, arg1);
                break;
            }

            case 53:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Shuffled] Group not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg1 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                short[] arg2 = new short[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt16();
                }
                handler.Shuffled(arg0, arg1, arg2);
                break;
            }

            case 54:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[UnaliasGrp] Group not found."); return;
                }
                handler.UnaliasGrp(arg0);
                break;
            }

            case 55:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                handler.Unalias(arg0, arg1);
                break;
            }

            case 57:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AddMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[AddMarker] Card not found."); return;
                }
                Guid   arg2 = new Guid(reader.ReadBytes(16));
                string arg3 = reader.ReadString();
                ushort arg4 = reader.ReadUInt16();
                handler.AddMarker(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 59:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Card not found."); return;
                }
                Guid   arg2 = new Guid(reader.ReadBytes(16));
                string arg3 = reader.ReadString();
                ushort arg4 = reader.ReadUInt16();
                handler.RemoveMarker(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 61:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[SetMarker] Card not found."); return;
                }
                Guid   arg2 = new Guid(reader.ReadBytes(16));
                string arg3 = reader.ReadString();
                ushort arg4 = reader.ReadUInt16();
                handler.SetMarker(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 63:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TransferMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                Card arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                Guid   arg3 = new Guid(reader.ReadBytes(16));
                string arg4 = reader.ReadString();
                ushort arg5 = reader.ReadUInt16();
                handler.TransferMarker(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 65:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                ControllableObject arg1 = ControllableObject.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[PassTo] ControllableObject not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                bool arg3 = reader.ReadBoolean();
                handler.PassTo(arg0, arg1, arg2, arg3);
                break;
            }

            case 67:
            {
                ControllableObject arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TakeFrom] ControllableObject not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TakeFrom] Player not found."); return;
                }
                handler.TakeFrom(arg0, arg1);
                break;
            }

            case 69:
            {
                ControllableObject arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[DontTake] ControllableObject not found."); return;
                }
                handler.DontTake(arg0);
                break;
            }

            case 70:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[FreezeCardsVisibility] Group not found."); return;
                }
                handler.FreezeCardsVisibility(arg0);
                break;
            }

            case 72:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVis] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVis] Group not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                bool arg3 = reader.ReadBoolean();
                handler.GroupVis(arg0, arg1, arg2, arg3);
                break;
            }

            case 74:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Group not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                handler.GroupVisAdd(arg0, arg1, arg2);
                break;
            }

            case 76:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Group not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                handler.GroupVisRemove(arg0, arg1, arg2);
                break;
            }

            case 78:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAt] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAt] Group not found."); return;
                }
                bool arg3 = reader.ReadBoolean();
                handler.LookAt(arg0, arg1, arg2, arg3);
                break;
            }

            case 80:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtTop] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtTop] Group not found."); return;
                }
                int  arg3 = reader.ReadInt32();
                bool arg4 = reader.ReadBoolean();
                handler.LookAtTop(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 82:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Group not found."); return;
                }
                int  arg3 = reader.ReadInt32();
                bool arg4 = reader.ReadBoolean();
                handler.LookAtBottom(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 84:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StartLimited] Player not found."); return;
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                handler.StartLimited(arg0, arg1);
                break;
            }

            case 86:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CancelLimited] Player not found."); return;
                }
                handler.CancelLimited(arg0);
                break;
            }

            case 87:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Card not found."); return;
                }
                string arg2 = reader.ReadString();
                handler.CardSwitchTo(arg0, arg1, arg2);
                break;
            }

            case 88:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSetGlobalVariable] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                string arg2 = reader.ReadString();
                handler.PlayerSetGlobalVariable(arg0, arg1, arg2);
                break;
            }

            case 89:
            {
                string arg0 = reader.ReadString();
                string arg1 = reader.ReadString();
                handler.SetGlobalVariable(arg0, arg1);
                break;
            }

            case 91:
            {
                handler.Ping();
                break;
            }

            case 92:
            {
                bool arg0 = reader.ReadBoolean();
                handler.IsTableBackgroundFlipped(arg0);
                break;
            }

            default:
                Debug.WriteLine("[Client Parser] Unknown message (id =" + method + ")");
                break;
            }
            reader.Close();
        }
예제 #27
0
 public void DontTake(ControllableObject obj)
 {
     WriteReplayAction();
     obj.DontTakeError();
 }
예제 #28
0
 public void OmniUpdate(ControllableObject owner, float delta)
 {
 }
예제 #29
0
 public override void OnUse(ControllableObject player, Vector3 pos)
 {
     if (!Network.isClient)
     {
         SpawnEvent e = new SpawnEvent(OmniWorld.tick, gameObject.name,gameObject.name, pos,Vector2.zero, -1, typeof(ControllableObject));
         OmniEvents.AddEvent(e);
     }
 }
예제 #30
0
 public void TakeFrom(ControllableObject obj, Player to)
 {
     obj.TakingControl(to);
 }
예제 #31
0
        public void Parse(byte[] data)
        {
            MemoryStream stream = new MemoryStream(data);
            BinaryReader reader = new BinaryReader(stream);
            short        length;

            Program.Client.Muted = reader.ReadInt32();
            byte method = reader.ReadByte();

            switch (method)
            {
            case 0:
            {
                handler.Binary();
                break;
            }

            case 1:
            {
                string arg0 = reader.ReadString();
                handler.Error(arg0);
                break;
            }

            case 3:
            {
                string arg0 = reader.ReadString();
                handler.Kick(arg0);
                break;
            }

            case 6:
            {
                byte arg0 = reader.ReadByte();
                Guid arg1 = new Guid(reader.ReadBytes(16));
                bool arg2 = reader.ReadBoolean();
                handler.Welcome(arg0, arg1, arg2);
                break;
            }

            case 7:
            {
                bool arg0 = reader.ReadBoolean();
                bool arg1 = reader.ReadBoolean();
                bool arg2 = reader.ReadBoolean();
                handler.Settings(arg0, arg1, arg2);
                break;
            }

            case 8:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSettings] Player not found."); return;
                }
                bool arg1 = reader.ReadBoolean();
                bool arg2 = reader.ReadBoolean();
                handler.PlayerSettings(arg0, arg1, arg2);
                break;
            }

            case 9:
            {
                byte   arg0 = reader.ReadByte();
                string arg1 = reader.ReadString();
                ulong  arg2 = reader.ReadUInt64();
                bool   arg3 = reader.ReadBoolean();
                bool   arg4 = reader.ReadBoolean();
                handler.NewPlayer(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 10:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Leave] Player not found."); return;
                }
                handler.Leave(arg0);
                break;
            }

            case 12:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Nick] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Nick(arg0, arg1);
                break;
            }

            case 13:
            {
                handler.Start();
                break;
            }

            case 15:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Reset] Player not found."); return;
                }
                handler.Reset(arg0);
                break;
            }

            case 16:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[NextTurn] Player not found."); return;
                }
                bool arg1 = reader.ReadBoolean();
                handler.NextTurn(arg0, arg1);
                break;
            }

            case 18:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StopTurn] Player not found."); return;
                }
                handler.StopTurn(arg0);
                break;
            }

            case 20:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Chat] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Chat(arg0, arg1);
                break;
            }

            case 22:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Print] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.Print(arg0, arg1);
                break;
            }

            case 24:
            {
                int arg0 = reader.ReadInt32();
                handler.Random(arg0);
                break;
            }

            case 26:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Counter] Player not found."); return;
                }
                Counter arg1 = Counter.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Counter] Counter not found."); return;
                }
                int  arg2 = reader.ReadInt32();
                bool arg3 = reader.ReadBoolean();
                handler.Counter(arg0, arg1, arg2, arg3);
                break;
            }

            case 27:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                Group[] arg2 = new Group[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = Group.Find(reader.ReadInt32());
                    if (arg2[i] == null)
                    {
                        Debug.WriteLine("[LoadDeck] Group not found.");
                    }
                }
                length = reader.ReadInt16();
                string[] arg3 = new string[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadString();
                }
                string arg4 = reader.ReadString();
                bool   arg5 = reader.ReadBoolean();
                handler.LoadDeck(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 28:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                string[] arg2 = new string[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadString();
                }
                Group arg3 = Group.Find(reader.ReadInt32());
                if (arg3 == null)
                {
                    Debug.WriteLine("[CreateCard] Group not found."); return;
                }
                handler.CreateCard(arg0, arg1, arg2, arg3);
                break;
            }

            case 29:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                int[] arg2 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                int[] arg3 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                bool arg4 = reader.ReadBoolean();
                bool arg5 = reader.ReadBoolean();
                handler.CreateCardAt(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 30:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                handler.CreateAliasDeprecated(arg0, arg1);
                break;
            }

            case 32:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCard] Player not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg1 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[MoveCard] Group not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg3 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                bool[] arg4 = new bool[length];
                for (int i = 0; i < length; ++i)
                {
                    arg4[i] = reader.ReadBoolean();
                }
                bool arg5 = reader.ReadBoolean();
                handler.MoveCard(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 34:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCardAt] Player not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg1 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                int[] arg2 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                int[] arg3 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                int[] arg4 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg4[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                bool[] arg5 = new bool[length];
                for (int i = 0; i < length; ++i)
                {
                    arg5[i] = reader.ReadBoolean();
                }
                bool arg6 = reader.ReadBoolean();
                handler.MoveCardAt(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 36:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Peek] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Peek] Card not found."); return;
                }
                handler.Peek(arg0, arg1);
                break;
            }

            case 38:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Untarget] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Untarget] Card not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                handler.Untarget(arg0, arg1, arg2);
                break;
            }

            case 40:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Target] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Target] Card not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                handler.Target(arg0, arg1, arg2);
                break;
            }

            case 42:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TargetArrow] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                Card arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                bool arg3 = reader.ReadBoolean();
                handler.TargetArrow(arg0, arg1, arg2, arg3);
                break;
            }

            case 43:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Highlight] Card not found."); return;
                }
                string temp1 = reader.ReadString();
                Color? arg1  = temp1 == "" ? (Color?)null : (Color?)ColorConverter.ConvertFromString(temp1);
                handler.Highlight(arg0, arg1);
                break;
            }

            case 45:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Turn] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Turn] Card not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                handler.Turn(arg0, arg1, arg2);
                break;
            }

            case 47:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Rotate] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Rotate] Card not found."); return;
                }
                CardOrientation arg2 = (CardOrientation)reader.ReadByte();
                handler.Rotate(arg0, arg1, arg2);
                break;
            }

            case 48:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[ShuffleDeprecated] Group not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg1 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                handler.ShuffleDeprecated(arg0, arg1);
                break;
            }

            case 49:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Shuffled] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Shuffled] Group not found."); return;
                }
                length = reader.ReadInt16();
                int[] arg2 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                short[] arg3 = new short[length];
                for (int i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt16();
                }
                handler.Shuffled(arg0, arg1, arg2, arg3);
                break;
            }

            case 50:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[UnaliasGrpDeprecated] Group not found."); return;
                }
                handler.UnaliasGrpDeprecated(arg0);
                break;
            }

            case 51:
            {
                length = reader.ReadInt16();
                int[] arg0 = new int[length];
                for (int i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                ulong[] arg1 = new ulong[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                handler.UnaliasDeprecated(arg0, arg1);
                break;
            }

            case 53:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AddMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[AddMarker] Card not found."); return;
                }
                Guid   arg2 = new Guid(reader.ReadBytes(16));
                string arg3 = reader.ReadString();
                ushort arg4 = reader.ReadUInt16();
                ushort arg5 = reader.ReadUInt16();
                bool   arg6 = reader.ReadBoolean();
                handler.AddMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 55:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Card not found."); return;
                }
                Guid   arg2 = new Guid(reader.ReadBytes(16));
                string arg3 = reader.ReadString();
                ushort arg4 = reader.ReadUInt16();
                ushort arg5 = reader.ReadUInt16();
                bool   arg6 = reader.ReadBoolean();
                handler.RemoveMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 57:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TransferMarker] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                Card arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                Guid   arg3 = new Guid(reader.ReadBytes(16));
                string arg4 = reader.ReadString();
                ushort arg5 = reader.ReadUInt16();
                ushort arg6 = reader.ReadUInt16();
                bool   arg7 = reader.ReadBoolean();
                handler.TransferMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
                break;
            }

            case 59:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                ControllableObject arg1 = ControllableObject.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[PassTo] ControllableObject not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                bool arg3 = reader.ReadBoolean();
                handler.PassTo(arg0, arg1, arg2, arg3);
                break;
            }

            case 61:
            {
                ControllableObject arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TakeFrom] ControllableObject not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TakeFrom] Player not found."); return;
                }
                handler.TakeFrom(arg0, arg1);
                break;
            }

            case 63:
            {
                ControllableObject arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[DontTake] ControllableObject not found."); return;
                }
                handler.DontTake(arg0);
                break;
            }

            case 64:
            {
                Group arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[FreezeCardsVisibility] Group not found."); return;
                }
                handler.FreezeCardsVisibility(arg0);
                break;
            }

            case 66:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVis] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVis] Group not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                bool arg3 = reader.ReadBoolean();
                handler.GroupVis(arg0, arg1, arg2, arg3);
                break;
            }

            case 68:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Group not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                handler.GroupVisAdd(arg0, arg1, arg2);
                break;
            }

            case 70:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                Group arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Group not found."); return;
                }
                Player arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                handler.GroupVisRemove(arg0, arg1, arg2);
                break;
            }

            case 72:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAt] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAt] Group not found."); return;
                }
                bool arg3 = reader.ReadBoolean();
                handler.LookAt(arg0, arg1, arg2, arg3);
                break;
            }

            case 74:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtTop] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtTop] Group not found."); return;
                }
                int  arg3 = reader.ReadInt32();
                bool arg4 = reader.ReadBoolean();
                handler.LookAtTop(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 76:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Player not found."); return;
                }
                int   arg1 = reader.ReadInt32();
                Group arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Group not found."); return;
                }
                int  arg3 = reader.ReadInt32();
                bool arg4 = reader.ReadBoolean();
                handler.LookAtBottom(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 78:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StartLimited] Player not found."); return;
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                handler.StartLimited(arg0, arg1);
                break;
            }

            case 80:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CancelLimited] Player not found."); return;
                }
                handler.CancelLimited(arg0);
                break;
            }

            case 81:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Player not found."); return;
                }
                Card arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Card not found."); return;
                }
                string arg2 = reader.ReadString();
                handler.CardSwitchTo(arg0, arg1, arg2);
                break;
            }

            case 82:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSetGlobalVariable] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                string arg2 = reader.ReadString();
                string arg3 = reader.ReadString();
                handler.PlayerSetGlobalVariable(arg0, arg1, arg2, arg3);
                break;
            }

            case 83:
            {
                string arg0 = reader.ReadString();
                string arg1 = reader.ReadString();
                string arg2 = reader.ReadString();
                handler.SetGlobalVariable(arg0, arg1, arg2);
                break;
            }

            case 85:
            {
                handler.Ping();
                break;
            }

            case 86:
            {
                bool arg0 = reader.ReadBoolean();
                handler.IsTableBackgroundFlipped(arg0);
                break;
            }

            case 87:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlaySound] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.PlaySound(arg0, arg1);
                break;
            }

            case 88:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Ready] Player not found."); return;
                }
                handler.Ready(arg0);
                break;
            }

            case 89:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerState] Player not found."); return;
                }
                byte arg1 = reader.ReadByte();
                handler.PlayerState(arg0, arg1);
                break;
            }

            case 90:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RemoteCall] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                string arg2 = reader.ReadString();
                handler.RemoteCall(arg0, arg1, arg2);
                break;
            }

            case 91:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GameStateReq] Player not found."); return;
                }
                handler.GameStateReq(arg0);
                break;
            }

            case 92:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GameState] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.GameState(arg0, arg1);
                break;
            }

            case 93:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[DeleteCard] Card not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[DeleteCard] Player not found."); return;
                }
                handler.DeleteCard(arg0, arg1);
                break;
            }

            case 94:
            {
                Player arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerDisconnect] Player not found."); return;
                }
                handler.PlayerDisconnect(arg0);
                break;
            }

            case 96:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AddPacks] Player not found."); return;
                }
                length = reader.ReadInt16();
                Guid[] arg1 = new Guid[length];
                for (int i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                bool arg2 = reader.ReadBoolean();
                handler.AddPacks(arg0, arg1, arg2);
                break;
            }

            case 97:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AnchorCard] Card not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[AnchorCard] Player not found."); return;
                }
                bool arg2 = reader.ReadBoolean();
                handler.AnchorCard(arg0, arg1, arg2);
                break;
            }

            case 98:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetCardProperty] Card not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[SetCardProperty] Player not found."); return;
                }
                string arg2 = reader.ReadString();
                string arg3 = reader.ReadString();
                string arg4 = reader.ReadString();
                handler.SetCardProperty(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 99:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[ResetCardProperties] Card not found."); return;
                }
                Player arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[ResetCardProperties] Player not found."); return;
                }
                handler.ResetCardProperties(arg0, arg1);
                break;
            }

            case 100:
            {
                Card arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Filter] Card not found."); return;
                }
                string temp1 = reader.ReadString();
                Color? arg1  = temp1 == "" ? (Color?)null : (Color?)ColorConverter.ConvertFromString(temp1);
                handler.Filter(arg0, arg1);
                break;
            }

            case 101:
            {
                string arg0 = reader.ReadString();
                handler.SetBoard(arg0);
                break;
            }

            case 102:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetPlayerColor] Player not found."); return;
                }
                string arg1 = reader.ReadString();
                handler.SetPlayerColor(arg0, arg1);
                break;
            }

            case 103:
            {
                byte arg0 = reader.ReadByte();
                byte arg1 = reader.ReadByte();
                bool arg2 = reader.ReadBoolean();
                handler.SetPhase(arg0, arg1, arg2);
                break;
            }

            case 105:
            {
                Player arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StopPhase] Player not found."); return;
                }
                byte arg1 = reader.ReadByte();
                handler.StopPhase(arg0, arg1);
                break;
            }

            default:
                Debug.WriteLine("[Client Parser] Unknown message (id =" + method + ")");
                break;
            }
            reader.Close();
        }
예제 #32
0
파일: BinaryParser.cs 프로젝트: jaras/OCTGN
        public void Parse(byte[] data)
        {
            var   stream = new MemoryStream(data);
            var   reader = new BinaryReader(stream);
            short length;

            Program.Client.Muted = reader.ReadInt32();
            var method = reader.ReadByte();

            switch (method)
            {
            case 0:
            {
                Log.Debug($"OCTGN IN: Binary");
                handler.Binary();
                break;
            }

            case 1:
            {
                var arg0 = reader.ReadString();
                Log.Debug($"OCTGN IN: Error");
                handler.Error(arg0);
                break;
            }

            case 3:
            {
                var arg0 = reader.ReadString();
                Log.Debug($"OCTGN IN: Kick");
                handler.Kick(arg0);
                break;
            }

            case 6:
            {
                var arg0 = reader.ReadByte();
                var arg1 = new Guid(reader.ReadBytes(16));
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Welcome");
                handler.Welcome(arg0, arg1, arg2);
                break;
            }

            case 7:
            {
                var arg0 = reader.ReadBoolean();
                var arg1 = reader.ReadBoolean();
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Settings");
                handler.Settings(arg0, arg1, arg2);
                break;
            }

            case 8:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSettings] Player not found."); return;
                }
                var arg1 = reader.ReadBoolean();
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: PlayerSettings");
                handler.PlayerSettings(arg0, arg1, arg2);
                break;
            }

            case 9:
            {
                var arg0 = reader.ReadByte();
                var arg1 = reader.ReadString();
                var arg2 = reader.ReadString();
                var arg3 = reader.ReadUInt64();
                var arg4 = reader.ReadBoolean();
                var arg5 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: NewPlayer");
                handler.NewPlayer(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 10:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Leave] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: Leave");
                handler.Leave(arg0);
                break;
            }

            case 12:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Nick] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: Nick");
                handler.Nick(arg0, arg1);
                break;
            }

            case 13:
            {
                Log.Debug($"OCTGN IN: Start");
                handler.Start();
                break;
            }

            case 15:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Reset] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: Reset");
                handler.Reset(arg0);
                break;
            }

            case 16:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[NextTurn] Player not found."); return;
                }
                var arg1 = reader.ReadBoolean();
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: NextTurn");
                handler.NextTurn(arg0, arg1, arg2);
                break;
            }

            case 18:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StopTurn] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: StopTurn");
                handler.StopTurn(arg0);
                break;
            }

            case 20:
            {
                var arg0 = reader.ReadByte();
                length = reader.ReadInt16();
                var arg1 = new Player[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = Player.Find(reader.ReadByte());
                    if (arg1[i] == null)
                    {
                        Debug.WriteLine("[SetPhase] Player not found.");
                    }
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: SetPhase");
                handler.SetPhase(arg0, arg1, arg2);
                break;
            }

            case 22:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetActivePlayer] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: SetActivePlayer");
                handler.SetActivePlayer(arg0);
                break;
            }

            case 23:
            {
                Log.Debug($"OCTGN IN: ClearActivePlayer");
                handler.ClearActivePlayer();
                break;
            }

            case 25:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Chat] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: Chat");
                handler.Chat(arg0, arg1);
                break;
            }

            case 27:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Print] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: Print");
                handler.Print(arg0, arg1);
                break;
            }

            case 29:
            {
                var arg0 = reader.ReadInt32();
                Log.Debug($"OCTGN IN: Random");
                handler.Random(arg0);
                break;
            }

            case 31:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Counter] Player not found."); return;
                }
                var arg1 = Counter.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Counter] Counter not found."); return;
                }
                var arg2 = reader.ReadInt32();
                var arg3 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Counter");
                handler.Counter(arg0, arg1, arg2, arg3);
                break;
            }

            case 32:
            {
                length = reader.ReadInt16();
                var arg0 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg1 = new Guid[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                var arg2 = new Group[length];
                for (var i = 0; i < length; ++i)
                {
                    arg2[i] = Group.Find(reader.ReadInt32());
                    if (arg2[i] == null)
                    {
                        Debug.WriteLine("[LoadDeck] Group not found.");
                    }
                }
                length = reader.ReadInt16();
                var arg3 = new string[length];
                for (var i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadString();
                }
                var arg4 = reader.ReadString();
                var arg5 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: LoadDeck");
                handler.LoadDeck(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 33:
            {
                length = reader.ReadInt16();
                var arg0 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg1 = new Guid[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                var arg2 = new string[length];
                for (var i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadString();
                }
                var arg3 = Group.Find(reader.ReadInt32());
                if (arg3 == null)
                {
                    Debug.WriteLine("[CreateCard] Group not found."); return;
                }
                Log.Debug($"OCTGN IN: CreateCard");
                handler.CreateCard(arg0, arg1, arg2, arg3);
                break;
            }

            case 34:
            {
                length = reader.ReadInt16();
                var arg0 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg1 = new Guid[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                length = reader.ReadInt16();
                var arg2 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg3 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                var arg4 = reader.ReadBoolean();
                var arg5 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: CreateCardAt");
                handler.CreateCardAt(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 35:
            {
                length = reader.ReadInt16();
                var arg0 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg1 = new ulong[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                Log.Debug($"OCTGN IN: CreateAliasDeprecated");
                handler.CreateAliasDeprecated(arg0, arg1);
                break;
            }

            case 37:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCard] Player not found."); return;
                }
                length = reader.ReadInt16();
                var arg1 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                var arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[MoveCard] Group not found."); return;
                }
                length = reader.ReadInt16();
                var arg3 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg4 = new bool[length];
                for (var i = 0; i < length; ++i)
                {
                    arg4[i] = reader.ReadBoolean();
                }
                var arg5 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: MoveCard");
                handler.MoveCard(arg0, arg1, arg2, arg3, arg4, arg5);
                break;
            }

            case 39:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[MoveCardAt] Player not found."); return;
                }
                length = reader.ReadInt16();
                var arg1 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg2 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg3 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg4 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg4[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg5 = new bool[length];
                for (var i = 0; i < length; ++i)
                {
                    arg5[i] = reader.ReadBoolean();
                }
                var arg6 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: MoveCardAt");
                handler.MoveCardAt(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 41:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Peek] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Peek] Card not found."); return;
                }
                Log.Debug($"OCTGN IN: Peek");
                handler.Peek(arg0, arg1);
                break;
            }

            case 43:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Untarget] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Untarget] Card not found."); return;
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Untarget");
                handler.Untarget(arg0, arg1, arg2);
                break;
            }

            case 45:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Target] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Target] Card not found."); return;
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Target");
                handler.Target(arg0, arg1, arg2);
                break;
            }

            case 47:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TargetArrow] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                var arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TargetArrow] Card not found."); return;
                }
                var arg3 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: TargetArrow");
                handler.TargetArrow(arg0, arg1, arg2, arg3);
                break;
            }

            case 48:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Highlight] Card not found."); return;
                }
                var temp1 = reader.ReadString();
                var arg1  = temp1 == "" ? (Color?)null : (Color?)ColorConverter.ConvertFromString(temp1);
                Log.Debug($"OCTGN IN: Highlight");
                handler.Highlight(arg0, arg1);
                break;
            }

            case 50:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Turn] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Turn] Card not found."); return;
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: Turn");
                handler.Turn(arg0, arg1, arg2);
                break;
            }

            case 52:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Rotate] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Rotate] Card not found."); return;
                }
                var arg2 = (CardOrientation)reader.ReadByte();
                Log.Debug($"OCTGN IN: Rotate");
                handler.Rotate(arg0, arg1, arg2);
                break;
            }

            case 53:
            {
                var arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[ShuffleDeprecated] Group not found."); return;
                }
                length = reader.ReadInt16();
                var arg1 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadInt32();
                }
                Log.Debug($"OCTGN IN: ShuffleDeprecated");
                handler.ShuffleDeprecated(arg0, arg1);
                break;
            }

            case 54:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Shuffled] Player not found."); return;
                }
                var arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[Shuffled] Group not found."); return;
                }
                length = reader.ReadInt16();
                var arg2 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg2[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg3 = new short[length];
                for (var i = 0; i < length; ++i)
                {
                    arg3[i] = reader.ReadInt16();
                }
                Log.Debug($"OCTGN IN: Shuffled");
                handler.Shuffled(arg0, arg1, arg2, arg3);
                break;
            }

            case 55:
            {
                var arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[UnaliasGrpDeprecated] Group not found."); return;
                }
                Log.Debug($"OCTGN IN: UnaliasGrpDeprecated");
                handler.UnaliasGrpDeprecated(arg0);
                break;
            }

            case 56:
            {
                length = reader.ReadInt16();
                var arg0 = new int[length];
                for (var i = 0; i < length; ++i)
                {
                    arg0[i] = reader.ReadInt32();
                }
                length = reader.ReadInt16();
                var arg1 = new ulong[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = reader.ReadUInt64();
                }
                Log.Debug($"OCTGN IN: UnaliasDeprecated");
                handler.UnaliasDeprecated(arg0, arg1);
                break;
            }

            case 58:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AddMarker] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[AddMarker] Card not found."); return;
                }
                var arg2 = new Guid(reader.ReadBytes(16));
                var arg3 = reader.ReadString();
                var arg4 = reader.ReadUInt16();
                var arg5 = reader.ReadUInt16();
                var arg6 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: AddMarker");
                handler.AddMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 60:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[RemoveMarker] Card not found."); return;
                }
                var arg2 = new Guid(reader.ReadBytes(16));
                var arg3 = reader.ReadString();
                var arg4 = reader.ReadUInt16();
                var arg5 = reader.ReadUInt16();
                var arg6 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: RemoveMarker");
                handler.RemoveMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                break;
            }

            case 62:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TransferMarker] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                var arg2 = Card.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[TransferMarker] Card not found."); return;
                }
                var arg3 = new Guid(reader.ReadBytes(16));
                var arg4 = reader.ReadString();
                var arg5 = reader.ReadUInt16();
                var arg6 = reader.ReadUInt16();
                var arg7 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: TransferMarker");
                handler.TransferMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
                break;
            }

            case 64:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                var arg1 = ControllableObject.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[PassTo] ControllableObject not found."); return;
                }
                var arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[PassTo] Player not found."); return;
                }
                var arg3 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: PassTo");
                handler.PassTo(arg0, arg1, arg2, arg3);
                break;
            }

            case 66:
            {
                var arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[TakeFrom] ControllableObject not found."); return;
                }
                var arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[TakeFrom] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: TakeFrom");
                handler.TakeFrom(arg0, arg1);
                break;
            }

            case 68:
            {
                var arg0 = ControllableObject.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[DontTake] ControllableObject not found."); return;
                }
                Log.Debug($"OCTGN IN: DontTake");
                handler.DontTake(arg0);
                break;
            }

            case 69:
            {
                var arg0 = Group.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[FreezeCardsVisibility] Group not found."); return;
                }
                Log.Debug($"OCTGN IN: FreezeCardsVisibility");
                handler.FreezeCardsVisibility(arg0);
                break;
            }

            case 71:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVis] Player not found."); return;
                }
                var arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVis] Group not found."); return;
                }
                var arg2 = reader.ReadBoolean();
                var arg3 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: GroupVis");
                handler.GroupVis(arg0, arg1, arg2, arg3);
                break;
            }

            case 73:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                var arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Group not found."); return;
                }
                var arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisAdd] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: GroupVisAdd");
                handler.GroupVisAdd(arg0, arg1, arg2);
                break;
            }

            case 75:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                var arg1 = Group.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Group not found."); return;
                }
                var arg2 = Player.Find(reader.ReadByte());
                if (arg2 == null)
                {
                    Debug.WriteLine("[GroupVisRemove] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: GroupVisRemove");
                handler.GroupVisRemove(arg0, arg1, arg2);
                break;
            }

            case 77:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAt] Player not found."); return;
                }
                var arg1 = reader.ReadInt32();
                var arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAt] Group not found."); return;
                }
                var arg3 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: LookAt");
                handler.LookAt(arg0, arg1, arg2, arg3);
                break;
            }

            case 79:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtTop] Player not found."); return;
                }
                var arg1 = reader.ReadInt32();
                var arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtTop] Group not found."); return;
                }
                var arg3 = reader.ReadInt32();
                var arg4 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: LookAtTop");
                handler.LookAtTop(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 81:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Player not found."); return;
                }
                var arg1 = reader.ReadInt32();
                var arg2 = Group.Find(reader.ReadInt32());
                if (arg2 == null)
                {
                    Debug.WriteLine("[LookAtBottom] Group not found."); return;
                }
                var arg3 = reader.ReadInt32();
                var arg4 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: LookAtBottom");
                handler.LookAtBottom(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 83:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[StartLimited] Player not found."); return;
                }
                length = reader.ReadInt16();
                var arg1 = new Guid[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                Log.Debug($"OCTGN IN: StartLimited");
                handler.StartLimited(arg0, arg1);
                break;
            }

            case 85:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CancelLimited] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: CancelLimited");
                handler.CancelLimited(arg0);
                break;
            }

            case 86:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Player not found."); return;
                }
                var arg1 = Card.Find(reader.ReadInt32());
                if (arg1 == null)
                {
                    Debug.WriteLine("[CardSwitchTo] Card not found."); return;
                }
                var arg2 = reader.ReadString();
                Log.Debug($"OCTGN IN: CardSwitchTo");
                handler.CardSwitchTo(arg0, arg1, arg2);
                break;
            }

            case 87:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerSetGlobalVariable] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                var arg2 = reader.ReadString();
                var arg3 = reader.ReadString();
                Log.Debug($"OCTGN IN: PlayerSetGlobalVariable");
                handler.PlayerSetGlobalVariable(arg0, arg1, arg2, arg3);
                break;
            }

            case 88:
            {
                var arg0 = reader.ReadString();
                var arg1 = reader.ReadString();
                var arg2 = reader.ReadString();
                Log.Debug($"OCTGN IN: SetGlobalVariable");
                handler.SetGlobalVariable(arg0, arg1, arg2);
                break;
            }

            case 90:
            {
                handler.Ping();
                break;
            }

            case 91:
            {
                var arg0 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: IsTableBackgroundFlipped");
                handler.IsTableBackgroundFlipped(arg0);
                break;
            }

            case 92:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlaySound] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: PlaySound");
                handler.PlaySound(arg0, arg1);
                break;
            }

            case 93:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Ready] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: Ready");
                handler.Ready(arg0);
                break;
            }

            case 94:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerState] Player not found."); return;
                }
                var arg1 = reader.ReadByte();
                Log.Debug($"OCTGN IN: PlayerState");
                handler.PlayerState(arg0, arg1);
                break;
            }

            case 95:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[RemoteCall] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                var arg2 = reader.ReadString();
                Log.Debug($"OCTGN IN: RemoteCall");
                handler.RemoteCall(arg0, arg1, arg2);
                break;
            }

            case 96:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GameStateReq] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: GameStateReq");
                handler.GameStateReq(arg0);
                break;
            }

            case 97:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[GameState] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: GameState");
                handler.GameState(arg0, arg1);
                break;
            }

            case 98:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[DeleteCard] Card not found."); return;
                }
                var arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[DeleteCard] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: DeleteCard");
                handler.DeleteCard(arg0, arg1);
                break;
            }

            case 99:
            {
                var arg0 = Player.FindIncludingSpectators(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[PlayerDisconnect] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: PlayerDisconnect");
                handler.PlayerDisconnect(arg0);
                break;
            }

            case 101:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AddPacks] Player not found."); return;
                }
                length = reader.ReadInt16();
                var arg1 = new Guid[length];
                for (var i = 0; i < length; ++i)
                {
                    arg1[i] = new Guid(reader.ReadBytes(16));
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: AddPacks");
                handler.AddPacks(arg0, arg1, arg2);
                break;
            }

            case 102:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[AnchorCard] Card not found."); return;
                }
                var arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[AnchorCard] Player not found."); return;
                }
                var arg2 = reader.ReadBoolean();
                Log.Debug($"OCTGN IN: AnchorCard");
                handler.AnchorCard(arg0, arg1, arg2);
                break;
            }

            case 103:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetCardProperty] Card not found."); return;
                }
                var arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[SetCardProperty] Player not found."); return;
                }
                var arg2 = reader.ReadString();
                var arg3 = reader.ReadString();
                var arg4 = reader.ReadString();
                Log.Debug($"OCTGN IN: SetCardProperty");
                handler.SetCardProperty(arg0, arg1, arg2, arg3, arg4);
                break;
            }

            case 104:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[ResetCardProperties] Card not found."); return;
                }
                var arg1 = Player.Find(reader.ReadByte());
                if (arg1 == null)
                {
                    Debug.WriteLine("[ResetCardProperties] Player not found."); return;
                }
                Log.Debug($"OCTGN IN: ResetCardProperties");
                handler.ResetCardProperties(arg0, arg1);
                break;
            }

            case 105:
            {
                var arg0 = Card.Find(reader.ReadInt32());
                if (arg0 == null)
                {
                    Debug.WriteLine("[Filter] Card not found."); return;
                }
                var temp1 = reader.ReadString();
                var arg1  = temp1 == "" ? (Color?)null : (Color?)ColorConverter.ConvertFromString(temp1);
                Log.Debug($"OCTGN IN: Filter");
                handler.Filter(arg0, arg1);
                break;
            }

            case 106:
            {
                var arg0 = reader.ReadString();
                Log.Debug($"OCTGN IN: SetBoard");
                handler.SetBoard(arg0);
                break;
            }

            case 107:
            {
                var arg0 = Player.Find(reader.ReadByte());
                if (arg0 == null)
                {
                    Debug.WriteLine("[SetPlayerColor] Player not found."); return;
                }
                var arg1 = reader.ReadString();
                Log.Debug($"OCTGN IN: SetPlayerColor");
                handler.SetPlayerColor(arg0, arg1);
                break;
            }

            default:
                Debug.WriteLine("[Client Parser] Unknown message (id =" + method + ")");
                break;
            }
            reader.Close();
        }
예제 #33
0
 public void TakeFrom(ControllableObject obj, Player to)
 {
     WriteReplayAction(to.Id);
     obj.TakingControl(to);
 }
예제 #34
0
 public void AssignPlayer(GameObject player)
 {
     _player       = player.GetComponent <ControllableObject>();
     _canTakeInput = true;
     _limitedTime  = true;
 }
예제 #35
0
 protected virtual void Awake()
 {
     _controller     = GameObject.FindGameObjectWithTag("Player").GetComponent <ControllableObject>();
     _collisionState = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCollisionState>();
 }
예제 #36
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="player"></param>
 /// <param name="inputList"></param>
 public void AddPlayer(ControllableObject player, SOInputList inputList)
 {
     _players.Add(new Player(player, inputList));
 }
예제 #37
0
 public override void OnUse(ControllableObject player, Vector3 pos)
 {
     SpawnEvent e = new SpawnEvent(OmniWorld.tick, this.name, player.Name + "'s " + this.name, pos, Vector2.zero, -1, typeof(VehicleObject));
     OmniEvents.AddEvent(e);
     base.OnUse(player, pos);
 }
예제 #38
0
 public void DontTake(ControllableObject obj)
 {
     obj.DontTakeError();
 }
예제 #39
0
 //Constructor
 public Player(ControllableObject player, SOInputList soInputList)
 {
     controllableObject = player;
     inputList          = soInputList;
 }