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 NewGamePlus(ICreateNewUser createInstance, string nickName, DifficultKind selectedRank, int firstShipId) { if (createInstance == null) { return(false); } bool flag = Utils.IsGameClear(); List <DifficultKind> kind = User_record.ClearDifficult.ToList(); PurgeUserData(createInstance, plusGame: true); if (flag) { Add_Useitem(55, 1); } foreach (Mem_book item in User_plus.Ship_book) { Ship_book.Add(item.Table_id, item); } foreach (Mem_book item2 in User_plus.Slot_book) { Slot_book.Add(item2.Table_id, item2); } User_basic = new Mem_basic(); User_basic.UpdateNickName(nickName); User_basic.SetDifficult(selectedRank); User_record = new Mem_record(createInstance, User_plus, kind); User_turn = new Mem_turn(); User_deckpractice = new Mem_deckpractice(); if (User_ndock.Count == 0) { Add_Ndock(1); Add_Ndock(1); } if (User_kdock.Count == 0) { Add_Kdock(); Add_Kdock(); } initMaterials(selectedRank); Add_Deck(1); User_room[1].getFurnitureDatas(); foreach (Mem_furniture item3 in User_plus.Furniture) { User_furniture.Add(item3.Rid, item3); } foreach (Mem_slotitem item4 in User_plus.Slotitem) { User_slot.Add(item4.Rid, item4); } foreach (Mem_shipBase item5 in User_plus.Ship) { Mem_ship mem_ship = new Mem_ship(); Mst_ship mst_data = Mst_DataManager.Instance.Mst_ship[item5.Ship_id]; mem_ship.Set_ShipParam(item5, mst_data, enemy_flag: false); mem_ship.Set_ShipParamNewGamePlus(createInstance); User_ship.Add(mem_ship.Rid, mem_ship); } List <int> list = Add_Ship(new List <int> { firstShipId }); Instance.User_deck[1].Ship[0] = list[0]; User_quest = new Dictionary <int, Mem_quest>(); foreach (int key in Mst_DataManager.Instance.Mst_maparea.Keys) { Add_EscortDeck(key, key); } initTanker(); UpdateDeckShipLocale(); return(true); }