Esempio n. 1
0
        public override void Serialize(IDataWriter writer)
        {
            base.Serialize(writer);
            writer.WriteShort(((short)(m_options.Count)));
            int optionsIndex;

            for (optionsIndex = 0; (optionsIndex < m_options.Count); optionsIndex = (optionsIndex + 1))
            {
                HumanOption objectToSend = m_options[optionsIndex];
                writer.WriteUShort(((ushort)(objectToSend.TypeID)));
                objectToSend.Serialize(writer);
            }
            writer.WriteByte(m_sellType);
        }
Esempio n. 2
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            int optionsCount = reader.ReadUShort();
            int optionsIndex;

            m_options = new System.Collections.Generic.List <HumanOption>();
            for (optionsIndex = 0; (optionsIndex < optionsCount); optionsIndex = (optionsIndex + 1))
            {
                HumanOption objectToAdd = ProtocolTypeManager.GetInstance <HumanOption>(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_options.Add(objectToAdd);
            }
            m_sellType = reader.ReadByte();
        }
Esempio n. 3
0
        public override void Deserialize(IDataReader reader)
        {
            m_restrictions = new ActorRestrictionsInformations();
            m_restrictions.Deserialize(reader);
            m_sex = reader.ReadBoolean();
            int optionsCount = reader.ReadUShort();
            int optionsIndex;

            m_options = new System.Collections.Generic.List <HumanOption>();
            for (optionsIndex = 0; (optionsIndex < optionsCount); optionsIndex = (optionsIndex + 1))
            {
                HumanOption objectToAdd = ProtocolTypeManager.GetInstance <HumanOption>(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_options.Add(objectToAdd);
            }
        }