Esempio n. 1
0
        public override void Serialize(IDataWriter writer)
        {
            writer.WriteShort(((short)(m_cells.Count)));
            int cellsIndex;

            for (cellsIndex = 0; (cellsIndex < m_cells.Count); cellsIndex = (cellsIndex + 1))
            {
                GameActionMarkedCell objectToSend = m_cells[cellsIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteDouble(m_markAuthorId);
            writer.WriteByte(m_markTeamId);
            writer.WriteInt(m_markSpellId);
            writer.WriteShort(m_markSpellLevel);
            writer.WriteShort(m_markId);
            writer.WriteByte(m_markType);
            writer.WriteShort(m_markimpactCell);
            writer.WriteBoolean(m_active);
        }
Esempio n. 2
0
        public override void Deserialize(IDataReader reader)
        {
            int cellsCount = reader.ReadUShort();
            int cellsIndex;

            m_cells = new System.Collections.Generic.List <GameActionMarkedCell>();
            for (cellsIndex = 0; (cellsIndex < cellsCount); cellsIndex = (cellsIndex + 1))
            {
                GameActionMarkedCell objectToAdd = new GameActionMarkedCell();
                objectToAdd.Deserialize(reader);
                m_cells.Add(objectToAdd);
            }
            m_markAuthorId   = reader.ReadDouble();
            m_markTeamId     = reader.ReadByte();
            m_markSpellId    = reader.ReadInt();
            m_markSpellLevel = reader.ReadShort();
            m_markId         = reader.ReadShort();
            m_markType       = reader.ReadByte();
            m_markimpactCell = reader.ReadShort();
            m_active         = reader.ReadBoolean();
        }