예제 #1
0
        public void Handle(MaplePacketLib.PacketReader packet)
        {
            byte result = packet.ReadByte();

            if (result != 0)
            {
                Logger.Write(LogLevel.Error, "Unable to login: {0}", result);
            }
            else
            {
                Logger.Write(LogLevel.Info, "Login successful");

                var p = new MaplePacketLib.PacketWriter((short)SendOps.CHARLIST_REQUEST, 9);
                p.WriteByte(2);
                p.WriteByte(0); //scania
                p.WriteByte(0); //channel
                p.WriteInt(System.Environment.TickCount); //hwid?

                MainGame.Instance.Socket.Send(p);
            }
        }
예제 #2
0
        public void Handle(MaplePacketLib.PacketReader packet)
        {
            packet.Skip(1);
            byte chars = packet.ReadByte();

            if (chars == 0)
            {
                Logger.Write(LogLevel.Warning, "No characters on account");
                return;
            }

            int charId = packet.ReadInt();

            var p = new MaplePacketLib.PacketWriter((short)SendOps.CHAR_SELECT_WITH_PIC);
            p.WriteMapleString("000000");
            p.WriteInt(charId);
            p.WriteMapleString("nope");
            p.WriteMapleString("nope");

            MainGame.Instance.Socket.Send(p);
        }