public void OnChooseShip(object o, SelectShipArgs a)
 {
     this.showAfterSelect.SetActive(true);
     this.showAfterSelect.GetComponent<AnimatePosition>().StartMove();
     this.isRequestingServer = true;
     if (a.type == SelectShipType.Close)
     {
         this.isRequestingServer = false;
         this.UpdateFleetInfo();
     }
     else if ((this.selectedFleet != null) && GameData.instance.IsFleetInExplore(this.selectedFleet.id))
     {
         this.isRequestingServer = false;
         this.UpdateFleetInfo();
         UIManager.instance.ShowNotice(Localization.Localize("NoticeFleetIsInExplore"));
     }
     else if ((a.userShip != null) && a.userShip.IsInExplore)
     {
         this.isRequestingServer = false;
         this.UpdateFleetInfo();
         UIManager.instance.ShowNotice(Localization.Localize("NoticeShipIsInExplore"));
     }
     else if (a.userShip == null)
     {
         if ((this.selectedFleet == null) || (this.selectedShipIndex >= this.selectedFleet.ships.Length))
         {
             this.isRequestingServer = false;
             this.UpdateFleetInfo();
         }
         else if (this.CanRemoveShip())
         {
             this.updateFleetRequest = ServerRequestManager.instance.ChangeFleetShip(this.selectedFleet.id, 0, this.selectedShipIndex);
             this.updateFleetRequest.UpdateFleetSuccess += new EventHandler<EventArgs>(this.OnUpdateSuccess);
             this.updateFleetRequest.UpdateFleetFail += new EventHandler<EventArgs>(this.OnUpdateFail);
         }
         else
         {
             this.isRequestingServer = false;
             this.UpdateFleetInfo();
             UIManager.instance.ShowNotice(Localization.Localize("NeedFlagShipInFleet"));
         }
     }
     else
     {
         TutorialManager.instance.CheckStepFinishAction("FleetSelectShipClick");
         if (this.WillHaveSameIdShip(a.userShip))
         {
             this.isRequestingServer = false;
             this.UpdateFleetInfo();
             UIManager.instance.ShowNotice(Localization.Localize("CannotUseSameIdShipInOneFleet"));
         }
         else
         {
             this.updateFleetRequest = ServerRequestManager.instance.ChangeFleetShip(this.selectedFleet.id, a.userShip.id, this.selectedShipIndex);
             this.updateFleetRequest.UpdateFleetSuccess += new EventHandler<EventArgs>(this.OnUpdateSuccess);
             this.updateFleetRequest.UpdateFleetFail += new EventHandler<EventArgs>(this.OnUpdateFail);
         }
     }
 }
 private void OnChooseTargetShip(object o, SelectShipArgs a)
 {
     this.showActionGO.SetActive(true);
     this.showActionGO.GetComponent<AnimatePosition>().StartMove();
     if (a.type == SelectShipType.Close)
     {
         this.UpdateUIContents();
     }
     else if (a.userShip != null)
     {
         this.SetTargetShip(a.userShip);
     }
 }
 public void OnChooseShip(object o, SelectShipArgs a)
 {
     this.showAction2.SetActive(true);
     this.showAction2.GetComponent<AnimatePosition>().StartMove();
     int[] campaignFleetInfo = this.gameData.GetCampaignFleetInfo(this.level.id);
     if (a.type != SelectShipType.Close)
     {
         if (a.userShip == null)
         {
             if (campaignFleetInfo[this.selectedShipIndex] != 0)
             {
                 this.ReqUpdateFleet(this.selectedShipIndex, 0);
             }
         }
         else if (this.WillHaveSameIdShip(a.userShip))
         {
             UIManager.instance.ShowNotice(Localization.Localize("CannotUseSameIdShipInOneFleet"));
         }
         else
         {
             int ruleAt = this.level.GetRuleAt(this.selectedShipIndex);
             bool flag = true;
             if ((ruleAt > 0) && (ruleAt <= 14))
             {
                 flag = a.userShip.ship.type == ruleAt;
             }
             if (flag)
             {
                 this.ReqUpdateFleet(this.selectedShipIndex, a.userShip.id);
             }
             else
             {
                 string str = Localization.Localize("ShipTypeDetail" + ruleAt);
                 string noticeInfo = string.Format(Localization.Localize("PVECampaignNoticeTypeWrong"), str);
                 UIManager.instance.ShowNotice(noticeInfo);
             }
         }
     }
 }
 private void OnChooseMaterialShip(object o, SelectShipArgs a)
 {
     this.showActionGO.SetActive(true);
     this.showActionGO.GetComponent<AnimatePosition>().StartMove();
     if (a.type == SelectShipType.Close)
     {
         this.UpdateUIContents();
     }
     else if (a.userShip != null)
     {
         this.materialShips = a.userShips;
         this.UpdateUIContents();
     }
     else
     {
         this.materialShips = new List<UserShip>();
         this.UpdateUIContents();
     }
 }
 private void OnChooseShip(object o, SelectShipArgs a)
 {
     this.showActionGO.SetActive(true);
     this.showActionGO.GetComponent<AnimatePosition>().StartMove();
     if (a.type == SelectShipType.Close)
     {
         this.isRequestingServer = false;
         this.RefreshDocks();
     }
     else if (a.userShip != null)
     {
         this.StartRepairShipAtDock(a.userShip.id, this.selectedDockIndex);
         TutorialManager.instance.CheckStepFinishAction("RepairSelectShipClick");
     }
 }