Example #1
0
        public static void ProcessPacket(WorldClient Client, string Packet)
        {
            switch (Packet[1])
            {
            case 'W':
                ConquestHandler.ProcessConquestGepositionRequest(Client, Packet);
                break;

            case 'I':
                ConquestHandler.ProcessConquestDefenseRequest(Client, Packet);
                break;

            case 'B':
                float porc  = AreaSubTable.getWorldBalance(Client.Character.Alignement);
                float porcN = (float)Math.Round((double)Client.Character.Level / 2.5F + 1.0D);
                Client.Send(new ConquestBonusMessage(porc + "," + porc + "," + porc + ";" + porcN + "," + porcN + "," + porcN + ";" + porc + "," + porc + "," + porc));
                break;

            case 'b':
                Client.Send(new ConquestBalanceMessage(AreaSubTable.getWorldBalance(Client.Character.Alignement) + ";" + AreaTable.getAreaBalance(Client.Character.myMap.subArea.area, Client.Character.Alignement)));
                break;

            case 'F':
                ConquestHandler.ProcessConquestJoinDefenseRequest(Client, Packet);
                break;
            }
        }
Example #2
0
        public static void ProcessPacket(WorldClient Client, string Packet)
        {
            switch (Packet[0])
            {
            case 'A':
                switch (Packet[1])
                {
                case 'B':
                    CharacterHandler.ProcessBoostStatsRequest(Client, Packet);
                    break;
                }
                break;

            case 'B':
                BasicHandler.ProcessPacket(Client, Packet);
                break;

            case 'c':
                ConsoleHandler.ProcessPacket(Client, Packet);
                break;

            case 'C':
                ConquestHandler.ProcessPacket(Client, Packet);
                break;

            case 'D':
                DialogHandler.ProcessPacket(Client, Packet);
                break;

            case 'E':
                ExchangeHandler.ProcessPacket(Client, Packet);
                break;

            case 'e':
                EnvironmentHandler.ProcessPacket(Client, Packet);
                break;

            case 'f':
                switch (Packet[1])
                {
                case 'D':
                    FightHandler.ProcessFightDetailsRequest(Client, Packet);
                    break;

                case 'L':
                    Client.Send(new FightListMessage(Client.GetCharacter().myMap.GetFights()));
                    break;

                case 'N':
                case 'S':
                case 'P':
                case 'H':
                    FightHandler.ProcessToggleLockRequest(Client, Packet);
                    break;
                }
                break;

            case 'F':
                FriendHandler.ProcessPacket(Client, Packet);
                break;

            case 'G':
                GameActionHandler.ProcessPacket(Client, Packet);
                break;

            case 'g':
                GuildHandler.ProcessPacket(Client, Packet);
                break;

            case 'i':
                EnnemyHandler.ProcessPacket(Client, Packet);
                break;

            case 'P':
                PartyHandler.ProcessPacket(Client, Packet);
                break;

            case 'R':
                MountParkHandler.ProcessPacket(Client, Packet);
                break;

            case 'S':
                SpellHandler.ProcessPacket(Client, Packet);
                break;

            case 'O':
                ObjectHandler.ProcessPacket(Client, Packet);
                break;

            case 'W':
                WayPointHandler.ProcessPacket(Client, Packet);
                break;
            }

            if (Packet.Length > 3 && Packet.Substring(0, 4).Equals("ping"))
            {
                Client.Send(new PingPacket(false));
                return;
            }
            if (Packet.Length > 4 && Packet.Substring(0, 5).Equals("qping"))
            {
                Client.Send(new PingPacket(true));
                return;
            }
        }