public override void WriteBinary(ESPWriter writer) { if (Header != null) { Header.WriteBinary(writer); } if (EffectData != null) { EffectData.WriteBinary(writer); } if (Conditions != null) { foreach (var item in Conditions) { item.WriteBinary(writer); } } if (EntryPointFunctionType != null) { EntryPointFunctionType.WriteBinary(writer); } if (EntryPointFunctionData != null) { EntryPointFunctionData.WriteBinary(writer); } if (ButtonLabel != null) { ButtonLabel.WriteBinary(writer); } if (RunImmediately != null) { RunImmediately.WriteBinary(writer); } if (Script != null) { Script.WriteBinary(writer); } if (EndMarker != null) { EndMarker.WriteBinary(writer); } }