public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (Caches == null) { Caches = new PartyMemberDataCache[Count]; for (int xb = 0; xb < Count; xb++) { Caches[xb] = new PartyMemberDataCache(); } } io.WriteInt16((short)Caches.Length); for (int i = 0; i < Count; i++) { Caches[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public DA3PartyMemberDataCache Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Count = io.ReadInt16(); Caches = new PartyMemberDataCache[Count]; for (int i = 0; i < Count; i++) { Caches[i] = new PartyMemberDataCache().Read(io); } return(this); }