private void Update() { if (this.IsResearching()) { this.m_researchProgressBG.gameObject.SetActive(true); float num = 1f - ((!this.IsRespec()) ? ((float)this.GetRemainingResearchTime() / (float)this.m_garrTalentRec.ResearchDurationSecs) : ((float)this.GetRemainingRespecTime() / (float)this.m_garrTalentRec.RespecDurationSecs)); this.m_researchProgressFill.fillAmount = num; this.SetVisualState(TalentVisualState.researching); if (!this.m_requestedUpdate && num >= 1f) { this.m_requestedUpdate = true; MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); this.m_shouldShowCheckAnim = true; if (!AllPanels.instance.m_orderHallMultiPanel.m_talentNavButton.IsSelected() && !this.m_playedTalentToast) { Main.instance.m_UISound.Play_TalentReadyToast(); this.m_playedTalentToast = true; } } } if (this.m_shouldShowCheckAnim && !this.m_playedShowCheckAnim && AllPanels.instance.m_orderHallMultiPanel.m_talentNavButton.IsSelected()) { UiAnimMgr.instance.PlayAnim("TalentDoneAnim", base.transform, Vector3.zero, 1f, 0f); Main.instance.m_UISound.Play_TalentReadyCheck(); this.m_shouldShowCheckAnim = false; this.m_playedShowCheckAnim = true; } }
private void Update() { if (this.IsResearching()) { this.m_researchProgressBG.get_gameObject().SetActive(true); float num = 1f - ((!this.IsRespec()) ? ((float)this.GetRemainingResearchTime() / (float)this.m_garrTalentRec.ResearchDurationSecs) : ((float)this.GetRemainingRespecTime() / (float)this.m_garrTalentRec.RespecDurationSecs)); this.m_researchProgressFill.set_fillAmount(num); this.SetVisualState(TalentVisualState.researching); if (!this.m_requestedUpdate && num >= 1f) { this.m_requestedUpdate = true; MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); this.m_shouldShowCheckAnim = true; AutoCenterItem componentInParent = base.get_gameObject().GetComponentInParent <AutoCenterItem>(); if (componentInParent && !componentInParent.IsCentered() && !this.m_playedTalentToast) { Main.instance.m_UISound.Play_TalentReadyToast(); this.m_playedTalentToast = true; } } } if (this.m_shouldShowCheckAnim && !this.m_playedShowCheckAnim) { AutoCenterItem componentInParent2 = base.get_gameObject().GetComponentInParent <AutoCenterItem>(); if (componentInParent2 && componentInParent2.IsCentered()) { UiAnimMgr.instance.PlayAnim("TalentDoneAnim", base.get_transform(), Vector3.get_zero(), 1f, 0f); Main.instance.m_UISound.Play_TalentReadyCheck(); this.m_shouldShowCheckAnim = false; this.m_playedShowCheckAnim = true; } } }
private void HandleCollectTroopResult(SHIPMENT_RESULT result, ulong shipmentDBID) { if (result == SHIPMENT_RESULT.SUCCESS && shipmentDBID == this.m_shipmentDBID) { if (this.m_glowLoopHandle != null) { UiAnimation anim = this.m_glowLoopHandle.GetAnim(); if (anim != null) { anim.Stop(0.5f); } } UiAnimMgr.instance.PlayAnim("GreenCheck", this.m_greenCheckEffectRoot, Vector3.get_zero(), 1.8f, 0f); Main.instance.m_UISound.Play_GreenCheck(); this.m_training = false; this.m_troopBuildProgressRing.get_gameObject().SetActive(false); this.m_troopBuildProgressFill.get_gameObject().SetActive(false); this.m_troopOwnedCheckmark.get_gameObject().SetActive(true); this.m_troopPortraitImage.get_gameObject().SetActive(true); this.m_timeRemainingText.get_gameObject().SetActive(false); this.m_troopPortraitImage.set_material(null); PersistentShipmentData.shipmentDictionary.Remove(shipmentDBID); MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); } }
public void MobileRequestData() { MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); MobilePlayerRequestShipmentTypes obj = new MobilePlayerRequestShipmentTypes(); Login.instance.SendToMobileServer(obj); MobilePlayerRequestShipments obj2 = new MobilePlayerRequestShipments(); Login.instance.SendToMobileServer(obj2); this.RequestWorldQuests(); MobilePlayerFollowerEquipmentRequest mobilePlayerFollowerEquipmentRequest = new MobilePlayerFollowerEquipmentRequest(); mobilePlayerFollowerEquipmentRequest.GarrFollowerTypeID = 4; Login.instance.SendToMobileServer(mobilePlayerFollowerEquipmentRequest); MobilePlayerFollowerArmamentsRequest mobilePlayerFollowerArmamentsRequest = new MobilePlayerFollowerArmamentsRequest(); mobilePlayerFollowerArmamentsRequest.GarrFollowerTypeID = 4; Login.instance.SendToMobileServer(mobilePlayerFollowerArmamentsRequest); MobilePlayerWorldQuestBountiesRequest obj3 = new MobilePlayerWorldQuestBountiesRequest(); Login.instance.SendToMobileServer(obj3); MobilePlayerFollowerActivationDataRequest mobilePlayerFollowerActivationDataRequest = new MobilePlayerFollowerActivationDataRequest(); mobilePlayerFollowerActivationDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerFollowerActivationDataRequest); MobilePlayerGetArtifactInfo obj4 = new MobilePlayerGetArtifactInfo(); Login.instance.SendToMobileServer(obj4); }
private void MobileClientCompleteMissionResultHandler(MobileClientCompleteMissionResult msg) { Debug.Log(string.Concat(new object[] { "CompleteMissionResult: ID=", msg.GarrMissionID, ", result=", msg.Result, " success chance was ", msg.MissionSuccessChance })); PersistentMissionData.UpdateMission(msg.Mission); if (this.CompleteMissionResultAction != null) { this.CompleteMissionResultAction.Invoke(msg.GarrMissionID, msg.Result, (int)msg.MissionSuccessChance); } MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); MobilePlayerRequestShipmentTypes obj = new MobilePlayerRequestShipmentTypes(); Login.instance.SendToMobileServer(obj); MobilePlayerRequestShipments obj2 = new MobilePlayerRequestShipments(); Login.instance.SendToMobileServer(obj2); MobilePlayerFollowerEquipmentRequest mobilePlayerFollowerEquipmentRequest = new MobilePlayerFollowerEquipmentRequest(); mobilePlayerFollowerEquipmentRequest.GarrFollowerTypeID = 4; Login.instance.SendToMobileServer(mobilePlayerFollowerEquipmentRequest); }
private void HandleResearchGarrisonTalentResult(int garrTalentID, int result) { if (this.m_talentButtonLeft.GetTalentID() != garrTalentID && this.m_talentButtonRight.GetTalentID() != garrTalentID) { return; } if (result == 0) { Main.instance.m_UISound.Play_BeginResearch(); } MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); }
private void MobileClientCreateShipmentResultHandler(MobileClientCreateShipmentResult msg) { GARRISON_RESULT result = (GARRISON_RESULT)msg.Result; if (result != GARRISON_RESULT.SUCCESS) { AllPopups.instance.ShowGenericPopup(StaticDB.GetString("SHIPMENT_CREATION_FAILED", null), result.ToString()); } if (this.CreateShipmentResultAction != null) { this.CreateShipmentResultAction.Invoke(msg.Result); } if (result == GARRISON_RESULT.SUCCESS) { MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); } }
private void MobileClientExpediteMissionCheatResultHandler(MobileClientExpediteMissionCheatResult msg) { if (msg.Result == 0) { Debug.Log("Expedited completion of mission " + msg.MissionRecID); MobilePlayerGarrisonDataRequest mobilePlayerGarrisonDataRequest = new MobilePlayerGarrisonDataRequest(); mobilePlayerGarrisonDataRequest.GarrTypeID = 3; Login.instance.SendToMobileServer(mobilePlayerGarrisonDataRequest); } else { Debug.Log(string.Concat(new object[] { "MobileClientExpediteMissionCheatResult: Mission ID ", msg.MissionRecID, " failed with error ", msg.Result })); } }