private void Update() { if (this.IsResearching()) { this.m_researchProgressBG.gameObject.SetActive(true); float num = 1f - ((!this.IsRespec()) ? ((float)this.GetRemainingResearchTime().TotalSeconds / (float)this.m_garrTalentRec.ResearchDurationSecs) : ((float)this.GetRemainingRespecTime().TotalSeconds / (float)this.m_garrTalentRec.RespecDurationSecs)); this.m_researchProgressFill.fillAmount = num; this.SetVisualState(TalentVisualState.researching); if (!this.m_requestedUpdate && num >= 1f) { this.m_requestedUpdate = true; LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); this.m_shouldShowCheckAnim = true; if (!base.GetComponentInParent <TalentTreePanel>().m_talentNavButton.IsSelected() && !this.m_playedTalentToast) { Main.instance.m_UISound.Play_TalentReadyToast(); this.m_playedTalentToast = true; } } } if (this.m_shouldShowCheckAnim && !this.m_playedShowCheckAnim && base.GetComponentInParent <TalentTreePanel>().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 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); } this.m_glowLoopHandle = null; } UiAnimMgr.instance.PlayAnim("GreenCheckRound", this.m_greenCheckEffectRoot, Vector3.zero, 1.8f, 0f); Main.instance.m_UISound.Play_GreenCheck(); this.m_training = false; this.m_troopOwnedCheckmark.gameObject.SetActive(true); this.m_troopPortraitImage.gameObject.SetActive(true); this.m_timeRemainingText.gameObject.SetActive(false); this.m_troopPortraitImage.material = null; PersistentShipmentData.shipmentDictionary.Remove(shipmentDBID); LegionCompanionWrapper.RequestShipmentTypes((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestShipments((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); } }
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(); } this.m_talentTreePanel.SetNeedsFullInit(); LegionCompanionWrapper.RequestGarrisonData(3); }
private void CreateShipmentResultHandler(LegionCompanionWrapper.CreateShipmentResultEvent eventArgs) { if (eventArgs.Result == 0) { LegionCompanionWrapper.RequestShipmentTypes((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestShipments((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); } if (this.CreateShipmentResultAction != null) { this.CreateShipmentResultAction(eventArgs.Result); } }
private void ExpediteMissionCheatResultHandler(LegionCompanionWrapper.ExpediteMissionCheatResultEvent eventArgs) { if (eventArgs.Result == 0) { Debug.Log("Expedited completion of mission " + eventArgs.MissionRecID); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); } else { Debug.Log(string.Concat(new object[] { "MobileClientExpediteMissionCheatResult: Mission ID ", eventArgs.MissionRecID, " failed with error ", eventArgs.Result })); } }
public void MobileRequestData() { LegionCompanionWrapper.RequestShipmentTypes((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestShipments((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestWorldQuestBounties(10); this.RequestWorldQuests(); LegionCompanionWrapper.RequestFollowerEquipment((int)GarrisonStatus.GarrisonFollowerType); LegionCompanionWrapper.RequestFollowerArmamentsExtended((int)GarrisonStatus.GarrisonFollowerType); LegionCompanionWrapper.RequestFollowerActivationData((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.GetArtifactInfo(); LegionCompanionWrapper.RequestContributionInfo(); LegionCompanionWrapper.RequestAreaPoiInfo(); LegionCompanionWrapper.RequestMaxFollowers((int)GarrisonStatus.GarrisonFollowerType); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestAreaPoiInfo(); if (this.GarrisonDataResetFinishedAction != null) { this.GarrisonDataResetFinishedAction(); } }
private void CompleteMissionResultHandler(LegionCompanionWrapper.GarrisonCompleteMissionResultEvent eventArgs) { PersistentMissionData.UpdateMission(eventArgs.Result.Mission); AdventureMapMissionSite[] componentsInChildren = AdventureMapPanel.instance.m_mapViewContentsRT.GetComponentsInChildren <AdventureMapMissionSite>(true); foreach (AdventureMapMissionSite adventureMapMissionSite in componentsInChildren) { if (!adventureMapMissionSite.m_isStackablePreview) { if (adventureMapMissionSite.GetGarrMissionID() == eventArgs.Result.GarrMissionID) { if (!adventureMapMissionSite.gameObject.activeSelf) { adventureMapMissionSite.gameObject.SetActive(true); } adventureMapMissionSite.HandleCompleteMissionResult(eventArgs.Result.GarrMissionID, eventArgs.Result.BonusRollSucceeded); break; } } } LegionCompanionWrapper.RequestShipmentTypes((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestShipments((int)GarrisonStatus.GarrisonType); LegionCompanionWrapper.RequestFollowerEquipment((int)GarrisonStatus.GarrisonFollowerType); LegionCompanionWrapper.RequestGarrisonData((int)GarrisonStatus.GarrisonType); }