public override CVariable SetValue(object val)
        {
            this.Value = val switch
            {
                ulong o => o,
                string s => ulong.Parse(s),
                CUInt64 v => v.Value,
                _ => this.Value
            };

            return(this);
        }
 public CookedLootData(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Key = new CUInt64(cr2w, this, nameof(Key))
     {
         IsSerialized = true
     };
     LootTableIds = new CArrayVLQInt32 <TweakDBID>(cr2w, this, nameof(LootTableIds))
     {
         IsSerialized = true
     };
     ContentAssignment = new TweakDBID(cr2w, this, nameof(ContentAssignment))
     {
         IsSerialized = true
     };
 }
示例#3
0
 public TweakDBID(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Id = new CUInt64(cr2w, this, nameof(Id));
 }
示例#4
0
 public LocalizationString(IRed4EngineFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Unk1  = new CUInt64(cr2w, this, nameof(Unk1));
     Value = new CString(cr2w, this, nameof(Value));
 }