public HousingData(HousingData _src) { this.Unlock = _src.Unlock.ToDictionary <KeyValuePair <int, Dictionary <int, bool> >, int, Dictionary <int, bool> >((Func <KeyValuePair <int, Dictionary <int, bool> >, int>)(x => x.Key), (Func <KeyValuePair <int, Dictionary <int, bool> >, Dictionary <int, bool> >)(x => { Dictionary <int, bool> source = x.Value; return(source == null ? (Dictionary <int, bool>)null : source.ToDictionary <KeyValuePair <int, bool>, int, bool>((Func <KeyValuePair <int, bool>, int>)(y => y.Key), (Func <KeyValuePair <int, bool>, bool>)(y => y.Value))); })); this.CraftInfos = _src.CraftInfos.ToDictionary <KeyValuePair <int, CraftInfo>, int, CraftInfo>((Func <KeyValuePair <int, CraftInfo>, int>)(x => x.Key), (Func <KeyValuePair <int, CraftInfo>, CraftInfo>)(x => x.Value != null ? new CraftInfo(x.Value, true) : (CraftInfo)null)); }
public void CopyInstances(HousingData _src) { if (!Singleton <Manager.Housing> .IsInstance()) { return; } foreach (KeyValuePair <int, CraftInfo> craftInfo1 in _src.CraftInfos) { CraftInfo craftInfo2 = this.CraftInfos[craftInfo1.Key]; for (int index = 0; index < craftInfo1.Value.ObjectInfos.Count; ++index) { IObjectInfo objectInfo1 = craftInfo1.Value.ObjectInfos[index]; IObjectInfo objectInfo2 = craftInfo2.ObjectInfos[index]; ObjectCtrl _srcCtrl; if (craftInfo1.Value.ObjectCtrls.TryGetValue(objectInfo1, out _srcCtrl)) { craftInfo2.ObjectCtrls[objectInfo2] = this.CopyObjectCtrl(objectInfo2, objectInfo1, _srcCtrl, (ObjectCtrl)null, craftInfo2, craftInfo1.Value); } } craftInfo2.ObjRoot = craftInfo1.Value.ObjRoot; } }