public override void Serialize(IDataWriter writer) { m_mainCreatureLightInfos.Serialize(writer); writer.WriteShort(((short)(m_underlings.Count))); int underlingsIndex; for (underlingsIndex = 0; (underlingsIndex < m_underlings.Count); underlingsIndex = (underlingsIndex + 1)) { MonsterInGroupInformations objectToSend = m_underlings[underlingsIndex]; objectToSend.Serialize(writer); } }
public override void Deserialize(IDataReader reader) { m_mainCreatureLightInfos = new MonsterInGroupLightInformations(); m_mainCreatureLightInfos.Deserialize(reader); int underlingsCount = reader.ReadUShort(); int underlingsIndex; m_underlings = new System.Collections.Generic.List <MonsterInGroupInformations>(); for (underlingsIndex = 0; (underlingsIndex < underlingsCount); underlingsIndex = (underlingsIndex + 1)) { MonsterInGroupInformations objectToAdd = new MonsterInGroupInformations(); objectToAdd.Deserialize(reader); m_underlings.Add(objectToAdd); } }