Example #1
0
        public static void HandleLoadedCashInv(TownContext context, PacketReader packet)
        {
            if (context.Client.OpeningMail == true)
            {
                context.Client.session.SendPacket(PacketFactory.ChangePlayerState(0x10));
                context.Client.session.SendPacket(PacketFactory.OpenMailbox());
            }

            if (context.Client.OpeningGoldPouches == true)
            {
                context.Client.GoldPouchOpenThread = new Thread(new ThreadStart(context.OpenGoldPouches));

                if (context.Client.GoldPouchOpenThread.ThreadState == ThreadState.Running)
                {
                    return;
                }
                else
                {
                    context.Client.GoldPouchOpenThread.Start();
                }
            }
        }
Example #2
0
        public static void HandleChannelList(LoginContext context, PacketReader packet)
        {
            Random rnd   = new Random();
            int    skips = rnd.Next(1, 6);
            int    count = 0;

            Console.WriteLine("Got channel List");

            packet.Skip(6);

            bool found = false;

            while (found == false)
            {
                int chid = packet.ReadInt();

                packet.Skip(2);

                int mapid = packet.ReadInt();

                //if (mapid != 40 && mapid != 23)
                // {
                if (count == skips)
                {
                    found = true;
                    context.Send(PacketFactory.SelectChannel(chid));
                    Console.WriteLine("Entering channel: {0}", chid);
                }
                //}

                Console.WriteLine("channel: {0} map: {1}", chid, mapid);
                packet.Skip(112);

                Console.WriteLine("Count: {0}", count);
                count++;
            }
        }
Example #3
0
 public static void HandleWorldList(LoginContext context, PacketReader packet)
 {
     Console.WriteLine("World List");
     //todo: parse world list
     context.Send(PacketFactory.SelectWorld(1)); //Reef
 }
Example #4
0
 public static void HandleLoginRespose(LoginContext context, PacketReader packet)
 {
     Console.WriteLine("Login Response");
     context.Send(PacketFactory.RequestWorldList());
 }
Example #5
0
 public static void HandleEnterPortal(TownContext context, PacketReader packet)
 {
     Console.WriteLine("Entering portal..");
     context.Send(PacketFactory.SendStartStage(0xFF, 0));
 }
Example #6
0
 public static void HandleEnterMap(TownContext context, PacketReader packet)
 {
     Console.WriteLine("Entering Map...");
     context.Send(PacketFactory.enterMap());
 }