public virtual void Serialize <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s) where TDoc : class where TCursor : class { s.StreamAttributeEnumOpt("flags", ref Flags, flags => flags != 0, true); s.StreamAttributeOptNoneOption("nameIndex", ref NameIndex); SerializeWeaponsAndEquipment(s); s.StreamAttributeOpt("grenadeCount", ref InitialGrenadeCount, Predicates.IsNotZero); }