コード例 #1
0
        /// <summary>
        /// Generates the unit server login information from packet
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public static UnitLogin RecvUnitLogin(Packet p)
        {
            p.Skip(2);
            string account = p.ReadString();
            int hash = p.ReadShort();
            int map = p.ReadShort();
            int channel = p.ReadByte();
            p.Skip(6);
            int characterID = p.ReadInt();

            UnitLogin u = new UnitLogin()
            {
                Account = account,
                AccountID = hash,
                Channel = channel,
                CharacterID = characterID
            };

            return u;
        }
コード例 #2
0
        public static Character RecvCreateCharacter(Packet p)
        {
            p.Skip(2);
            byte cClass = p.ReadByte();
            string name = p.ReadString();

            Character c = new Character()
            {
                Class = cClass,
                Name = name
            };

            return c;
        }
コード例 #3
0
        /// <summary>
        /// Handle Game Login packet from client
        /// </summary>
        /// <param name="p"></param>
        /// <param name="c"></param>
        public static GameLogin RecvGameLogin(Packet p)
        {
            p.Skip(2);
            string account = p.ReadString();
            string hash = p.ReadString();
            int version = p.ReadShort();

            GameLogin g = new GameLogin
            {
                AccountName = account,
                HashCode = hash,
                Version = version
            };

            return g;
        }
コード例 #4
0
        public static RenamePetInfo RecvRenamePet(Packet p)
        {
            p.Skip(2);
            int mapid = p.ReadInt();
            int petid = p.ReadInt();
            string newname = p.ReadString();

            RenamePetInfo i = new RenamePetInfo
            {
                MapID = mapid,
                PetID = petid,
                NewName = newname
            };

            return i;
        }
コード例 #5
0
        public static ChatMessageInfo RecvChatMessage(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            int targetId = p.ReadInt();
            string message = p.ReadString();
            string targetName = p.ReadString(); // if you dont have id

            ChatMessageInfo cmi = new ChatMessageInfo
            {
                Type = (ChatType)type,
                TargetID = targetId,
                Message = message,
                TargetName = targetName
            };

            return cmi;
        }
コード例 #6
0
        public static GuildChatInfo RecvGuildChat(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            string message = p.ReadString();

            GuildChatInfo i = new GuildChatInfo
            {
                Type = type,
                Message = message
            };

            return i;
        }
コード例 #7
0
        public static CreateGuildInfo RecvCreateGuild(Packet p)
        {
            p.Skip(2);
            string GuildName = p.ReadString();

            CreateGuildInfo i = new CreateGuildInfo
            {
                GuildName = GuildName
            };

            return i;
        }
コード例 #8
0
        public static ChangeShopInfo RecvChangeShopInfo(Packet p)
        {
            p.Skip(2);
            string name = p.ReadString();
            string desc = p.ReadString();

            ChangeShopInfo i = new ChangeShopInfo
            {
                Name = name,
                Description = desc
            };

            return i;
        }
コード例 #9
0
        public static RequestGuildChangeNoticeInfo RecvRequestChangeGuildNotice(Packet p)
        {
            p.Skip(2);
            string newNotice = p.ReadString();

            RequestGuildChangeNoticeInfo i = new RequestGuildChangeNoticeInfo
            {
                NewNotice = newNotice
            };

            return i;
        }
コード例 #10
0
        public static RequestGuildMemberChangeTitleInfo RecvRequestChangeGuildMemberTitle(Packet p)
        {
            p.Skip(2);
            int guildID = p.ReadInt();
            int memberID = p.ReadInt();
            string newTitle = p.ReadString();

            RequestGuildMemberChangeTitleInfo i = new RequestGuildMemberChangeTitleInfo
            {
                GuildID = guildID,
                MemberID = memberID,
                NewTitle = newTitle
            };

            return i;
        }