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 = 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); }