private bool isValidSetDeck(RebellionFleetType iType, DeckModel model) { DebugUtils.Log("isValidSetDeck::" + iType); bool flag = !_uiParticipatingFleetSelector.IsAlreadySetFleet(_uiFleetSelector.nowSelectedDeck) && _uiFleetSelector.nowSelectedDeck.GetFlagShip() != null; RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); bool flag2 = false; List <IsGoCondition> list = null; switch (iType) { case RebellionFleetType.VanguardSupportFleet: list = rebellionManager.IsValidMissionSub(model.Id); break; case RebellionFleetType.DecisiveBattleSupportFleet: list = rebellionManager.IsValid_MissionMain(model.Id); break; } if (list == null || list.Count == 0) { flag2 = true; } else { CommonPopupDialog.Instance.StartPopup(Util.getCancelReason(list[0])); } return(flag && flag2); }
private void DecideSortieStart() { DebugUtils.Log("TaskRebellionOrganize", string.Empty); RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); List <UIRebellionParticipatingFleetInfo> participatingFleetList = _ctrlRebellionOrganize.participatingFleetSelector.participatingFleetList; UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo2 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattlePrimaryFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo3 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardSupportFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo4 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattleSupportFleet); int[] array = new int[4] { (!(uIRebellionParticipatingFleetInfo == null)) ? uIRebellionParticipatingFleetInfo.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo2 == null)) ? uIRebellionParticipatingFleetInfo2.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo3 == null)) ? uIRebellionParticipatingFleetInfo3.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo4 == null)) ? uIRebellionParticipatingFleetInfo4.deckModel.Id : (-1) }; bool flag = rebellionManager.IsGoRebellion(array[0], array[1], array[2], array[3]); List <IsGoCondition> list = null; List <IsGoCondition> list2 = null; if (array[2] != -1) { list = rebellionManager.IsValidMissionSub(array[2]); } if (array[3] != -1) { list2 = rebellionManager.IsValid_MissionMain(array[3]); } bool flag2 = list == null || (list != null && list.Count == 0); bool flag3 = list2 == null || (list2 != null && list2.Count == 0); if (flag && flag2 && flag3) { RebellionMapManager rebellionMapManager = rebellionManager.GoRebellion(array[0], array[1], array[2], array[3]); MapModel map = rebellionMapManager.Map; Hashtable hashtable = new Hashtable(); hashtable.Add("rebellionMapManager", rebellionMapManager); hashtable.Add("rootType", 0); hashtable.Add("shipRecoveryType", ShipRecoveryType.None); hashtable.Add("escape", false); RetentionData.SetData(hashtable); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks(); StartCoroutine(PlayTransition(map, uIRebellionParticipatingFleetInfo2.deckModel)); } SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); }