Example #1
0
        public FarmRecord(int farm_id)
        {
            Id = Guid.NewGuid();

            FarmId = farm_id;
            WeaponHitRecords = new WeaponHitRecord[0];
            RandomTreasures = new TreasureRecord[0];
        }
Example #2
0
        private void _SaveTreasureHistory(FarmRecord fish_hit_records)
        {
            var list = fish_hit_records.RandomTreasures.ToList();

            foreach(var treasure in _Visitor.GetAllTreasures())
            {
                var d = list.FirstOrDefault(x => x.WeaponType == treasure);
                if(d == null)
                {
                    d = new TreasureRecord(treasure);
                    list.Add(d);
                }

                d.Count++;
            }

            fish_hit_records.RandomTreasures = list.ToArray();
        }
Example #3
0
 public FarmRecord()
 {
     Id = Guid.NewGuid();
     WeaponHitRecords = new WeaponHitRecord[0];
     RandomTreasures = new TreasureRecord[0];
 }