public FleetShipChangeRequest ToggleShipLock(UserShip userShip)
    {
        FleetShipChangeRequest component = new FleetShipChangeRequest();

        component.ToggleLockStatus(userShip);
        return(component);
    }
    public FleetShipChangeRequest ChangeFleetShip(int fleetId, int shipId, int index)
    {
        FleetShipChangeRequest component = new FleetShipChangeRequest();

        component.ChangeShip(fleetId, shipId, index);
        return(component);
    }
    public FleetShipChangeRequest ChangeFleetName(int fleetId, string name)
    {
        FleetShipChangeRequest component = new FleetShipChangeRequest();

        component.ChangeFleetName(fleetId, name);
        return(component);
    }
 private void ReqWedding()
 {
     if (!this.isRequestingServer)
     {
         this.isRequestingServer = true;
         this.reqToggleLock = ServerRequestManager.instance.GetWedding(this.userShip);
         this.reqToggleLock.WeddingSuccess += new EventHandler<EventArgs>(this.OnWeddingSuccess);
         this.reqToggleLock.WeddingFail += new EventHandler<EventArgs>(this.OnWeddingFail);
     }
 }
 public FleetShipChangeRequest ChangeFleetShip(int fleetId, int shipId, int index)
 {
     FleetShipChangeRequest component = new FleetShipChangeRequest();
     component.ChangeShip(fleetId, shipId, index);
     return component;
 }
 public FleetShipChangeRequest ChangeFleetName(int fleetId, string name)
 {
     FleetShipChangeRequest component = new FleetShipChangeRequest();
     component.ChangeFleetName(fleetId, name);
     return component;
 }
 public FleetShipChangeRequest ToggleShipLock(UserShip userShip)
 {
     FleetShipChangeRequest component = new FleetShipChangeRequest();
     component.ToggleLockStatus(userShip);
     return component;
 }
 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);
         }
     }
 }
 public void ChangeFleetName()
 {
     string text = this.textInput.Text;
     this.changeFleetNameRequest = ServerRequestManager.instance.ChangeFleetName(this.selectedFleet.id, text);
     this.changeFleetNameRequest.UpdateFleetSuccess += new EventHandler<EventArgs>(this.OnChangeNameSuccess);
 }
 private void ReqToggleLock()
 {
     if (!this.isRequestingServer)
     {
         this.isRequestingServer = true;
         this.reqToggleLock = ServerRequestManager.instance.ToggleShipLock(this.userShip);
         this.reqToggleLock.ToggleLockSuccess += new EventHandler<EventArgs>(this.OnToggleSuccess);
         this.reqToggleLock.ToggleLockFail += new EventHandler<EventArgs>(this.OnToggleFail);
     }
 }