Exemple #1
0
 public void Copy(MerchantData _data)
 {
     this.CharaFileName      = _data.CharaFileName;
     this.ChunkID            = _data.ChunkID;
     this.AreaID             = _data.AreaID;
     this.ActionTargetID     = _data.ActionTargetID;
     this.Unlock             = _data.Unlock;
     this.ModeType           = _data.ModeType;
     this.LastNormalModeType = _data.LastNormalModeType;
     this.StateType          = _data.StateType;
     this.Position           = _data.Position;
     this.Rotation           = _data.Rotation;
     this.ItemList           = _data.ItemList.Select <StuffItem, StuffItem>((Func <StuffItem, StuffItem>)(x => new StuffItem(x))).ToList <StuffItem>();
     if (_data.CurrentSchedule != null)
     {
         this.CurrentSchedule = new MerchantActor.MerchantSchedule(_data.CurrentSchedule);
     }
     if (_data.PrevSchedule != null)
     {
         this.PrevSchedule = new MerchantActor.MerchantSchedule(_data.PrevSchedule);
     }
     this.ScheduleList   = _data.ScheduleList.Select <MerchantActor.MerchantSchedule, MerchantActor.MerchantSchedule>((Func <MerchantActor.MerchantSchedule, MerchantActor.MerchantSchedule>)(x => new MerchantActor.MerchantSchedule(x))).ToList <MerchantActor.MerchantSchedule>();
     this.PointID        = _data.PointID;
     this.PointAreaID    = _data.PointAreaID;
     this.PointGroupID   = _data.PointGroupID;
     this.vendorItemList = _data.vendorItemList.Select <MerchantData.VendorItem, MerchantData.VendorItem>((Func <MerchantData.VendorItem, MerchantData.VendorItem>)(x => new MerchantData.VendorItem(x))).ToList <MerchantData.VendorItem>();
     if (_data.vendorSpItemTable != null)
     {
         this.vendorSpItemTable = _data.vendorSpItemTable.ToDictionary <KeyValuePair <int, MerchantData.VendorItem>, int, MerchantData.VendorItem>((Func <KeyValuePair <int, MerchantData.VendorItem>, int>)(v => v.Key), (Func <KeyValuePair <int, MerchantData.VendorItem>, MerchantData.VendorItem>)(v => new MerchantData.VendorItem(v.Value)));
     }
     else if (_data.vendorSpItemList != null)
     {
         // ISSUE: object of a compiler-generated type is created
         this.vendorSpItemTable = _data.vendorSpItemList.Select <MerchantData.VendorItem, \u003C\u003E__AnonType11 <int, MerchantData.VendorItem> >((Func <MerchantData.VendorItem, int, \u003C\u003E__AnonType11 <int, MerchantData.VendorItem> >)((Value, Key) => new \u003C\u003E__AnonType11 <int, MerchantData.VendorItem>(Key, Value))).ToDictionary <\u003C\u003E__AnonType11 <int, MerchantData.VendorItem>, int, MerchantData.VendorItem>((Func <\u003C\u003E__AnonType11 <int, MerchantData.VendorItem>, int>)(v => v.Key), (Func <\u003C\u003E__AnonType11 <int, MerchantData.VendorItem>, MerchantData.VendorItem>)(v => new MerchantData.VendorItem(v.Value)));
     }
     this.OpenAreaID        = _data.OpenAreaID;
     this.isThereafterH     = _data.isThereafterH;
     this.Wetness           = _data.Wetness;
     this.MapID             = _data.MapID;
     this.PointPosition     = _data.PointPosition;
     this.ElapsedDay        = _data.ElapsedDay;
     this.MainPointPosition = _data.MainPointPosition;
 }
Exemple #2
0
 public MerchantData(MerchantData _data)
 {
     this.Copy(_data);
 }
Exemple #3
0
 public void ResetVendor(
     IReadOnlyDictionary <int, List <VendItemInfo> > vendTable)
 {
     VendItemInfo[] array = vendTable.get_Keys().SelectMany <int, VendItemInfo>((Func <int, IEnumerable <VendItemInfo> >)(i => (IEnumerable <VendItemInfo>)MerchantData.GetSaleChoice((IReadOnlyCollection <VendItemInfo>)vendTable.get_Item(i), 2))).ToArray <VendItemInfo>();
     this.vendorItemList.Clear();
     this.vendorItemList.AddRange(((IEnumerable <VendItemInfo>)array).Select <VendItemInfo, MerchantData.VendorItem>((Func <VendItemInfo, MerchantData.VendorItem>)(p =>
     {
         int num = p.Stocks.Length != 1 ? Enumerable.Range(p.Stocks[0], p.Stocks[1] - p.Stocks[0]).Shuffle <int>().First <int>() : p.Stocks[0];
         return(new MerchantData.VendorItem(p.CategoryID, p.ID, num, p.Rate, num));
     })));
     Debug.Log((object)"ショップアイテム更新");
 }