Example #1
0
        /// <summary>
        /// Serialize the quest diary.
        /// </summary>
        /// <param name="packet">Packet stream.</param>
        public void Serialize(INetPacketStream packet)
        {
            packet.Write((byte)ActiveQuests.Count());
            foreach (QuestInfo quest in ActiveQuests)
            {
                quest.Serialize(packet);
            }

            packet.Write((byte)CompletedQuests.Count());
            foreach (QuestInfo quest in CompletedQuests)
            {
                packet.Write((short)quest.QuestId);
            }

            packet.Write((byte)CheckedQuests.Count());
            foreach (QuestInfo quest in CheckedQuests)
            {
                packet.Write((short)quest.QuestId);
            }
        }