public QuestKousyou(Mst_slotitem_remodel_detail menuData, Mem_slotitem afterSlotItem, bool success) : this() { this.type = QuestKousyou.KousyouKind.RemodelSlot; this.remodelDetail = menuData; this.remodelAfterSlot = afterSlotItem; this.successFlag = success; }
public Api_Result <SlotSetChkResult_Slot> SlotSet(int ship_rid, int slot_rid) { Api_Result <SlotSetChkResult_Slot> api_Result = new Api_Result <SlotSetChkResult_Slot>(); SlotSetChkResult_Slot slotSetChkResult_Slot = IsValidSlotSet(ship_rid, slot_rid); if (slotSetChkResult_Slot != 0) { api_Result.state = Api_Result_State.Parameter_Error; api_Result.data = slotSetChkResult_Slot; return(api_Result); } Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship[ship_rid]; Mem_slotitem value = null; Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, out value); Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship); Mem_slotitem value2 = null; Comm_UserDatas.Instance.User_slot.TryGetValue(mem_ship.Exslot, out value2); mem_shipBase.Exslot = slot_rid; value2?.UnEquip(); if (slot_rid != -1) { value.Equip(ship_rid); } mem_ship.Set_ShipParam(mem_shipBase, Mst_DataManager.Instance.Mst_ship[mem_shipBase.Ship_id], enemy_flag: false); return(api_Result); }
public SlotSetChkResult_Slot IsValidSlotSet(int ship_rid, int slot_rid) { if (IsValidSlotSet(ship_rid) != 0) { return(SlotSetChkResult_Slot.NgInvalid); } Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship[ship_rid]; if (!mem_ship.IsOpenExSlot()) { return(SlotSetChkResult_Slot.NgInvalid); } Mem_slotitem value = null; if (slot_rid != -1) { Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, out value); if (value == null) { return(SlotSetChkResult_Slot.NgInvalid); } if (value.Equip_flag == Mem_slotitem.enumEquipSts.Equip) { return(SlotSetChkResult_Slot.NgInvalid); } } else if (slot_rid == -1) { return(SlotSetChkResult_Slot.Ok); } return(SlotSetChkResult_Slot.Ok); }
public Api_Result <Hashtable> Unslot_all(int ship_rid) { Api_Result <Hashtable> result = new Api_Result <Hashtable>(); Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship[ship_rid]; Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship); for (int i = 0; i < mem_shipBase.Slot.Count(); i++) { Mem_slotitem value = null; int num = mem_shipBase.Slot[i]; mem_shipBase.Slot[i] = -1; if (num > 0 && Comm_UserDatas.Instance.User_slot.TryGetValue(num, out value)) { Mst_slotitem_cost value2 = null; if (Mst_DataManager.Instance.Mst_slotitem_cost.TryGetValue(value.Slotitem_id, out value2)) { int addNum = value2.GetAddNum(mem_shipBase.Onslot[i]); Comm_UserDatas.Instance.User_material[enumMaterialCategory.Bauxite].Add_Material(addNum); } value.UnEquip(); } } mem_ship.Set_ShipParam(mem_shipBase, Mst_DataManager.Instance.Mst_ship[mem_shipBase.Ship_id], enemy_flag: false); mem_ship.TrimSlot(); return(result); }
private int findModelChangeEnableSlotPos(List <int> slot_rids, int mst_id, bool maxFlag) { int result = -1; for (int i = 0; i < slot_rids.get_Count(); i++) { int num = slot_rids.get_Item(i); if (num > 0) { Mem_slotitem mem_slotitem = Comm_UserDatas.Instance.User_slot.get_Item(num); if (mem_slotitem.Slotitem_id == mst_id) { if (!maxFlag || mem_slotitem.IsMaxSkillLevel()) { if (!mem_slotitem.Lock) { return(i); } result = -2; } } } } return(result); }
public override Api_Result <BattleResultFmt> BattleResult() { Api_Result <BattleResultFmt> api_Result = base.BattleResult(); int count = userData.StartHp.Count; for (int i = 0; i < count; i++) { userData.ShipData[i].SetHp(this, userData.StartHp[i]); } if (api_Result.state == Api_Result_State.Parameter_Error) { return(api_Result); } Dictionary <int, int> slotExpBattleData = GetSlotExpBattleData(); foreach (KeyValuePair <int, int> item in slotExpBattleData) { Mem_slotitem value = null; if (Comm_UserDatas.Instance.User_slot.TryGetValue(item.Key, out value)) { value.ChangeExperience(item.Value); } } QuestPractice questPractice = new QuestPractice(api_Result.data); questPractice.ExecuteCheck(); return(api_Result); }
private void _UpdateSlotitems() { this._slotitems = new List <SlotitemModel>(); Api_Result <Dictionary <int, Mem_slotitem> > api_Result = new Api_get_Member().Slotitem(); if (api_Result.state == Api_Result_State.Success && api_Result.data != null) { for (int i = 0; i < this.SlotCount; i++) { if (this._mem_data.Slot.get_Item(i) == -1) { this._slotitems.Add(null); } else { Mem_slotitem data = api_Result.data.get_Item(this._mem_data.Slot.get_Item(i)); this._slotitems.Add(new SlotitemModel(data)); } } if (this._mem_data.Exslot <= 0) { this._slotitem_ex = null; } else { Mem_slotitem data2 = api_Result.data.get_Item(this._mem_data.Exslot); this._slotitem_ex = new SlotitemModel(data2); } } while (this._slotitems.get_Count() < this.SlotCount) { this._slotitems.Add(null); } }
public override Api_Result <BattleResultFmt> BattleResult() { Api_Result <BattleResultFmt> api_Result = base.BattleResult(); int count = this.userData.StartHp.get_Count(); for (int i = 0; i < count; i++) { this.userData.ShipData.get_Item(i).SetHp(this, this.userData.StartHp.get_Item(i)); } if (api_Result.state == Api_Result_State.Parameter_Error) { return(api_Result); } Dictionary <int, int> slotExpBattleData = base.GetSlotExpBattleData(); using (Dictionary <int, int> .Enumerator enumerator = slotExpBattleData.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, int> current = enumerator.get_Current(); Mem_slotitem mem_slotitem = null; if (Comm_UserDatas.Instance.User_slot.TryGetValue(current.get_Key(), ref mem_slotitem)) { mem_slotitem.ChangeExperience(current.get_Value()); } } } QuestPractice questPractice = new QuestPractice(api_Result.data); questPractice.ExecuteCheck(); return(api_Result); }
private void setSlotLevel(List <int> slot_rids, bool areaEnemy, out List <int> outlevel, ref Dictionary <int, int[]> outExp) { if (areaEnemy) { outlevel = Enumerable.ToList <int>(Enumerable.Repeat <int>(0, slot_rids.get_Count())); return; } List <int> list = new List <int>(); using (List <int> .Enumerator enumerator = slot_rids.GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.get_Current(); Mem_slotitem mem_slotitem = null; if (Comm_UserDatas.Instance.User_slot.TryGetValue(current, ref mem_slotitem)) { list.Add(mem_slotitem.Level); int[] expr_5F = new int[2]; expr_5F[0] = mem_slotitem.Experience; int[] array = expr_5F; outExp.Add(mem_slotitem.Rid, array); } } } outlevel = list; }
public Api_Result <SlotSetChkResult_Slot> SlotSet(int ship_rid, int slot_rid) { Api_Result <SlotSetChkResult_Slot> api_Result = new Api_Result <SlotSetChkResult_Slot>(); SlotSetChkResult_Slot slotSetChkResult_Slot = this.IsValidSlotSet(ship_rid, slot_rid); if (slotSetChkResult_Slot != SlotSetChkResult_Slot.Ok) { api_Result.state = Api_Result_State.Parameter_Error; api_Result.data = slotSetChkResult_Slot; return(api_Result); } Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship.get_Item(ship_rid); Mem_slotitem mem_slotitem = null; Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, ref mem_slotitem); Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship); Mem_slotitem mem_slotitem2 = null; Comm_UserDatas.Instance.User_slot.TryGetValue(mem_ship.Exslot, ref mem_slotitem2); mem_shipBase.Exslot = slot_rid; if (mem_slotitem2 != null) { mem_slotitem2.UnEquip(); } if (slot_rid != -1) { mem_slotitem.Equip(ship_rid); } mem_ship.Set_ShipParam(mem_shipBase, Mst_DataManager.Instance.Mst_ship.get_Item(mem_shipBase.Ship_id), false); return(api_Result); }
public SlotSetChkResult_Slot IsValidSlotSet(int ship_rid, int slot_rid) { if (this.IsValidSlotSet(ship_rid) != Api_req_Kaisou.SlotSetChkResult_Ship.Ok) { return(SlotSetChkResult_Slot.NgInvalid); } Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship.get_Item(ship_rid); if (!mem_ship.IsOpenExSlot()) { return(SlotSetChkResult_Slot.NgInvalid); } Mem_slotitem mem_slotitem = null; if (slot_rid != -1) { Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, ref mem_slotitem); if (mem_slotitem == null) { return(SlotSetChkResult_Slot.NgInvalid); } if (mem_slotitem.Equip_flag == Mem_slotitem.enumEquipSts.Equip) { return(SlotSetChkResult_Slot.NgInvalid); } } else if (slot_rid == -1) { return(SlotSetChkResult_Slot.Ok); } return(SlotSetChkResult_Slot.Ok); }
public Api_Result <Hashtable> Unslot_all(int ship_rid) { Api_Result <Hashtable> result = new Api_Result <Hashtable>(); Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship.get_Item(ship_rid); Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship); for (int i = 0; i < Enumerable.Count <int>(mem_shipBase.Slot); i++) { Mem_slotitem mem_slotitem = null; int num = mem_shipBase.Slot.get_Item(i); mem_shipBase.Slot.set_Item(i, -1); if (num > 0 && Comm_UserDatas.Instance.User_slot.TryGetValue(num, ref mem_slotitem)) { Mst_slotitem_cost mst_slotitem_cost = null; if (Mst_DataManager.Instance.Mst_slotitem_cost.TryGetValue(mem_slotitem.Slotitem_id, ref mst_slotitem_cost)) { int addNum = mst_slotitem_cost.GetAddNum(mem_shipBase.Onslot.get_Item(i)); Comm_UserDatas.Instance.User_material.get_Item(enumMaterialCategory.Bauxite).Add_Material(addNum); } mem_slotitem.UnEquip(); } } mem_ship.Set_ShipParam(mem_shipBase, Mst_DataManager.Instance.Mst_ship.get_Item(mem_shipBase.Ship_id), false); mem_ship.TrimSlot(); return(result); }
private void _UpdateSlotitems() { _slotitems = new List <SlotitemModel>(); Api_Result <Dictionary <int, Mem_slotitem> > api_Result = new Api_get_Member().Slotitem(); if (api_Result.state == Api_Result_State.Success && api_Result.data != null) { for (int i = 0; i < SlotCount; i++) { if (_mem_data.Slot[i] == -1) { _slotitems.Add(null); continue; } Mem_slotitem data = api_Result.data[_mem_data.Slot[i]]; _slotitems.Add(new SlotitemModel(data)); } if (_mem_data.Exslot <= 0) { _slotitem_ex = null; } else { Mem_slotitem data2 = api_Result.data[_mem_data.Exslot]; _slotitem_ex = new SlotitemModel(data2); } } while (_slotitems.Count < SlotCount) { _slotitems.Add(null); } }
private void setSlotLevel(List <int> slot_rids, bool areaEnemy, out List <int> outlevel, ref Dictionary <int, int[]> outExp) { if (areaEnemy) { outlevel = Enumerable.Repeat(0, slot_rids.Count).ToList(); return; } List <int> list = new List <int>(); foreach (int slot_rid in slot_rids) { Mem_slotitem value = null; if (Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, out value)) { list.Add(value.Level); int[] value2 = new int[2] { value.Experience, 0 }; outExp.Add(value.Rid, value2); } } outlevel = list; }
private int __compSlotGetNo(Mem_slotitem a, Mem_slotitem b) { if (a.GetNo > b.GetNo) { return(1); } if (a.GetNo < b.GetNo) { return(-1); } return(0); }
private int __compSlotLevel(Mem_slotitem a, Mem_slotitem b) { if (a.Level < b.Level) { return(1); } if (a.Level > b.Level) { return(-1); } return(0); }
private int __compSlotLock(Mem_slotitem a, Mem_slotitem b) { if (!a.Lock && b.Lock) { return(1); } if (a.Lock && !b.Lock) { return(-1); } return(0); }
public Api_Result <bool> SlotLockChange(int slot_rid) { Api_Result <bool> api_Result = new Api_Result <bool>(); Mem_slotitem mem_slotitem = null; if (!Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, ref mem_slotitem)) { api_Result.state = Api_Result_State.Parameter_Error; } mem_slotitem.LockChange(); api_Result.data = mem_slotitem.Lock; return(api_Result); }
private int __compSlotRare(Mem_slotitem a, Mem_slotitem b) { Dictionary <int, Mst_slotitem> mst_Slotitem = Mst_DataManager.Instance.Mst_Slotitem; if (mst_Slotitem[a.Slotitem_id].Rare < mst_Slotitem[b.Slotitem_id].Rare) { return(1); } if (mst_Slotitem[a.Slotitem_id].Rare > mst_Slotitem[b.Slotitem_id].Rare) { return(-1); } return(0); }
public static List <SlotitemModel> __GetAllSlotitems__() { Api_Result <Dictionary <int, Mem_slotitem> > api_Result = new Api_get_Member().Slotitem(); if (api_Result.state == Api_Result_State.Success) { List <SlotitemModel> list = new List <SlotitemModel>(api_Result.data.get_Count()); using (Dictionary <int, Mem_slotitem> .ValueCollection.Enumerator enumerator = api_Result.data.get_Values().GetEnumerator()) { while (enumerator.MoveNext()) { Mem_slotitem current = enumerator.get_Current(); list.Add(new SlotitemModel(current)); } } return(list); } return(new List <SlotitemModel>()); }
private int _compSlot(Mem_slotitem a, Mem_slotitem b) { int num = __compSlotLock(a, b); if (num != 0) { return(num); } num = __compSlotRare(a, b); if (num != 0) { return(num); } num = __compSlotLevel(a, b); if (num != 0) { return(num); } return(__compSlotGetNo(a, b)); }
private int findModelChangeEnableSlotPos(List <int> slot_rids, int mst_id, bool maxFlag) { int result = -1; for (int i = 0; i < slot_rids.Count; i++) { int num = slot_rids[i]; if (num <= 0) { continue; } Mem_slotitem mem_slotitem = Comm_UserDatas.Instance.User_slot[num]; if (mem_slotitem.Slotitem_id == mst_id && (!maxFlag || mem_slotitem.IsMaxSkillLevel())) { if (!mem_slotitem.Lock) { return(i); } result = -2; } } return(result); }
public List <int> Add_Slot(List <int> slot_ids) { if (slot_ids == null) { return(null); } List <int> ret_rids = new List <int>(); int nextSortNo = this.getNextSortNo <Mem_slotitem>(this.User_slot.get_Values(), slot_ids.get_Count()); slot_ids.ForEach(delegate(int x) { Mem_slotitem mem_slotitem = new Mem_slotitem(); int newRid = this.getNewRid(Enumerable.ToList <int>(this.User_slot.get_Keys())); if (mem_slotitem.Set_New_SlotData(newRid, nextSortNo, x)) { nextSortNo++; this.User_slot.Add(newRid, mem_slotitem); ret_rids.Add(newRid); this.Add_Book(2, mem_slotitem.Slotitem_id); } }); return(ret_rids); }
public List <int> Add_Slot(List <int> slot_ids) { if (slot_ids == null) { return(null); } List <int> ret_rids = new List <int>(); int nextSortNo = getNextSortNo(User_slot.Values, slot_ids.Count); slot_ids.ForEach(delegate(int x) { Mem_slotitem mem_slotitem = new Mem_slotitem(); int newRid = getNewRid(User_slot.Keys.ToList()); if (mem_slotitem.Set_New_SlotData(newRid, nextSortNo, x)) { nextSortNo++; User_slot.Add(newRid, mem_slotitem); ret_rids.Add(newRid); Add_Book(2, mem_slotitem.Slotitem_id); } }); return(ret_rids); }
public bool NewGamePlus(ICreateNewUser createInstance, string nickName, DifficultKind selectedRank, int firstShipId) { if (createInstance == null) { return(false); } bool flag = Utils.IsGameClear(); List <DifficultKind> kind = Enumerable.ToList <DifficultKind>(this.User_record.ClearDifficult); this.PurgeUserData(createInstance, true); if (flag) { this.Add_Useitem(55, 1); } using (List <Mem_book> .Enumerator enumerator = this.User_plus.Ship_book.GetEnumerator()) { while (enumerator.MoveNext()) { Mem_book current = enumerator.get_Current(); this.Ship_book.Add(current.Table_id, current); } } using (List <Mem_book> .Enumerator enumerator2 = this.User_plus.Slot_book.GetEnumerator()) { while (enumerator2.MoveNext()) { Mem_book current2 = enumerator2.get_Current(); this.Slot_book.Add(current2.Table_id, current2); } } this.User_basic = new Mem_basic(); this.User_basic.UpdateNickName(nickName); this.User_basic.SetDifficult(selectedRank); this.User_record = new Mem_record(createInstance, this.User_plus, kind); this.User_turn = new Mem_turn(); this.User_deckpractice = new Mem_deckpractice(); if (this.User_ndock.get_Count() == 0) { this.Add_Ndock(1); this.Add_Ndock(1); } if (this.User_kdock.get_Count() == 0) { this.Add_Kdock(); this.Add_Kdock(); } this.initMaterials(selectedRank); this.Add_Deck(1); List <Mst_furniture> furnitureDatas = this.User_room.get_Item(1).getFurnitureDatas(); using (List <Mem_furniture> .Enumerator enumerator3 = this.User_plus.Furniture.GetEnumerator()) { while (enumerator3.MoveNext()) { Mem_furniture current3 = enumerator3.get_Current(); this.User_furniture.Add(current3.Rid, current3); } } using (List <Mem_slotitem> .Enumerator enumerator4 = this.User_plus.Slotitem.GetEnumerator()) { while (enumerator4.MoveNext()) { Mem_slotitem current4 = enumerator4.get_Current(); this.User_slot.Add(current4.Rid, current4); } } using (List <Mem_shipBase> .Enumerator enumerator5 = this.User_plus.Ship.GetEnumerator()) { while (enumerator5.MoveNext()) { Mem_shipBase current5 = enumerator5.get_Current(); Mem_ship mem_ship = new Mem_ship(); Mst_ship mst_data = Mst_DataManager.Instance.Mst_ship.get_Item(current5.Ship_id); mem_ship.Set_ShipParam(current5, mst_data, false); mem_ship.Set_ShipParamNewGamePlus(createInstance); this.User_ship.Add(mem_ship.Rid, mem_ship); } } List <int> list = new List <int>(); list.Add(firstShipId); List <int> list2 = this.Add_Ship(list); Comm_UserDatas.Instance.User_deck.get_Item(1).Ship[0] = list2.get_Item(0); this.User_quest = new Dictionary <int, Mem_quest>(); using (Dictionary <int, Mst_maparea> .KeyCollection.Enumerator enumerator6 = Mst_DataManager.Instance.Mst_maparea.get_Keys().GetEnumerator()) { while (enumerator6.MoveNext()) { int current6 = enumerator6.get_Current(); this.Add_EscortDeck(current6, current6); } } this.initTanker(); this.UpdateDeckShipLocale(); return(true); }
public bool SetUserData() { XElement elements = VitaSaveManager.Instance.Elements; if (elements == null) { return(false); } Mem_basic user_basic = Model_Base.SetUserData <Mem_basic>(Enumerable.First <XElement>(elements.Elements(Mem_basic.tableName))); Mem_record user_record = Model_Base.SetUserData <Mem_record>(Enumerable.First <XElement>(elements.Elements(Mem_record.tableName))); Mem_turn user_turn = Model_Base.SetUserData <Mem_turn>(Enumerable.First <XElement>(elements.Elements(Mem_turn.tableName))); Mem_deckpractice user_deckpractice = Model_Base.SetUserData <Mem_deckpractice>(Enumerable.First <XElement>(elements.Elements(Mem_deckpractice.tableName))); XElement xElement = Enumerable.FirstOrDefault <XElement>(elements.Elements(Mem_trophy.tableName)); Mem_trophy user_trophy; if (xElement == null) { user_trophy = new Mem_trophy(); } else { user_trophy = Model_Base.SetUserData <Mem_trophy>(xElement); } XElement xElement2 = Enumerable.FirstOrDefault <XElement>(elements.Elements(Mem_newgame_plus.tableName)); Mem_newgame_plus user_plus; if (xElement2 == null) { user_plus = new Mem_newgame_plus(); } else { user_plus = Model_Base.SetUserData <Mem_newgame_plus>(xElement2); } this.User_basic = null; this.User_basic = user_basic; this.User_record = null; this.User_record = user_record; this.User_turn = null; this.User_turn = user_turn; this.User_deckpractice = null; this.User_deckpractice = user_deckpractice; this.User_trophy = user_trophy; this.User_plus = user_plus; Dictionary <int, Mem_book> dictionary = new Dictionary <int, Mem_book>(); Dictionary <int, Mem_book> dictionary2 = new Dictionary <int, Mem_book>(); Dictionary <int, Mem_deck> dictionary3 = new Dictionary <int, Mem_deck>(); Dictionary <int, Mem_esccort_deck> dictionary4 = new Dictionary <int, Mem_esccort_deck>(); Dictionary <int, Mem_furniture> dictionary5 = new Dictionary <int, Mem_furniture>(); Dictionary <int, Mem_kdock> dictionary6 = new Dictionary <int, Mem_kdock>(); Dictionary <int, Mem_mapcomp> dictionary7 = new Dictionary <int, Mem_mapcomp>(); Dictionary <int, Mem_mapclear> dictionary8 = new Dictionary <int, Mem_mapclear>(); Dictionary <enumMaterialCategory, Mem_material> dictionary9 = new Dictionary <enumMaterialCategory, Mem_material>(); Dictionary <int, Mem_missioncomp> dictionary10 = new Dictionary <int, Mem_missioncomp>(); Dictionary <int, Mem_ndock> dictionary11 = new Dictionary <int, Mem_ndock>(); Dictionary <int, Mem_quest> dictionary12 = new Dictionary <int, Mem_quest>(); Dictionary <int, Mem_questcount> dictionary13 = new Dictionary <int, Mem_questcount>(); Dictionary <int, Mem_ship> dictionary14 = new Dictionary <int, Mem_ship>(); Dictionary <int, Mem_slotitem> dictionary15 = new Dictionary <int, Mem_slotitem>(); Dictionary <int, Mem_tanker> dictionary16 = new Dictionary <int, Mem_tanker>(); Dictionary <int, Mem_useitem> dictionary17 = new Dictionary <int, Mem_useitem>(); Dictionary <int, Mem_rebellion_point> dictionary18 = new Dictionary <int, Mem_rebellion_point>(); Dictionary <int, Mem_room> dictionary19 = new Dictionary <int, Mem_room>(); HashSet <int> hashSet = new HashSet <int>(); HashSet <int> hashSet2 = new HashSet <int>(); List <Mem_history> list = new List <Mem_history>(); using (IEnumerator <XElement> enumerator = Extensions.Elements <XElement>(elements.Elements("ship_books"), "mem_book").GetEnumerator()) { while (enumerator.MoveNext()) { XElement current = enumerator.get_Current(); Mem_book mem_book = Model_Base.SetUserData <Mem_book>(current); dictionary.Add(mem_book.Table_id, mem_book); } } this.Ship_book.Clear(); this.Ship_book = dictionary; using (IEnumerator <XElement> enumerator2 = Extensions.Elements <XElement>(elements.Elements("slot_books"), "mem_book").GetEnumerator()) { while (enumerator2.MoveNext()) { XElement current2 = enumerator2.get_Current(); Mem_book mem_book2 = Model_Base.SetUserData <Mem_book>(current2); dictionary2.Add(mem_book2.Table_id, mem_book2); } } this.Slot_book.Clear(); this.Slot_book = dictionary2; using (IEnumerator <XElement> enumerator3 = Extensions.Elements <XElement>(elements.Elements(Mem_deck.tableName + "s"), Mem_deck.tableName).GetEnumerator()) { while (enumerator3.MoveNext()) { XElement current3 = enumerator3.get_Current(); Mem_deck mem_deck = Model_Base.SetUserData <Mem_deck>(current3); dictionary3.Add(mem_deck.Rid, mem_deck); } } this.User_deck.Clear(); this.User_deck = dictionary3; using (IEnumerator <XElement> enumerator4 = Extensions.Elements <XElement>(elements.Elements(Mem_esccort_deck.tableName + "s"), Mem_esccort_deck.tableName).GetEnumerator()) { while (enumerator4.MoveNext()) { XElement current4 = enumerator4.get_Current(); Mem_esccort_deck mem_esccort_deck = Model_Base.SetUserData <Mem_esccort_deck>(current4); dictionary4.Add(mem_esccort_deck.Rid, mem_esccort_deck); } } this.User_EscortDeck.Clear(); this.User_EscortDeck = dictionary4; using (IEnumerator <XElement> enumerator5 = Extensions.Elements <XElement>(elements.Elements(Mem_furniture.tableName + "s"), Mem_furniture.tableName).GetEnumerator()) { while (enumerator5.MoveNext()) { XElement current5 = enumerator5.get_Current(); Mem_furniture mem_furniture = Model_Base.SetUserData <Mem_furniture>(current5); dictionary5.Add(mem_furniture.Rid, mem_furniture); } } this.User_furniture.Clear(); this.User_furniture = dictionary5; using (IEnumerator <XElement> enumerator6 = Extensions.Elements <XElement>(elements.Elements(Mem_kdock.tableName + "s"), Mem_kdock.tableName).GetEnumerator()) { while (enumerator6.MoveNext()) { XElement current6 = enumerator6.get_Current(); Mem_kdock mem_kdock = Model_Base.SetUserData <Mem_kdock>(current6); dictionary6.Add(mem_kdock.Rid, mem_kdock); } } this.User_kdock.Clear(); this.User_kdock = dictionary6; using (IEnumerator <XElement> enumerator7 = Extensions.Elements <XElement>(elements.Elements(Mem_mapcomp.tableName + "s"), Mem_mapcomp.tableName).GetEnumerator()) { while (enumerator7.MoveNext()) { XElement current7 = enumerator7.get_Current(); Mem_mapcomp mem_mapcomp = Model_Base.SetUserData <Mem_mapcomp>(current7); dictionary7.Add(mem_mapcomp.Rid, mem_mapcomp); } } this.User_mapcomp.Clear(); this.User_mapcomp = dictionary7; using (IEnumerator <XElement> enumerator8 = Extensions.Elements <XElement>(elements.Elements(Mem_mapclear.tableName + "s"), Mem_mapclear.tableName).GetEnumerator()) { while (enumerator8.MoveNext()) { XElement current8 = enumerator8.get_Current(); Mem_mapclear mem_mapclear = Model_Base.SetUserData <Mem_mapclear>(current8); dictionary8.Add(mem_mapclear.Rid, mem_mapclear); } } this.User_mapclear.Clear(); this.User_mapclear = dictionary8; using (IEnumerator <XElement> enumerator9 = Extensions.Elements <XElement>(elements.Elements(Mem_material.tableName + "s"), Mem_material.tableName).GetEnumerator()) { while (enumerator9.MoveNext()) { XElement current9 = enumerator9.get_Current(); Mem_material mem_material = Model_Base.SetUserData <Mem_material>(current9); dictionary9.Add(mem_material.Rid, mem_material); } } this.User_material.Clear(); this.User_material = dictionary9; using (IEnumerator <XElement> enumerator10 = Extensions.Elements <XElement>(elements.Elements(Mem_missioncomp.tableName + "s"), Mem_missioncomp.tableName).GetEnumerator()) { while (enumerator10.MoveNext()) { XElement current10 = enumerator10.get_Current(); Mem_missioncomp mem_missioncomp = Model_Base.SetUserData <Mem_missioncomp>(current10); dictionary10.Add(mem_missioncomp.Rid, mem_missioncomp); } } this.User_missioncomp.Clear(); this.User_missioncomp = dictionary10; using (IEnumerator <XElement> enumerator11 = Extensions.Elements <XElement>(elements.Elements(Mem_ndock.tableName + "s"), Mem_ndock.tableName).GetEnumerator()) { while (enumerator11.MoveNext()) { XElement current11 = enumerator11.get_Current(); Mem_ndock mem_ndock = Model_Base.SetUserData <Mem_ndock>(current11); dictionary11.Add(mem_ndock.Rid, mem_ndock); } } this.User_ndock.Clear(); this.User_ndock = dictionary11; using (IEnumerator <XElement> enumerator12 = Extensions.Elements <XElement>(elements.Elements(Mem_quest.tableName + "s"), Mem_quest.tableName).GetEnumerator()) { while (enumerator12.MoveNext()) { XElement current12 = enumerator12.get_Current(); Mem_quest mem_quest = Model_Base.SetUserData <Mem_quest>(current12); dictionary12.Add(mem_quest.Rid, mem_quest); } } this.User_quest.Clear(); this.User_quest = dictionary12; using (IEnumerator <XElement> enumerator13 = Extensions.Elements <XElement>(elements.Elements(Mem_questcount.tableName + "s"), Mem_questcount.tableName).GetEnumerator()) { while (enumerator13.MoveNext()) { XElement current13 = enumerator13.get_Current(); Mem_questcount mem_questcount = Model_Base.SetUserData <Mem_questcount>(current13); dictionary13.Add(mem_questcount.Rid, mem_questcount); } } this.User_questcount.Clear(); this.User_questcount = dictionary13; using (IEnumerator <XElement> enumerator14 = Extensions.Elements <XElement>(elements.Elements(Mem_slotitem.tableName + "s"), Mem_slotitem.tableName).GetEnumerator()) { while (enumerator14.MoveNext()) { XElement current14 = enumerator14.get_Current(); Mem_slotitem mem_slotitem = Model_Base.SetUserData <Mem_slotitem>(current14); dictionary15.Add(mem_slotitem.Rid, mem_slotitem); } } this.User_slot.Clear(); this.User_slot = dictionary15; using (IEnumerator <XElement> enumerator15 = Extensions.Elements <XElement>(elements.Elements(Mem_ship.tableName + "s"), Mem_ship.tableName).GetEnumerator()) { while (enumerator15.MoveNext()) { XElement current15 = enumerator15.get_Current(); Mem_ship mem_ship = Model_Base.SetUserData <Mem_ship>(current15); dictionary14.Add(mem_ship.Rid, mem_ship); } } this.User_ship.Clear(); this.User_ship = dictionary14; using (IEnumerator <XElement> enumerator16 = Extensions.Elements <XElement>(elements.Elements(Mem_tanker.tableName + "s"), Mem_tanker.tableName).GetEnumerator()) { while (enumerator16.MoveNext()) { XElement current16 = enumerator16.get_Current(); Mem_tanker mem_tanker = Model_Base.SetUserData <Mem_tanker>(current16); dictionary16.Add(mem_tanker.Rid, mem_tanker); } } this.User_tanker.Clear(); this.User_tanker = dictionary16; using (IEnumerator <XElement> enumerator17 = Extensions.Elements <XElement>(elements.Elements(Mem_useitem.tableName + "s"), Mem_useitem.tableName).GetEnumerator()) { while (enumerator17.MoveNext()) { XElement current17 = enumerator17.get_Current(); Mem_useitem mem_useitem = Model_Base.SetUserData <Mem_useitem>(current17); dictionary17.Add(mem_useitem.Rid, mem_useitem); } } this.User_useItem.Clear(); this.User_useItem = dictionary17; using (IEnumerator <XElement> enumerator18 = Extensions.Elements <XElement>(elements.Elements(Mem_rebellion_point.tableName + "s"), Mem_rebellion_point.tableName).GetEnumerator()) { while (enumerator18.MoveNext()) { XElement current18 = enumerator18.get_Current(); Mem_rebellion_point mem_rebellion_point = Model_Base.SetUserData <Mem_rebellion_point>(current18); dictionary18.Add(mem_rebellion_point.Rid, mem_rebellion_point); } } this.User_rebellion_point.Clear(); this.User_rebellion_point = dictionary18; using (IEnumerator <XElement> enumerator19 = Extensions.Elements <XElement>(elements.Elements(Mem_room.tableName + "s"), Mem_room.tableName).GetEnumerator()) { while (enumerator19.MoveNext()) { XElement current19 = enumerator19.get_Current(); Mem_room mem_room = Model_Base.SetUserData <Mem_room>(current19); dictionary19.Add(mem_room.Rid, mem_room); } } this.User_room.Clear(); this.User_room = dictionary19; using (IEnumerator <XElement> enumerator20 = elements.Element("temp_escortships").Elements().GetEnumerator()) { while (enumerator20.MoveNext()) { XElement current20 = enumerator20.get_Current(); string value = current20.get_Value(); hashSet.Add(int.Parse(value)); } } this.Temp_escortship.Clear(); this.Temp_escortship = hashSet; using (IEnumerator <XElement> enumerator21 = elements.Element("temp_deckships").Elements().GetEnumerator()) { while (enumerator21.MoveNext()) { XElement current21 = enumerator21.get_Current(); string value2 = current21.get_Value(); hashSet2.Add(int.Parse(value2)); } } this.Temp_deckship.Clear(); this.Temp_deckship = hashSet2; using (IEnumerator <XElement> enumerator22 = Extensions.Elements <XElement>(elements.Elements(Mem_history.tableName + "s"), Mem_history.tableName).GetEnumerator()) { while (enumerator22.MoveNext()) { XElement current22 = enumerator22.get_Current(); Mem_history mem_history = Model_Base.SetUserData <Mem_history>(current22); list.Add(mem_history); } } this.User_history.Clear(); list.ForEach(delegate(Mem_history x) { this.Add_History(x); }); return(true); }
public SlotitemModel(Mem_slotitem data) : base(data.Slotitem_id) { _data = data; }
public SlotSetChkResult_Slot IsValidSlotSet(int ship_rid, int slot_rid, int equip_idx) { if (this.IsValidSlotSet(ship_rid) != Api_req_Kaisou.SlotSetChkResult_Ship.Ok) { return(SlotSetChkResult_Slot.NgInvalid); } Mem_ship mem_ship = Comm_UserDatas.Instance.User_ship.get_Item(ship_rid); if (mem_ship.Slotnum < equip_idx + 1) { return(SlotSetChkResult_Slot.NgInvalid); } int num = mem_ship.Slot.FindIndex((int x) => x == -1); if (num != -1 && num < equip_idx) { equip_idx = num; } Mem_slotitem mem_slotitem = null; if (slot_rid != -1) { Comm_UserDatas.Instance.User_slot.TryGetValue(slot_rid, ref mem_slotitem); if (mem_slotitem == null) { return(SlotSetChkResult_Slot.NgInvalid); } if (mem_slotitem.Equip_flag == Mem_slotitem.enumEquipSts.Equip) { return(SlotSetChkResult_Slot.NgInvalid); } } else if (slot_rid == -1) { return(SlotSetChkResult_Slot.Ok); } int num2 = 0; int num3 = 0; OnslotChangeType slotChangeCost = Mst_slotitem_cost.GetSlotChangeCost(mem_ship.Slot.get_Item(equip_idx), slot_rid, out num2, out num3); int onslotKeisu = mem_ship.Onslot.get_Item(equip_idx); if (slotChangeCost == OnslotChangeType.OtherToPlane) { onslotKeisu = Mst_DataManager.Instance.Mst_ship.get_Item(mem_ship.Ship_id).Maxeq.get_Item(equip_idx); } int slotChangeBauxiteNum = Mst_slotitem_cost.GetSlotChangeBauxiteNum(slotChangeCost, num2, num3, onslotKeisu); if (slotChangeBauxiteNum > 0) { return(SlotSetChkResult_Slot.Ok); } if (Math.Abs(slotChangeBauxiteNum) > Comm_UserDatas.Instance.User_material.get_Item(enumMaterialCategory.Bauxite).Value) { if (num2 == 0 && num3 > 0) { return(SlotSetChkResult_Slot.NgBauxiteShort); } if (num2 < num3) { return(SlotSetChkResult_Slot.NgBausiteShortHighCost); } } return(SlotSetChkResult_Slot.Ok); }
public Api_Result <Mem_ship> Remodeling(int ship_rid, int drawingNum) { Api_Result <Mem_ship> api_Result = new Api_Result <Mem_ship>(); Mem_ship mem_ship = null; if (!Comm_UserDatas.Instance.User_ship.TryGetValue(ship_rid, ref mem_ship)) { api_Result.state = Api_Result_State.Parameter_Error; return(api_Result); } if (mem_ship.IsBlingShip()) { api_Result.state = Api_Result_State.Parameter_Error; return(api_Result); } Mst_ship mst_ship = Mst_DataManager.Instance.Mst_ship.get_Item(mem_ship.Ship_id); int aftershipid = Mst_DataManager.Instance.Mst_ship.get_Item(mem_ship.Ship_id).Aftershipid; Mst_ship mst_ship2 = Mst_DataManager.Instance.Mst_ship.get_Item(aftershipid); Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship); Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary = new Dictionary <Mem_ship.enumKyoukaIdx, int>(); dictionary.Add(Mem_ship.enumKyoukaIdx.Houg, mst_ship2.Houg); dictionary.Add(Mem_ship.enumKyoukaIdx.Raig, mst_ship2.Raig); dictionary.Add(Mem_ship.enumKyoukaIdx.Souk, mst_ship2.Souk); dictionary.Add(Mem_ship.enumKyoukaIdx.Tyku, mst_ship2.Tyku); Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary2 = dictionary; dictionary = new Dictionary <Mem_ship.enumKyoukaIdx, int>(); dictionary.Add(Mem_ship.enumKyoukaIdx.Houg, mst_ship2.Houg_max); dictionary.Add(Mem_ship.enumKyoukaIdx.Raig, mst_ship2.Raig_max); dictionary.Add(Mem_ship.enumKyoukaIdx.Souk, mst_ship2.Souk_max); dictionary.Add(Mem_ship.enumKyoukaIdx.Tyku, mst_ship2.Tyku_max); Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary3 = dictionary; Dictionary <Mem_ship.enumKyoukaIdx, int> kyouka = mem_ship.Kyouka; Random random = new Random(); using (Dictionary <Mem_ship.enumKyoukaIdx, int> .Enumerator enumerator = dictionary2.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <Mem_ship.enumKyoukaIdx, int> current = enumerator.get_Current(); int num = dictionary2.get_Item(current.get_Key()); int num2 = dictionary3.get_Item(current.get_Key()); int num3 = num2 - num; double num4 = (double)num3 * (0.4 + 0.4 * (double)random.Next(2)) * (double)mem_ship.Level / 99.0; int num5 = (int)Math.Ceiling(num4); kyouka.set_Item(current.get_Key(), num5); if (num2 < kyouka.get_Item(current.get_Key()) + num) { kyouka.set_Item(current.get_Key(), num2 - num); } } } if (kyouka.get_Item(Mem_ship.enumKyoukaIdx.Luck) + mst_ship2.Luck > mst_ship2.Luck_max) { kyouka.set_Item(Mem_ship.enumKyoukaIdx.Luck, mst_ship2.Luck_max - mst_ship2.Luck); } kyouka.set_Item(Mem_ship.enumKyoukaIdx.Taik_Powerup, 0); mem_shipBase.C_taik_powerup = 0; if (mem_shipBase.Level >= 100) { int remodelingTaik = this.getRemodelingTaik(mst_ship2.Taik); int num6 = mst_ship2.Taik + remodelingTaik; if (num6 > mst_ship2.Taik_max) { num6 = mst_ship2.Taik_max; } kyouka.set_Item(Mem_ship.enumKyoukaIdx.Taik, num6 - mst_ship2.Taik); } List <int> list = Comm_UserDatas.Instance.Add_Slot(mst_ship2.Defeq); mem_shipBase.Slot.ForEach(delegate(int x) { if (x > 0) { Comm_UserDatas.Instance.User_slot.get_Item(x).UnEquip(); } }); if (mem_ship.Exslot > 0) { Comm_UserDatas.Instance.User_slot.get_Item(mem_ship.Exslot).UnEquip(); mem_shipBase.Exslot = -1; } mem_shipBase.Slot.Clear(); mem_shipBase.Onslot.Clear(); for (int i = 0; i < mst_ship2.Slot_num; i++) { if (list.get_Count() > i) { mem_shipBase.Slot.Add(list.get_Item(i)); Mem_slotitem mem_slotitem = Comm_UserDatas.Instance.User_slot.get_Item(list.get_Item(i)); mem_slotitem.Equip(mem_shipBase.Rid); } else { mem_shipBase.Slot.Add(mst_ship2.Defeq.get_Item(i)); } mem_shipBase.Onslot.Add(mst_ship2.Maxeq.get_Item(i)); } mem_shipBase.Nowhp = kyouka.get_Item(Mem_ship.enumKyoukaIdx.Taik) + mst_ship2.Taik; mem_shipBase.Fuel = mst_ship2.Fuel_max; mem_shipBase.Bull = mst_ship2.Bull_max; mem_shipBase.Cond = 40; mem_shipBase.SetKyoukaValue(kyouka); mem_ship.Set_ShipParam(mem_shipBase, mst_ship2, false); mem_ship.SumLovToRemodeling(); if (drawingNum > 0) { Comm_UserDatas.Instance.User_useItem.get_Item(58).Sub_UseItem(drawingNum); } int remodelDevKitNum = mst_ship2.GetRemodelDevKitNum(); if (remodelDevKitNum > 0) { Comm_UserDatas.Instance.User_material.get_Item(enumMaterialCategory.Dev_Kit).Sub_Material(remodelDevKitNum); } Comm_UserDatas.Instance.User_material.get_Item(enumMaterialCategory.Steel).Sub_Material(mst_ship.Afterfuel); Comm_UserDatas.Instance.User_material.get_Item(enumMaterialCategory.Bull).Sub_Material(mst_ship.Afterbull); Comm_UserDatas.Instance.Add_Book(1, mem_ship.Ship_id); api_Result.data = mem_ship; return(api_Result); }
public bool SetUserData() { XElement elements = VitaSaveManager.Instance.Elements; if (elements == null) { return(false); } Mem_basic user_basic = Model_Base.SetUserData <Mem_basic>(elements.Elements(Mem_basic.tableName).First()); Mem_record user_record = Model_Base.SetUserData <Mem_record>(elements.Elements(Mem_record.tableName).First()); Mem_turn user_turn = Model_Base.SetUserData <Mem_turn>(elements.Elements(Mem_turn.tableName).First()); Mem_deckpractice user_deckpractice = Model_Base.SetUserData <Mem_deckpractice>(elements.Elements(Mem_deckpractice.tableName).First()); XElement xElement = elements.Elements(Mem_trophy.tableName).FirstOrDefault(); Mem_trophy user_trophy = (xElement != null) ? Model_Base.SetUserData <Mem_trophy>(xElement) : new Mem_trophy(); XElement xElement2 = elements.Elements(Mem_newgame_plus.tableName).FirstOrDefault(); Mem_newgame_plus user_plus = (xElement2 != null) ? Model_Base.SetUserData <Mem_newgame_plus>(xElement2) : new Mem_newgame_plus(); User_basic = null; User_basic = user_basic; User_record = null; User_record = user_record; User_turn = null; User_turn = user_turn; User_deckpractice = null; User_deckpractice = user_deckpractice; User_trophy = user_trophy; User_plus = user_plus; Dictionary <int, Mem_book> dictionary = new Dictionary <int, Mem_book>(); Dictionary <int, Mem_book> dictionary2 = new Dictionary <int, Mem_book>(); Dictionary <int, Mem_deck> dictionary3 = new Dictionary <int, Mem_deck>(); Dictionary <int, Mem_esccort_deck> dictionary4 = new Dictionary <int, Mem_esccort_deck>(); Dictionary <int, Mem_furniture> dictionary5 = new Dictionary <int, Mem_furniture>(); Dictionary <int, Mem_kdock> dictionary6 = new Dictionary <int, Mem_kdock>(); Dictionary <int, Mem_mapcomp> dictionary7 = new Dictionary <int, Mem_mapcomp>(); Dictionary <int, Mem_mapclear> dictionary8 = new Dictionary <int, Mem_mapclear>(); Dictionary <enumMaterialCategory, Mem_material> dictionary9 = new Dictionary <enumMaterialCategory, Mem_material>(); Dictionary <int, Mem_missioncomp> dictionary10 = new Dictionary <int, Mem_missioncomp>(); Dictionary <int, Mem_ndock> dictionary11 = new Dictionary <int, Mem_ndock>(); Dictionary <int, Mem_quest> dictionary12 = new Dictionary <int, Mem_quest>(); Dictionary <int, Mem_questcount> dictionary13 = new Dictionary <int, Mem_questcount>(); Dictionary <int, Mem_ship> dictionary14 = new Dictionary <int, Mem_ship>(); Dictionary <int, Mem_slotitem> dictionary15 = new Dictionary <int, Mem_slotitem>(); Dictionary <int, Mem_tanker> dictionary16 = new Dictionary <int, Mem_tanker>(); Dictionary <int, Mem_useitem> dictionary17 = new Dictionary <int, Mem_useitem>(); Dictionary <int, Mem_rebellion_point> dictionary18 = new Dictionary <int, Mem_rebellion_point>(); Dictionary <int, Mem_room> dictionary19 = new Dictionary <int, Mem_room>(); HashSet <int> hashSet = new HashSet <int>(); HashSet <int> hashSet2 = new HashSet <int>(); List <Mem_history> list = new List <Mem_history>(); foreach (XElement item2 in elements.Elements("ship_books").Elements("mem_book")) { Mem_book mem_book = Model_Base.SetUserData <Mem_book>(item2); dictionary.Add(mem_book.Table_id, mem_book); } Ship_book.Clear(); Ship_book = dictionary; foreach (XElement item3 in elements.Elements("slot_books").Elements("mem_book")) { Mem_book mem_book2 = Model_Base.SetUserData <Mem_book>(item3); dictionary2.Add(mem_book2.Table_id, mem_book2); } Slot_book.Clear(); Slot_book = dictionary2; foreach (XElement item4 in elements.Elements(Mem_deck.tableName + "s").Elements(Mem_deck.tableName)) { Mem_deck mem_deck = Model_Base.SetUserData <Mem_deck>(item4); dictionary3.Add(mem_deck.Rid, mem_deck); } User_deck.Clear(); User_deck = dictionary3; foreach (XElement item5 in elements.Elements(Mem_esccort_deck.tableName + "s").Elements(Mem_esccort_deck.tableName)) { Mem_esccort_deck mem_esccort_deck = Model_Base.SetUserData <Mem_esccort_deck>(item5); dictionary4.Add(mem_esccort_deck.Rid, mem_esccort_deck); } User_EscortDeck.Clear(); User_EscortDeck = dictionary4; foreach (XElement item6 in elements.Elements(Mem_furniture.tableName + "s").Elements(Mem_furniture.tableName)) { Mem_furniture mem_furniture = Model_Base.SetUserData <Mem_furniture>(item6); dictionary5.Add(mem_furniture.Rid, mem_furniture); } User_furniture.Clear(); User_furniture = dictionary5; foreach (XElement item7 in elements.Elements(Mem_kdock.tableName + "s").Elements(Mem_kdock.tableName)) { Mem_kdock mem_kdock = Model_Base.SetUserData <Mem_kdock>(item7); dictionary6.Add(mem_kdock.Rid, mem_kdock); } User_kdock.Clear(); User_kdock = dictionary6; foreach (XElement item8 in elements.Elements(Mem_mapcomp.tableName + "s").Elements(Mem_mapcomp.tableName)) { Mem_mapcomp mem_mapcomp = Model_Base.SetUserData <Mem_mapcomp>(item8); dictionary7.Add(mem_mapcomp.Rid, mem_mapcomp); } User_mapcomp.Clear(); User_mapcomp = dictionary7; foreach (XElement item9 in elements.Elements(Mem_mapclear.tableName + "s").Elements(Mem_mapclear.tableName)) { Mem_mapclear mem_mapclear = Model_Base.SetUserData <Mem_mapclear>(item9); dictionary8.Add(mem_mapclear.Rid, mem_mapclear); } User_mapclear.Clear(); User_mapclear = dictionary8; foreach (XElement item10 in elements.Elements(Mem_material.tableName + "s").Elements(Mem_material.tableName)) { Mem_material mem_material = Model_Base.SetUserData <Mem_material>(item10); dictionary9.Add(mem_material.Rid, mem_material); } User_material.Clear(); User_material = dictionary9; foreach (XElement item11 in elements.Elements(Mem_missioncomp.tableName + "s").Elements(Mem_missioncomp.tableName)) { Mem_missioncomp mem_missioncomp = Model_Base.SetUserData <Mem_missioncomp>(item11); dictionary10.Add(mem_missioncomp.Rid, mem_missioncomp); } User_missioncomp.Clear(); User_missioncomp = dictionary10; foreach (XElement item12 in elements.Elements(Mem_ndock.tableName + "s").Elements(Mem_ndock.tableName)) { Mem_ndock mem_ndock = Model_Base.SetUserData <Mem_ndock>(item12); dictionary11.Add(mem_ndock.Rid, mem_ndock); } User_ndock.Clear(); User_ndock = dictionary11; foreach (XElement item13 in elements.Elements(Mem_quest.tableName + "s").Elements(Mem_quest.tableName)) { Mem_quest mem_quest = Model_Base.SetUserData <Mem_quest>(item13); dictionary12.Add(mem_quest.Rid, mem_quest); } User_quest.Clear(); User_quest = dictionary12; foreach (XElement item14 in elements.Elements(Mem_questcount.tableName + "s").Elements(Mem_questcount.tableName)) { Mem_questcount mem_questcount = Model_Base.SetUserData <Mem_questcount>(item14); dictionary13.Add(mem_questcount.Rid, mem_questcount); } User_questcount.Clear(); User_questcount = dictionary13; foreach (XElement item15 in elements.Elements(Mem_slotitem.tableName + "s").Elements(Mem_slotitem.tableName)) { Mem_slotitem mem_slotitem = Model_Base.SetUserData <Mem_slotitem>(item15); dictionary15.Add(mem_slotitem.Rid, mem_slotitem); } User_slot.Clear(); User_slot = dictionary15; foreach (XElement item16 in elements.Elements(Mem_ship.tableName + "s").Elements(Mem_ship.tableName)) { Mem_ship mem_ship = Model_Base.SetUserData <Mem_ship>(item16); dictionary14.Add(mem_ship.Rid, mem_ship); } User_ship.Clear(); User_ship = dictionary14; foreach (XElement item17 in elements.Elements(Mem_tanker.tableName + "s").Elements(Mem_tanker.tableName)) { Mem_tanker mem_tanker = Model_Base.SetUserData <Mem_tanker>(item17); dictionary16.Add(mem_tanker.Rid, mem_tanker); } User_tanker.Clear(); User_tanker = dictionary16; foreach (XElement item18 in elements.Elements(Mem_useitem.tableName + "s").Elements(Mem_useitem.tableName)) { Mem_useitem mem_useitem = Model_Base.SetUserData <Mem_useitem>(item18); dictionary17.Add(mem_useitem.Rid, mem_useitem); } User_useItem.Clear(); User_useItem = dictionary17; foreach (XElement item19 in elements.Elements(Mem_rebellion_point.tableName + "s").Elements(Mem_rebellion_point.tableName)) { Mem_rebellion_point mem_rebellion_point = Model_Base.SetUserData <Mem_rebellion_point>(item19); dictionary18.Add(mem_rebellion_point.Rid, mem_rebellion_point); } User_rebellion_point.Clear(); User_rebellion_point = dictionary18; foreach (XElement item20 in elements.Elements(Mem_room.tableName + "s").Elements(Mem_room.tableName)) { Mem_room mem_room = Model_Base.SetUserData <Mem_room>(item20); dictionary19.Add(mem_room.Rid, mem_room); } User_room.Clear(); User_room = dictionary19; foreach (XElement item21 in elements.Element("temp_escortships").Elements()) { string value = item21.Value; hashSet.Add(int.Parse(value)); } Temp_escortship.Clear(); Temp_escortship = hashSet; foreach (XElement item22 in elements.Element("temp_deckships").Elements()) { string value2 = item22.Value; hashSet2.Add(int.Parse(value2)); } Temp_deckship.Clear(); Temp_deckship = hashSet2; foreach (XElement item23 in elements.Elements(Mem_history.tableName + "s").Elements(Mem_history.tableName)) { Mem_history item = Model_Base.SetUserData <Mem_history>(item23); list.Add(item); } User_history.Clear(); list.ForEach(delegate(Mem_history x) { Add_History(x); }); return(true); }