Example #1
0
        private void SendToReplayRecorder(CoreMessage msg)
        {
            byte[]       buffer = msg.CreateBuffer();
            BinaryWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);
            Game.SendToReplayRecorder(packet);
        }
Example #2
0
        private void SendToAll(CoreMessage msg)
        {
            byte[]           buffer = msg.CreateBuffer();
            GamePacketWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);
            Game.SendToAll(packet);
        }
Example #3
0
        private void SendToAll(CoreMessage msg)
        {
            byte[]           buffer = msg.CreateBuffer();
            GameServerPacket packet = new GameServerPacket(msg.Message);

            packet.Write(buffer);
            Game.SendToAll(packet);
        }
Example #4
0
        private void SendToPlayer(CoreMessage msg, int player)
        {
            if (player != 0 && player != 1)
            {
                return;
            }
            byte[]           buffer = msg.CreateBuffer();
            GamePacketWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);
            Game.CurPlayers[player].Send(packet);
        }
Example #5
0
        private void SendToTeam(CoreMessage msg, int player)
        {
            if (player != 0 && player != 1)
            {
                return;
            }
            byte[]       buffer = msg.CreateBuffer();
            BinaryWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);
            Game.SendToTeam(packet, player);
        }
Example #6
0
        private void SendToPlayer(CoreMessage msg, int player)
        {
            if (player != 0 && player != 1)
            {
                return;
            }
            byte[]           buffer = msg.CreateBuffer();
            GameServerPacket packet = new GameServerPacket(msg.Message);

            packet.Write(buffer);
            Game.CurPlayers[player].Send(packet);
        }
Example #7
0
        private void OnHint(CoreMessage msg)
        {
            int type   = msg.Reader.ReadByte();
            int player = msg.Reader.ReadByte();

            msg.Reader.ReadInt32();

            byte[]       buffer = msg.CreateBuffer();
            BinaryWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);

            switch (type)
            {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                Game.CurPlayers[player].Send(packet);
                break;

            case 6:
            case 7:
            case 8:
            case 9:
                Game.SendToAllBut(packet, player);
                break;

            case 10:
                if (Game.IsTag)
                {
                    Game.CurPlayers[player].Send(packet);
                }
                else
                {
                    Game.SendToAll(packet);
                }
                break;

            case 11:
            case 12:
            case 13:
                Game.SendToAll(packet);
                break;
            }
        }
Example #8
0
        private void OnConfirmCards(CoreMessage msg)
        {
            int player = msg.Reader.ReadByte();
            int count  = msg.Reader.ReadByte();

            msg.Reader.ReadBytes(count * 7);

            byte[]           buffer = msg.CreateBuffer();
            GamePacketWriter packet = GamePacketFactory.Create(msg.Message);

            packet.Write(buffer);
            if ((CardLocation)buffer[7] == CardLocation.Hand)
            {
                Game.SendToAll(packet);
            }
            else
            {
                Game.CurPlayers[player].Send(packet);
            }
        }
Example #9
0
 private void SendToPlayer(CoreMessage msg, int player)
 {
     if (player != 0 && player != 1)
         return;
     byte[] buffer = msg.CreateBuffer();
     GameServerPacket packet = new GameServerPacket(msg.Message);
     packet.Write(buffer);
     Game.CurPlayers[player].Send(packet);
 }
Example #10
0
 private void SendToAll(CoreMessage msg)
 {
     byte[] buffer = msg.CreateBuffer();
     GameServerPacket packet = new GameServerPacket(msg.Message);
     packet.Write(buffer);
     Game.SendToAll(packet);
 }
Example #11
0
        private void OnConfirmCards(CoreMessage msg)
        {
            int player = msg.Reader.ReadByte();
            int count = msg.Reader.ReadByte();
            msg.Reader.ReadBytes(count * 7);

            byte[] buffer = msg.CreateBuffer();
            GameServerPacket packet = new GameServerPacket(msg.Message);
            packet.Write(buffer);
            if ((CardLocation)buffer[7] == CardLocation.Hand)
                Game.SendToAll(packet);
            else
                Game.CurPlayers[player].Send(packet);
        }
Example #12
0
        private void OnHint(CoreMessage msg)
        {
            int type = msg.Reader.ReadByte();
            int player = msg.Reader.ReadByte();
            msg.Reader.ReadInt32();

            byte[] buffer = msg.CreateBuffer();
            GameServerPacket packet = new GameServerPacket(msg.Message);
            packet.Write(buffer);

            switch (type)
            {
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    Game.CurPlayers[player].Send(packet);
                    break;
                case 6:
                case 7:
                case 8:
                case 9:
                    Game.SendToAllBut(packet, player);
                    break;
                case 10:
                    if (Game.IsTag)
                        Game.CurPlayers[player].Send(packet);
                    else
                        Game.SendToAll(packet);
                    break;
            }
        }
Example #13
0
 private void SendToPlayer(CoreMessage msg, int player)
 {
     if (player != 0 && player != 1)
         return;
     byte[] buffer = msg.CreateBuffer();
     BinaryWriter packet = GamePacketFactory.Create(msg.Message);
     packet.Write(buffer);
     Game.CurPlayers[player].Send(packet);
 }
Example #14
0
 private void SendToAll(CoreMessage msg)
 {
     byte[] buffer = msg.CreateBuffer();
     BinaryWriter packet = GamePacketFactory.Create(msg.Message);
     packet.Write(buffer);
     Game.SendToAll(packet);
 }