public static void Handle(Entities.GameClient client, DataPacket packet)
 {
     using (var arenaplayers = new ArenaPlayersPacket(Data.ArenaQualifier.GetTop10()))
     {
         client.Send(arenaplayers);
     }
 }
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            /*using (var watch = new ArenaWatchPacket(packet))
            {
                Entities.GameClient Fighter;
                if (Core.Kernel.Clients.TrySelect(watch.EntityUID, out Fighter))
                {
                    if (Fighter.Battle == null)
                        return;
                    if (!(Fighter.Battle is Data.ArenaMatch))
                        return;
                    Data.ArenaMatch Match = Fighter.Battle as Data.ArenaMatch;

                    switch (watch.Type)
                    {
                        case 0:
                            {
                                Match.JoinAsWatcher(client);
                                //client.Send(packet);
                                break;
                            }
                        case 1:
                            {
                                Match.LeaveWatcher(client);
                                break;
                            }
                    }
                }
            }*/
        }
        public static void Handle(Entities.GameClient client, DataPacket inPacket)
        {
            if (client.Trade.Trading)
                return;
            if (!client.Alive)
                return;

            using (var npcrequest = new NPCRequestPacket(inPacket))
            {
                try
                {
                    if (npcrequest.Option == 255)
                    {
                        client.CurrentNPC = null;
                        return;
                    }

                    if (Core.Kernel.Shops.ContainsKey(npcrequest.NPCID))
                    {
                        if (!Core.Kernel.Shops[npcrequest.NPCID].AssociatedNPC.IsInMap(client))
                        {
                            return;
                        }

                        Packets.GeneralDataPacket pack = new Packets.GeneralDataPacket();
                        pack.Action = Enums.DataAction.OpenUpgrade;
                        pack.Id = client.EntityUID;
                        pack.Data1 = 32;
                        pack.Data3Low = client.X;
                        pack.Data3High = client.Y;
                        pack.Timestamp = npcrequest.NPCID;
                        client.Send(pack);
                    }
                    else
                    {
                        Entities.NPC npc = Core.Kernel.NPCs[npcrequest.NPCID];
                        if (!npc.IsInMap(client))
                        {
                            return;
                        }

                        if (Core.Screen.GetDistance(client.X, client.Y, npc.X, npc.Y) >= Core.NumericConst.MaxNPCDistance && npc.NPCType != Enums.NPCType.Distance)
                        {
                            using (var fmsg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.TOO_FAR_NPC))
                                client.Send(fmsg);
                            return;
                        }
                        client.CurrentNPC = npc;

                        client.CurrentNPC.CallDialog(client, npcrequest.Option);
                    }
                }
                catch
                {
                    using (var fmsg = Packets.Message.MessageCore.CreateSystem(client.Name, string.Format("NPCID: {0}", npcrequest.NPCID)))
                        client.Send(fmsg);
                }
            }
        }
 public NPCResponsePacket(DataPacket inPacket)
     : base(inPacket)
 {
     string[] stringdata = StringPacker.Analyze(this, 12);
     if (stringdata.Length > 0)
         InputData = stringdata[0];
     else
         InputData = string.Empty;
 }
Esempio n. 5
0
 public MessagePacket(DataPacket inPacket)
     : base(inPacket)
 {
     string[] strings = StringPacker.Analyze(inPacket, 24);
     From = strings[0];
     To = strings[1];
     Unknown = strings[2];
     Message = strings[3];
 }
Esempio n. 6
0
 /// <summary>
 /// Creates a new instance of StringPacker.
 /// </summary>
 /// <param name="strings">The strings to add.</param>
 public StringPacker(params string[] strings)
 {
     int totallength = strings.Length + 1;
     foreach (string str in strings)
         totallength += str.Length;
     stringPacket = new DataPacket(new byte[totallength]);
     stringPacket.WriteByte((byte)strings.Length, 0);
     int nextoffset = 1;
     foreach (string str in strings)
     {
         stringPacket.WriteStringWithLength(str, nextoffset, out nextoffset);
     }
 }
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            if (client.Guild == null)
                return;

            using (var donation = new GuildDonationPacket())
            {
                donation.DonationFlag = Enums.GuildDonationFlags.AllDonations;
                donation.Money = client.GuildMemberInfo.MoneyDonation;
                donation.CPs = client.GuildMemberInfo.CPDonation;
                client.Send(donation);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Analyzes a stringpacker within a packet.
        /// </summary>
        /// <param name="Packet">The packet.</param>
        /// <param name="offset">The offset.</param>
        /// <returns>Returns the strings.</returns>
        public static string[] Analyze(DataPacket Packet, int offset)
        {
            int count = Packet.ReadByte(offset);
            offset++;
            string[] strings = new string[count];

            for (int i = 0; i < count; i++)
            {
                strings[i] = Packet.ReadStringFromLength(offset, out offset);
            }

            return strings;
        }
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            using (var warehouse = new WarehousePacket(packet))
            {
                Data.Warehouse wh;
                if (client.Warehouses.TryGetValue((ushort)warehouse.WarehouseID, out wh))
                {
                    switch (warehouse.Action)
                    {
                        case Enums.WarehouseAction.Display:
                            {
                                wh.SendAll();
                                break;
                            }
                        case Enums.WarehouseAction.Add:
                            {
                                if (wh.FreeSpaces == 20)
                                    return;

                                if (client.Inventory.ContainsByUID(warehouse.Identifier))
                                {
                                    Data.ItemInfo item = client.Inventory.RemoveItemByUID(warehouse.Identifier);
                                    if (item != null)
                                    {
                                        wh.AddItem(item);
                                    }
                                }
                                break;
                            }
                        case Enums.WarehouseAction.Remove:
                            {
                                if (client.Inventory.FreeSpaces == 40)
                                    return;

                                if (wh.ContainsByUID(warehouse.Identifier))
                                {
                                    Data.ItemInfo item = wh.RemoveItemByUID(warehouse.Identifier);
                                    if (item != null)
                                    {
                                        client.Inventory.AddItem(item);
                                        //warehouse.WhType = 10;
                                        client.Send(warehouse);
                                    }
                                }
                                break;
                            }
                    }
                }
            }
        }
Esempio n. 10
0
 public static void Handle(Entities.GameClient client, DataPacket packet)
 {
     using (var subclass = new SubClassPacket(packet))
     {
         switch (subclass.Action)
         {
             case Enums.SubClassActions.Info:
                 {
                     //client.SendSubClasses2();
                     break;
                 }
         }
     }
 }
Esempio n. 11
0
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            using (var strings = new StringPacket(packet))
            {
                switch (strings.Action)
                {
                    case Enums.StringAction.WhisperWindowInfo:
                        Packets.Strings.WhisperWindowInfo.Handle(client, strings);
                        break;
                    case Enums.StringAction.QueryMate:
                        Packets.Strings.QueryMate.Handle(client, strings);
                        break;

                    default:
                        Console.WriteLine("Unknown StringPacket {0} from {1}", strings.Action, client.Name);
                        break;
                }
            }
        }
Esempio n. 12
0
 public static void Handle(Entities.GameClient client, DataPacket packet)
 {
     Console.WriteLine("TYPE: {0}", packet.ReadByte(4));
     if (packet.ReadByte(4) > 2)
     {
         string[] Strings = StringPacker.Analyze(packet, 12);
         if (Strings != null)
         {
             if (Strings.Length > 0)
             {
                 if (client.CPs >= 5)
                 {
                     client.CPs -= 5;
                     Threads.BroadcastThread.AddBroadcast(Packets.Message.MessageCore.CreateBroadcast(client.Name, Strings[0]));
                 }
             }
         }
     }
 }
Esempio n. 13
0
        /// <summary>
        /// Handling all packets received.
        /// </summary>
        /// <param name="socketClient">The socket client.</param>
        /// <param name="Packet">The packet.</param>
        public static bool Handle_Receive(SocketClient socketClient, DataPacket Packet)
        {
            try
            {
                Client.AuthClient client = socketClient.Owner as Client.AuthClient;

                switch (Packet.PacketID)
                {
                    case Packets.PacketType.AuthRequestPacket1:
                    case Packets.PacketType.AuthRequestPacket2:
                        Packets.AuthRequestPacket.Handle(client, Packet);
                        break;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            return true;
        }
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            if (client.Guild == null)
                return;

            using (var info = new GuildMemberListPacket(packet))
            {
                Data.GuildMember[] members = client.Guild.SelectFromIndex(info.StartIndex);
                using (var sinfo = new GuildMemberListPacket(members.Length))
                {
                    foreach (Data.GuildMember member in members)
                        sinfo.AddInfo(GuildMemberInfo.Create(member));
                    int offset = 16;
                    foreach (GuildMemberInfo minfo in sinfo.MemberList)
                    {
                        minfo.Append(sinfo, offset, out offset);
                    }
                    client.Send(sinfo);
                }
            }
        }
Esempio n. 15
0
 public StringPacket(DataPacket inPacket)
     : base(inPacket)
 {
     Strings = StringPacker.Analyze(inPacket, 9);
 }
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            using (var composition = new CompositionPacket(packet))
            {
                if (!client.Inventory.ContainsByUID(composition.MainItem))
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_NOT_FOUND))
                        client.Send(msg);
                    return;
                }
                if (!client.Inventory.ContainsByUID(composition.MinorItem))
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_NOT_FOUND))
                        client.Send(msg);
                    return;
                }
                Data.ItemInfo MainItem = client.Inventory.GetItemByUID(composition.MainItem);
                if (MainItem.IsGarment() || MainItem.IsArrow() || MainItem.IsBottle() || MainItem.IsMisc() || MainItem.IsMountArmor())
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_INVALID_UPGRADE))
                        client.Send(msg);
                    return;
                }

                if (MainItem.CurrentDura < MainItem.MaxDura)
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_LOW_DURA))
                        client.Send(msg);
                    return;
                }
                Data.ItemInfo MinorItem = client.Inventory.GetItemByUID(composition.MinorItem);
                if (MainItem.Plus >= Core.NumericConst.MaxPlus)
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_MAX_PLUS))
                        client.Send(msg);
                    return;
                }
                if (MinorItem.Plus == 0)
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_NO_PLUS))
                        client.Send(msg);
                    return;
                }

                if (MinorItem.Plus < MainItem.Plus)
                {
                    using (var msg = Packets.Message.MessageCore.CreateSystem(client.Name, Core.MessageConst.ITEM_LOW_PLUS))
                        client.Send(msg);
                    return;
                }

                //ushort[] CompositionPoints = new ushort[12] { 20, 20, 80, 240, 720, 2160, 6480, 19440, 58320, 2700, 5500, 9000 };

                //ushort AddPoints = (CompositionPoints[MainItem.Plus] / 2);

                switch (composition.CompositionType)
                {
                    case Enums.CompositionType.SteedComposition:
                        {
                            int color1 = (int)MainItem.SocketAndRGB;
                            int color2 = (int)MinorItem.SocketAndRGB;
                            int B1 = color1 & 0xFF;
                            int B2 = color2 & 0xFF;
                            int G1 = (color1 >> 8) & 0xFF;
                            int G2 = (color2 >> 8) & 0xFF;
                            int R1 = (color1 >> 16) & 0xFF;
                            int R2 = (color2 >> 16) & 0xFF;
                            int newB = (int)Math.Floor(0.9 * B1) + (int)Math.Floor(0.1 * B2);
                            int newG = (int)Math.Floor(0.9 * G1) + (int)Math.Floor(0.1 * G2);
                            int newR = (int)Math.Floor(0.9 * R1) + (int)Math.Floor(0.1 * R2);
                            uint NewColor = (uint)(newB | (newG << 8) | (newR << 16));
                            if (NewColor == MainItem.SocketAndRGB)
                                return;

                            MainItem.SocketAndRGB = NewColor;

                            goto case Enums.CompositionType.BonusCompositionA;
                        }
                    case Enums.CompositionType.BonusCompositionA:
                    case Enums.CompositionType.BonusCompositionB:
                        {
                            //uint CompositionPoints = Calculations.BasicCalculations.CompositionPoints(MinorItem.Plus);
                            client.Inventory.RemoveItemByUID(MinorItem.UID);

                            if (MainItem.Composition > 0)
                            {
                                MainItem.Plus++;
                                MainItem.Composition = 0;
                            }
                            else
                            {
                                MainItem.Composition = 1;
                            }

                            Database.CharacterDatabase.SaveInventory(client, MainItem, client.Inventory.GetPositionFromItemUID(MainItem.UID));
                            MainItem.SendPacket(client, 3);
                            break;
                        }
                }
            }
        }
 public CompositionPacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
Esempio n. 18
0
 /// <summary>
 /// Empty method for the buffer events.
 /// </summary>
 /// <param name="sClient">The socket client.</param>
 /// <param name="packet">The data packet.</param>
 /// <returns>Returns true always.</returns>
 static bool empty_buff(SocketClient sClient, DataPacket packet)
 {
     return true;
 }
 public GuildMemberListPacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
 public ArenaActionPacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
 public void Append(DataPacket buffer, int offset, out int nextoffset)
 {
     nextoffset = offset;
     buffer.WriteString(Name, offset);
     buffer.WriteUInt32(Unknown16, offset + 16);
     buffer.WriteUInt32(Unknown20, offset + 20);
     buffer.WriteUInt32(Level, offset + 24);
     buffer.WriteUInt16((ushort)Rank, offset + 28);
     buffer.WriteUInt16(Unknown30, offset + 30);
     buffer.WriteUInt32(Unknown32, offset + 32);
     buffer.WriteInt32(Donation, offset + 36);
     buffer.WriteBool(IsOnline, offset + 40);
     buffer.WriteUInt32(Unknown44, offset + 44);
     nextoffset += 48;
 }
Esempio n. 22
0
 public ArenaWatchPacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
 public static void Handle(Entities.GameClient client, DataPacket packet)
 {
     using (var stats = new CharacterStatsPacket(packet))
     {
         if (stats.EntityUID != client.EntityUID)
         {
             Entities.GameClient viewclient;
             if (Core.Kernel.Clients.TrySelect(stats.EntityUID, out viewclient))
                 client.Send(viewclient.CreateStatsPacket());
         }
         else
             client.Send(client.CreateStatsPacket());
     }
 }
Esempio n. 24
0
        /// <summary>
        /// Sends a packet to the client.
        /// </summary>
        /// <param name="Packet">The packet to send.</param>
        public void Send(DataPacket Packet)
        {
            if (IsAIBot)
                return;

            // TODO: rewrite the sockets to actually handle this proper ...
            if (Packet.ReadString(Packet.BufferLength - 8, 8) == "TQClient") // this is actually never used, not removing it though just to be sure
            {
                using (var sendPacket = new DataPacket(Packet))
                {
                    sendPacket.WriteBytes(Packet.Copy(), 0);
                    sendPacket.WriteString("TQServer", sendPacket.BufferLength - 8);
                    NetworkClient.Send(sendPacket);
                }
            }
            else
            {
                using (var sendPacket = new DataPacket(new byte[Packet.BufferLength + 8]))
                {
                    sendPacket.WriteBytes(Packet.Copy(), 0);
                    sendPacket.WriteString("TQServer", sendPacket.BufferLength - 8);
                    NetworkClient.Send(sendPacket);
                }
            }
        }
 public CharacterStatsPacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
Esempio n. 26
0
        /// <summary>
        /// Handles the message packet.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="packet">The packet.</param>
        public static void Handle(Entities.GameClient client, DataPacket packet)
        {
            using (var message = new MessagePacket(packet))
            {
                if (message.Message.StartsWith("/") && !message.Message.StartsWith("//")  || message.Message.StartsWith("@") && !message.Message.StartsWith("@@"))
                {
                    Packets.Message.Commands.Handle(client, message.Message, message.Message.Split(' '));
                }
                else
                {
                    if (message.ChatType != Enums.ChatType.Team && !client.Alive &&
                        message.ChatType != Enums.ChatType.Ghost)
                        return;

                    if (message.From != client.Name)
                    {
                        client.NetworkClient.Disconnect("INVALID_CHAT_NAME");
                        return;
                    }

                    switch (message.ChatType)
                    {
                            #region Whisper
                        case Enums.ChatType.Whisper:
                            {
                                if (message.To == client.Name)
                                    return;

                                Entities.GameClient toclient;
                                if (Core.Kernel.Clients.TrySelect(message.To, out toclient))
                                {
                                    message.FromMesh = client.Mesh;
                                    message.ToMesh = toclient.Mesh;
                                    toclient.Send(message);
                                }
                                else
                                {
                                    if (Database.CharacterDatabase.CharacterExists(message.To))//(System.IO.File.Exists(Database.ServerDatabase.DatabaseLocation + "\\UsedNames\\" + message.To + ".nm"))
                                    {
                                        using (var fmsg = Packets.Message.MessageCore.CreateSystem(
                                            client.Name, string.Format(Core.MessageConst.PLAYER_OFFLINE_WHISPER, message.To)))
                                            client.Send(fmsg);

                                        ProjectX_V3_Lib.IO.IniFile whisper = new ProjectX_V3_Lib.IO.IniFile(
                                            Database.ServerDatabase.DatabaseLocation + "\\MessageQuery\\" + message.To + ".ini",
                                            "Whisper");
                                        int count = whisper.ReadInt32("Count", 0);
                                        count++;
                                        whisper.Write<int>("Count", count);
                                        whisper.SetSection(count.ToString());
                                        whisper.WriteString("From", client.Name);
                                        whisper.WriteString("Message", message.Message);
                                        whisper.Write<uint>("Mesh", client.Mesh);
                                    }
                                    else
                                    {
                                        using (var fmsg = Packets.Message.MessageCore.CreateSystem(
                                            client.Name, string.Format(Core.MessageConst.PLAYER_OFFLINE_WHISPER2, message.To)))
                                            client.Send(fmsg);
                                    }
                                }
                                break;
                            }
                            #endregion
                            #region Talk + Ghost
                        case Enums.ChatType.Talk:
                        case Enums.ChatType.Ghost:
                            {
                                client.SendToScreen(message, false, message.ChatType == Enums.ChatType.Ghost);
                                break;
                            }
                            #endregion
                            #region World
                        case Enums.ChatType.World:
                            {
                                if (client.Level < 70)
                                {
                                    using (var fmsg = Packets.Message.MessageCore.CreateSystem(
                                        client.Name, Core.MessageConst.WORLD_CHAT_NO_PERMISSION))
                                        client.Send(fmsg);
                                    return;
                                }
                                int required = 60000;
                                if (client.Level >= 100)
                                    required = 45000;
                                if (client.Level >= 110)
                                    required = 30000;
                                if (client.Level >= 120)
                                    required = 15000;
                                if (DateTime.Now >= client.WorldChatSend.AddMilliseconds(required))
                                {
                                    client.WorldChatSend = DateTime.Now;
                                    foreach (Entities.GameClient sclient in Core.Kernel.Clients.selectorCollection1.Values)
                                    {
                                        if (sclient.EntityUID != client.EntityUID)
                                            sclient.Send(message);
                                    }
                                }
                                else
                                {
                                    using (var fmsg = Packets.Message.MessageCore.CreateSystem(
                                        client.Name, string.Format(Core.MessageConst.WORLD_CHAT_WAIT, required)))
                                        client.Send(fmsg);
                                }
                                break;
                            }
                            #endregion
                            #region Guild
                        case Enums.ChatType.Guild:
                            {
                                if (client.Guild != null)
                                {
                                    client.Guild.BroadcastMessage(message);
                                }
                                break;
                            }
                            #endregion
                            #region Hawk
                        case Enums.ChatType.HawkMessage:
                            {
                                if (client.Booth == null)
                                    return;
                                client.Booth.HawkMessage = message.Message;
                                break;
                            }
                            #endregion
                            #region Team
                        case Enums.ChatType.Team:
                            {
                                if (client.TournamentTeam != null)
                                {
                                    foreach (Entities.GameClient teamMember in client.TournamentTeam.TeamMembers.ToDictionary().Values)
                                    {
                                        teamMember.Send(message);
                                    }
                                }
                                else if (client.Team != null)
                                {
                                    foreach (Entities.GameClient teamMember in client.Team.Members.Values)
                                    {
                                        teamMember.Send(message);
                                    }
                                }
                                break;
                            }
                            #endregion
                    }
                }
            }
        }
Esempio n. 27
0
        /// <summary>
        /// Handles all packets received by the game auth server.
        /// </summary>
        /// <param name="client">The socket client.</param>
        /// <param name="Packet">The packet.</param>
        /// <returns>ALWAYS returns false.</returns>
        private static bool HandlePacket(SocketClient client, DataPacket Packet)
        {
            if (Packet.PacketID == 9001)
            {
                if (Packet.ReadString(4, 16) == Program.Config.ReadString("ServerPassword"))
                {
                    string Account = Packet.ReadString(20, 16);
                    int DatabaseUID = Packet.ReadInt32(36);
                    if (DatabaseUID == 0)
                        return false;
                    uint EntityUID = Packet.ReadUInt32(40);
                    if (EntityUID == 0)
                        return false;

                    if (Core.Kernel.Clients.Contains(EntityUID))
                    {
                        UIDCollection.TryRemove(EntityUID);
                        return false;
                    }

                    if (UIDCollection.Contains(EntityUID))
                    {
                        int secondkey;
                        if (UIDCollection.TryGetSecondKey(EntityUID, out secondkey))
                        {
                            if (DatabaseUID == secondkey)
                                UIDCollection.TryRemove(EntityUID);
                        }
                        return false;
                    }

                    if (UIDCollection.Contains(DatabaseUID))
                    {
                        uint firstkey;
                        if (UIDCollection.TryGetFirstKey(DatabaseUID, out firstkey))
                        {
                            UIDCollection.TryRemove(DatabaseUID);
                        }
                    }

                    UIDCollection.TryAdd(EntityUID, DatabaseUID, DateTime.Now.AddMinutes(10));
                    //	return false;
                }
            }
            return false;
        }
Esempio n. 28
0
 public WarehousePacket(DataPacket inPacket)
     : base(inPacket)
 {
 }
Esempio n. 29
0
        /// <summary>
        /// Sends a packet to all nearby clients.
        /// </summary>
        /// <param name="Packet">The packet to send.</param>
        /// <param name="sendtoself">True if send to itself.</param>
        public void SendToScreen(DataPacket Packet, bool sendtoself, bool deadonly = false)
        {
            if (sendtoself && !IsAIBot)
                Send(Packet);

            // send to screen
            Screen.UpdateScreen(Packet, deadonly); // Update will send a packet if there is any packets attached to it
        }
 public static void Handle(Entities.GameClient client, DataPacket packet)
 {
     using (var action = new ArenaActionPacket(packet))
     {
         switch (action.DialogID)
         {
             case 0:
                 {
                     Data.ArenaQualifier.JoinArena(client);
                     client.Send(action);
                     break;
                 }
             case 1:
                 {
                     Data.ArenaQualifier.QuitWaitArena(client);
                     client.Send(action);
                     break;
                 }
             case 3:
                 {
                     if (action.OptionID == 1)
                     {
                         Data.ArenaQualifier.AcceptArena(client);
                     }
                     else if (action.OptionID == 2)
                     {
                         Data.ArenaQualifier.GiveUpArena(client);
                     }
                     break;
                 }
             case 4:
                 {
                     Data.ArenaQualifier.QuitArena(client);
                     break;
                 }
             case 10:
             case 11:
                 {
                     if (action.OptionID == 0)
                     {
                         Data.ArenaQualifier.JoinArena(client);
                     }
                     break;
                 }
             default:
                 Console.WriteLine("ARENA PACKET: {0} FROM {1}", action.DialogID, client.Name);
                 break;
         }
     }
 }