Пример #1
0
        public static void ProcessPacket(WorldClient Client, string Packet)
        {
            switch (Packet[1])
            {
            case 'U':
                WayPointHandler.WayPointUseRequest(Client, Packet);
                break;

            case 'u':
                WayPointHandler.WayPointUseZaapiRequest(Client, Packet);
                break;

            case 'V':
                WayPointHandler.WayPointQuitRequest(Client, Packet);
                break;

            case 'p':
                WayPointHandler.PrismeUseRequest(Client, Packet);
                break;

            case 'v':
                WayPointHandler.ZaapiQuitRequest(Client, Packet);
                break;
            }
        }
Пример #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;
            }
        }