public override void Decode(ByteStream stream) { this.m_presetId = stream.ReadInt(); for (int i = 0, size = stream.ReadInt(); i < size; i++) { LogicDataSlot slot = new LogicDataSlot(null, 0); slot.Decode(stream); this.m_slots.Add(slot); } base.Decode(stream); }
public override void Decode(ByteStream stream) { base.Decode(stream); for (int i = 0, size = stream.ReadInt(); i < size; i++) { LogicDataSlot slot = new LogicDataSlot(null, 0); slot.Decode(stream); if (slot.GetData() != null) { this.m_unitCount.Add(slot); } else { slot.Destruct(); slot = null; Debugger.Error("LogicSaveUsedArmyCommand::decode - troop data is NULL"); } } for (int i = 0, size = stream.ReadInt(); i < size; i++) { LogicDataSlot slot = new LogicDataSlot(null, 0); slot.Decode(stream); if (slot.GetData() != null) { this.m_spellCount.Add(slot); } else { slot.Destruct(); slot = null; Debugger.Error("LogicSaveUsedArmyCommand::decode - spell data is NULL"); } } }