public void SetupTile(Achievement quest) { quest.AckCurrentProgressAndRewardNotices(); this.m_goldAmount.gameObject.SetActive(false); this.m_quest = quest; if (this.m_quest.MaxProgress > 1) { this.m_progressText.Text = this.m_quest.Progress + "/" + this.m_quest.MaxProgress; this.m_progress.SetActive(true); } else { this.m_progressText.Text = string.Empty; this.m_progress.SetActive(false); } bool flag = this.m_questName.isHidden(); if (flag) { this.m_questName.Show(); } this.m_questName.Text = quest.Name; TransformUtil.SetPoint(this.m_nameLine, Anchor.TOP, this.m_questName, Anchor.BOTTOM); this.m_nameLine.transform.localPosition = new Vector3(this.m_nameLine.transform.localPosition.x, this.m_nameLine.transform.localPosition.y, this.m_nameLine.transform.localPosition.z - this.m_questName.GetLocalizationPositionOffset().y); if (flag) { this.m_questName.Hide(); } this.m_requirement.Text = quest.Description; this.LoadCenterImage(); }
public static void ShowQuestToast(DelOnCloseQuestToast onClosedCallback, object callbackUserData, bool updateCacheValues, Achievement quest, bool fullscreenEffects) { quest.AckCurrentProgressAndRewardNotices(); if (quest.ID != 0x38) { m_showFullscreenEffects = fullscreenEffects; m_questActive = true; ToastCallbackData callbackData = new ToastCallbackData { m_toastRewards = quest.Rewards, m_toastName = quest.Name, m_toastDescription = quest.Description, m_onCloseCallback = onClosedCallback, m_onCloseCallbackData = callbackUserData, m_updateCacheValues = updateCacheValues }; AssetLoader.Get().LoadActor("QuestToast", true, new AssetLoader.GameObjectCallback(QuestToast.PositionActor), callbackData, false); SoundManager.Get().LoadAndPlay("Quest_Complete_Jingle"); SoundManager.Get().LoadAndPlay("quest_complete_pop_up"); SoundManager.Get().LoadAndPlay("tavern_crowd_play_reaction_positive_random"); } }