Exemplo n.º 1
0
        public override void Serialize(IDataWriter writer)
        {
            writer.WriteShort(((short)(m_spellCooldowns.Count)));
            int spellCooldownsIndex;

            for (spellCooldownsIndex = 0; (spellCooldownsIndex < m_spellCooldowns.Count); spellCooldownsIndex = (spellCooldownsIndex + 1))
            {
                GameFightSpellCooldown objectToSend = m_spellCooldowns[spellCooldownsIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteDouble(m_slaveId);
            writer.WriteByte(m_summonCount);
            writer.WriteByte(m_bombCount);
        }
Exemplo n.º 2
0
        public override void Deserialize(IDataReader reader)
        {
            int spellCooldownsCount = reader.ReadUShort();
            int spellCooldownsIndex;

            m_spellCooldowns = new System.Collections.Generic.List <GameFightSpellCooldown>();
            for (spellCooldownsIndex = 0; (spellCooldownsIndex < spellCooldownsCount); spellCooldownsIndex = (spellCooldownsIndex + 1))
            {
                GameFightSpellCooldown objectToAdd = new GameFightSpellCooldown();
                objectToAdd.Deserialize(reader);
                m_spellCooldowns.Add(objectToAdd);
            }
            m_slaveId     = reader.ReadDouble();
            m_summonCount = reader.ReadByte();
            m_bombCount   = reader.ReadByte();
        }