public static void PushAward(TrophyParam trophy) { if (trophy == null || !Object.op_Inequality((Object)NotifyList.mInstance, (Object)null) || !Object.op_Inequality((Object)NotifyList.mInstance.Item_Award, (Object)null)) { return; } for (int index = 0; index < trophy.Items.Length; ++index) { AwardParam awardParam = MonoSingleton <GameManager> .Instance.GetAwardParam(trophy.Items[index].iname); if (awardParam != null) { NotifyListItem notifyListItem = (NotifyListItem)Object.Instantiate <NotifyListItem>((M0)NotifyList.mInstance.Item_Award); notifyListItem.Message.set_text(LocalizedText.Get("sys.AWARD_GET", new object[1] { (object)awardParam.name })); NotifyList.mInstance.Push(notifyListItem); } else { DebugUtility.LogError("Not found trophy award. iname is [ " + trophy.Items[index].iname + " ]"); } } }
private void Start() { if (Object.op_Equality((Object)this.TextMessage, (Object)null)) { ((Behaviour)this).set_enabled(false); } else if (string.IsNullOrEmpty(GlobalVars.SelectedChallengeMissionTrophy)) { ((Behaviour)this).set_enabled(false); } else { this.mTrophy = ChallengeMission.GetTrophy(GlobalVars.SelectedChallengeMissionTrophy); if (this.mTrophy == null) { ((Behaviour)this).set_enabled(false); } else { if (this.mTrophy.IsChallengeMissionRoot) { this.PanelNormal.SetActive(false); this.PanelComplete.SetActive(true); FlowNode_GameObject.ActivateOutputLinks((Component)this, 3); } else { this.PanelNormal.SetActive(true); this.PanelComplete.SetActive(false); FlowNode_GameObject.ActivateOutputLinks((Component)this, 2); } this.UpdateReward(this.mTrophy); } } }
public override void OnActivate(int pinID) { if (pinID != 0 || ((Behaviour)this).get_enabled()) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; TrophyParam trophy = instance.MasterParam.GetTrophy((string)GlobalVars.SelectedTrophy); this.mTrophyParam = trophy; PlayerData player = MonoSingleton <GameManager> .Instance.Player; this.mLevelOld = player.Lv; GlobalVars.PlayerExpOld.Set(player.Exp); if (Network.Mode == Network.EConnectMode.Offline) { instance.Player.DEBUG_ADD_COIN(trophy.Coin, 0, 0); instance.Player.DEBUG_ADD_GOLD(trophy.Gold); ((Behaviour)this).set_enabled(false); this.Success(); } else { this.ExecRequest((WebAPI) new ReqUpdateTrophy(new List <TrophyState>() { instance.Player.GetTrophyCounter(trophy, true) }, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), true)); ((Behaviour)this).set_enabled(true); } }
public static bool CheckRequiredTrophies(GameManager gm, TrophyParam tp, bool is_end_check, bool is_beginner_check = true) { if (is_beginner_check) { TrophyState trophyCounter = gm.Player.GetTrophyCounter(tp, false); if (tp.IsBeginner && !MonoSingleton <GameManager> .Instance.Player.IsBeginner() && (trophyCounter == null || !trophyCounter.IsCompleted)) { return(false); } } bool flag = true; string[] requiredTrophies = tp.RequiredTrophies; for (int index = 0; index < requiredTrophies.Length; ++index) { if (!string.IsNullOrEmpty(requiredTrophies[index])) { TrophyParam trophy = gm.MasterParam.GetTrophy(requiredTrophies[index]); if (trophy != null && is_end_check) { TrophyState trophyCounter = gm.Player.GetTrophyCounter(trophy, false); if (trophyCounter == null || !trophyCounter.IsEnded) { flag = false; break; } } } } return(flag); }
public RewardData(TrophyParam trophy) { this.Exp = trophy.Exp; this.Coin = trophy.Coin; this.Gold = trophy.Gold; this.Stamina = trophy.Stamina; GameManager instance = MonoSingleton <GameManager> .Instance; for (int index = 0; index < trophy.Items.Length; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type RewardData.\u003CRewardData\u003Ec__AnonStorey26E dataCAnonStorey26E = new RewardData.\u003CRewardData\u003Ec__AnonStorey26E(); // ISSUE: reference to a compiler-generated field dataCAnonStorey26E.item = new ItemData(); // ISSUE: reference to a compiler-generated field if (dataCAnonStorey26E.item.Setup(0L, trophy.Items[index].iname, trophy.Items[index].Num)) { // ISSUE: reference to a compiler-generated field this.Items.Add(dataCAnonStorey26E.item); // ISSUE: reference to a compiler-generated field if (dataCAnonStorey26E.item.Param.type != EItemType.Unit) { // ISSUE: reference to a compiler-generated field ItemData itemDataByItemId = instance.Player.FindItemDataByItemID(dataCAnonStorey26E.item.Param.iname); this.ItemsBeforeAmount.Add(itemDataByItemId == null ? 0 : itemDataByItemId.Num); } else { // ISSUE: reference to a compiler-generated method this.ItemsBeforeAmount.Add(instance.Player.Units.Find(new Predicate <UnitData>(dataCAnonStorey26E.\u003C\u003Em__2D7)) == null ? 0 : 1); } } } }
public static TrophyParam[] GetRootTropies() { ChallengeCategoryParam[] challengeCategories = MonoSingleton <GameManager> .Instance.MasterParam.ChallengeCategories; List <TrophyParam> trophyParamList = new List <TrophyParam>(); TrophyParam[] tropies = ChallengeMission.GetTropies(); foreach (TrophyParam trophyParam in tropies) { TrophyParam trophy = trophyParam; if (trophy.IsChallengeMissionRoot) { ChallengeCategoryParam challengeCategoryParam = ((IEnumerable <ChallengeCategoryParam>)challengeCategories).FirstOrDefault <ChallengeCategoryParam>((Func <ChallengeCategoryParam, bool>)(cat => cat.iname == trophy.Category)); if (challengeCategoryParam != null) { if (challengeCategoryParam.begin_at == null || challengeCategoryParam.end_at == null) { trophyParamList.Add(trophy); } else { DateTime serverTime = TimeManager.ServerTime; if (serverTime >= challengeCategoryParam.begin_at.DateTimes && serverTime <= challengeCategoryParam.end_at.DateTimes) { trophyParamList.Add(trophy); } } } } } return(trophyParamList.ToArray()); }
private bool DailyCheck() { TrophyState[] trophyStates = MonoSingleton <GameManager> .Instance.Player.TrophyStates; for (int index1 = 0; index1 < trophyStates.Length; ++index1) { if (trophyStates[index1].Param.Days == 1 && trophyStates[index1].Param.IsShowBadge(trophyStates[index1])) { TrophyParam trophyParam = trophyStates[index1].Param; int hour = TimeManager.ServerTime.Hour; for (int index2 = trophyParam.Objectives.Length - 1; index2 >= 0; --index2) { if (trophyParam.Objectives[index2].type != TrophyConditionTypes.stamina) { return(true); } int num1 = int.Parse(trophyParam.Objectives[index2].sval.Substring(0, 2)); int num2 = int.Parse(trophyParam.Objectives[index2].sval.Substring(3, 2)); if (num1 <= hour && hour < num2) { return(true); } } } } return(false); }
private bool MakeTrophyPlate(TrophyParam trophy, TrophyState st, bool is_achievement) { Transform transform = ((Component)this).get_transform(); if (this.TrophyType == TrophyList.TrophyTypes.Daily) { if (trophy.Days != 1) { return(false); } } else if (this.TrophyType == TrophyList.TrophyTypes.Normal && (trophy.Days != 0 || this.TrophyCategory != trophy.Category)) { return(false); } if (trophy.IsInvisibleVip() || trophy.IsInvisibleCard() || trophy.IsInvisibleStamina() || (trophy.RequiredTrophies != null && !TrophyParam.CheckRequiredTrophies(MonoSingleton <GameManager> .Instance, trophy, true) || !trophy.IsAvailablePeriod(TimeManager.ServerTime, is_achievement))) { return(false); } ListItemEvents listItemEvents1 = !st.IsEnded ? (!Object.op_Inequality((Object)this.Item_FollowTwitter, (Object)null) || !trophy.ContainsCondition(TrophyConditionTypes.followtwitter) ? (!trophy.iname.Contains("DAILY_GLAPVIDEO") ? (!st.IsCompleted ? this.Item_Normal : this.Item_Completed) : this.Item_Normal) : this.Item_FollowTwitter) : this.Item_Ended; if (Object.op_Equality((Object)listItemEvents1, (Object)null) || trophy.iname.Substring(0, 7) == "REVIEW_" && Network.Host.Contains("eval.alchemist.gu3.jp")) { return(false); } ListItemEvents listItemEvents2 = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)listItemEvents1); DataSource.Bind <TrophyParam>(((Component)listItemEvents2).get_gameObject(), trophy); ((Component)listItemEvents2).get_transform().SetParent(transform, false); listItemEvents2.OnOpenDetail = new ListItemEvents.ListItemEvent(this.OnItemDetail); listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnItemSelect); SRPG_Button componentInChildren = (SRPG_Button)((Component)listItemEvents2).GetComponentInChildren <SRPG_Button>(); if (Object.op_Inequality((Object)componentInChildren, (Object)null) && !st.IsEnded) { if (Object.op_Inequality((Object)this.Item_FollowTwitter, (Object)null) && trophy.ContainsCondition(TrophyConditionTypes.followtwitter)) { this.FollowBtnSetting(componentInChildren); } else if (trophy.iname.Contains("DAILY_GLAPVIDEO")) { this.GlobalVideoAdsBtnSetting(componentInChildren); } else if (st.IsCompleted) { this.AchievementBtnSetting(componentInChildren); } else { this.ChallengeBtnSetting(componentInChildren, trophy); } } RewardData data = new RewardData(trophy); DataSource.Bind <RewardData>(((Component)listItemEvents2).get_gameObject(), data); this.AddItem(listItemEvents2); ((Component)listItemEvents2).get_gameObject().SetActive(true); return(true); }
private IEnumerator WaitLoadTexture(TrophyParam trophy) { // ISSUE: object of a compiler-generated type is created return((IEnumerator) new ChallengeMissionReward.\u003CWaitLoadTexture\u003Ec__IteratorA4() { trophy = trophy, \u003C\u0024\u003Etrophy = trophy, \u003C\u003Ef__this = this }); }
private void Refresh(bool fromRefresh) { this.mShowingOverlay = false; bool flag1 = false; TrophyState trophyState = (TrophyState)null; TrophyParam currentRootTrophy = ChallengeMission.GetCurrentRootTrophy(); if (currentRootTrophy == null) { return; } foreach (TrophyParam currentTrophy in ChallengeMission.GetCurrentTrophies(currentRootTrophy)) { TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(currentTrophy); if (!trophyCounter.IsEnded) { if (!trophyCounter.IsCompleted) { ; } DataSource.Bind <TrophyParam>(((Component)this).get_gameObject(), currentTrophy); DataSource.Bind <TrophyState>(((Component)this).get_gameObject(), trophyCounter); trophyState = trophyCounter; flag1 = true; this.RefreshRewardIcon(currentTrophy); break; } } if (!flag1) { this.RefreshRewardIcon(currentRootTrophy); DataSource.Bind <TrophyParam>(((Component)this).get_gameObject(), currentRootTrophy); TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(currentRootTrophy); if (trophyCounter != null) { DataSource.Bind <TrophyState>(((Component)this).get_gameObject(), trophyCounter); } } if (!((Component)this).get_gameObject().get_activeSelf()) { ((Component)this).get_gameObject().SetActive(true); } GameParameter.UpdateAll(((Component)this).get_gameObject()); bool flag2 = !flag1; if (trophyState != null) { flag2 = trophyState.IsCompleted; } if (!Object.op_Inequality((Object)this.ButtonTry, (Object)null) || !Object.op_Inequality((Object)this.ButtonDetail, (Object)null) || (!Object.op_Inequality((Object)this.ButtonReward, (Object)null) || !Object.op_Inequality((Object)this.ButtonHelp, (Object)null))) { return; } ((Component)this.ButtonTry).get_gameObject().SetActive(!flag2); ((Component)this.ButtonDetail).get_gameObject().SetActive(!flag2); ((Component)this.ButtonReward).get_gameObject().SetActive(flag2); ((Component)this.ButtonHelp).get_gameObject().SetActive(!flag2); }
public static TrophyParam GetTopMostPriorityTrophy(ChallengeCategoryParam[] categories) { TrophyParam trophyParam1 = (TrophyParam)null; TrophyParam trophyParam2 = (TrophyParam)null; TrophyParam trophyParam3 = (TrophyParam)null; foreach (ChallengeCategoryParam category in categories) { bool flag = true; TrophyParam currentRootTrophy = ChallengeMission.GetCurrentRootTrophy(category.iname); if (currentRootTrophy != null) { foreach (TrophyParam childeTrophy in ChallengeMission.GetChildeTrophies(currentRootTrophy)) { TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(childeTrophy); if (!trophyCounter.IsEnded) { flag = false; if (trophyCounter.IsCompleted) { if (trophyParam2 == null) { trophyParam2 = childeTrophy; } } else if (trophyParam1 == null) { trophyParam1 = childeTrophy; } } } TrophyState trophyCounter1 = ChallengeMission.GetTrophyCounter(currentRootTrophy); if (!trophyCounter1.IsEnded) { if (flag) { if (trophyParam3 == null) { trophyParam3 = currentRootTrophy; } } else if (trophyCounter1.IsCompleted) { if (trophyParam2 == null) { trophyParam2 = currentRootTrophy; } } else if (trophyParam1 == null) { trophyParam1 = currentRootTrophy; } } } } return(trophyParam3 ?? trophyParam2 ?? trophyParam1); }
private static string GetTopMostPriorityCategory(ChallengeCategoryParam[] categories) { TrophyParam mostPriorityTrophy = ChallengeMission.GetTopMostPriorityTrophy(categories); if (mostPriorityTrophy == null) { return((string)null); } return(mostPriorityTrophy.Category); }
private void Start() { TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null); if (dataOfClass == null || !(dataOfClass.iname == "LOGIN_GLTUTOTIAL_01")) { return; } FlowNode_GameObject.ActivateOutputLinks((Component)this, 1); }
private bool IsNotReceiveRewards(TrophyParam rootTrophy) { foreach (TrophyParam currentTrophy in ChallengeMission.GetCurrentTrophies(rootTrophy)) { TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(currentTrophy); if (trophyCounter.IsCompleted && !trophyCounter.IsEnded) { return(true); } } return(false); }
public bool Deserialize(JSON_TrophyParam json) { if (json == null) { return(false); } if (json.flg_quests == null) { this.RequiredTrophies = new string[0]; } else { this.RequiredTrophies = new string[json.flg_quests.Length]; for (int index = 0; index < json.flg_quests.Length; ++index) { this.RequiredTrophies[index] = json.flg_quests[index]; } } this.Objectives = new TrophyObjective[1]; for (int index = 0; index < 1; ++index) { this.Objectives[index] = new TrophyObjective(); this.Objectives[index].Param = this; this.Objectives[index].index = index; this.Objectives[index].type = (TrophyConditionTypes)json.type; this.Objectives[index].ival = json.ival; if (json.sval != null) { this.Objectives[index].sval = new List <string>((IEnumerable <string>)json.sval); } } this.iname = json.iname; this.Name = json.name; this.Expr = json.expr; this.Gold = json.reward_gold; this.Coin = json.reward_coin; this.Exp = json.reward_exp; this.Stamina = json.reward_stamina; this.ParentTrophy = json.parent_iname; this.help = json.help; if (!string.IsNullOrEmpty(json.category)) { this.category_hash_code = json.category.GetHashCode(); this.is_none_category_hash = false; } this.Category = json.category; this.DispType = (TrophyDispType)json.disp; this.Items = TrophyParam.InitializeItems(json); this.Artifacts = TrophyParam.InitializeArtifacts(json); this.ConceptCards = TrophyParam.InitializeConceptCards(json); return(true); }
private void OnOverItemAmount() { UIUtility.ConfirmBox(LocalizedText.Get("sys.MAILBOX_ITEM_OVER_MSG"), (string)null, (UIUtility.DialogResultEvent)(go => { GameManager instance = MonoSingleton <GameManager> .Instance; TrophyParam trophy = instance.MasterParam.GetTrophy((string)GlobalVars.SelectedTrophy); this.ExecRequest((WebAPI) new ReqUpdateTrophy(new List <TrophyState>() { instance.Player.GetTrophyCounter(trophy, false) }, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), true)); ((Behaviour)this).set_enabled(true); }), (UIUtility.DialogResultEvent)(go => ((Behaviour)this).set_enabled(false)), (GameObject)null, false, -1); }
public static TrophyParam[] GetCurrentTrophies(TrophyParam root) { List <TrophyParam> trophyParamList = new List <TrophyParam>(); foreach (TrophyParam tropy in ChallengeMission.GetTropies()) { if (tropy.IsChallengeMission && root.iname == tropy.ParentTrophy) { trophyParamList.Add(tropy); } } return(trophyParamList.ToArray()); }
private void OnSelectItem(TrophyParam selectTrophy) { if (ChallengeMission.GetTrophyCounter(selectTrophy).IsCompleted) { GlobalVars.SelectedChallengeMissionTrophy = selectTrophy.iname; GlobalVars.SelectedTrophy.Set(selectTrophy.iname); FlowNode_GameObject.ActivateOutputLinks((Component)this, 101); } else { DataSource.Bind <TrophyParam>(((Component)this.DetailWindow).get_gameObject(), selectTrophy); FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); } }
public static void PushTrophy(TrophyParam trophy) { if (trophy == null || !Object.op_Inequality((Object)NotifyList.mInstance, (Object)null) || !Object.op_Inequality((Object)NotifyList.mInstance.Item_Mission, (Object)null)) { return; } NotifyListItem notifyListItem = (NotifyListItem)Object.Instantiate <NotifyListItem>((M0)NotifyList.mInstance.Item_Mission); notifyListItem.Message.set_text(LocalizedText.Get("sys.TRPYCOMP", new object[1] { (object)trophy.Name })); NotifyList.mInstance.Push(notifyListItem); }
private void OnItemDetail(GameObject go) { TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(go, (TrophyParam)null); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.DetailWindow, (UnityEngine.Object)null) || dataOfClass == null) { return; } GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.DetailWindow); DataSource.Bind <TrophyParam>(gameObject, dataOfClass); RewardData data = new RewardData(dataOfClass); DataSource.Bind <RewardData>(gameObject, data); gameObject.SetActive(true); }
public virtual void Start() { if (Object.op_Inequality((Object)this.Item_Complete, (Object)null)) { this.Item_Complete.SetActive(false); } if (Object.op_Inequality((Object)this.Item_Incomplete, (Object)null)) { this.Item_Incomplete.SetActive(false); } TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null); if (dataOfClass == null) { return; } TrophyState trophyCounter = MonoSingleton <GameManager> .Instance.Player.GetTrophyCounter(dataOfClass, false); Transform transform = ((Component)this).get_transform(); for (int index = 0; index < dataOfClass.Objectives.Length; ++index) { TrophyObjective objective = dataOfClass.Objectives[index]; TrophyObjectiveData data = new TrophyObjectiveData(); data.CountMax = objective.RequiredCount; data.Description = objective.GetDescription(); data.Objective = objective; bool flag; if (index < trophyCounter.Count.Length) { data.Count = trophyCounter.Count[index]; flag = objective.RequiredCount <= trophyCounter.Count[index]; } else { flag = false; } GameObject gameObject1 = !flag ? this.Item_Incomplete : this.Item_Complete; if (!Object.op_Equality((Object)gameObject1, (Object)null)) { GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); DataSource.Bind <TrophyObjectiveData>(gameObject2, data); gameObject2.get_transform().SetParent(transform, false); gameObject2.SetActive(true); } } }
public override void OnActivate(int pinID) { if (pinID != 0) { return; } TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null); if (dataOfClass == null || !dataOfClass.Objectives[0].type.IsExtraClear()) { this.toggle.set_isOn(true); this.ActivateOutputLinks(2); } else { this.ExecRequest((WebAPI) new ReqTrophyAchievedQuest(dataOfClass.iname, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); } }
private void OnSelectItem(TrophyParam selectTrophy) { if (ChallengeMission.GetTrophyCounter(selectTrophy).IsCompleted) { GlobalVars.SelectedChallengeMissionTrophy = selectTrophy.iname; GlobalVars.SelectedTrophy.Set(selectTrophy.iname); FlowNode_GameObject.ActivateOutputLinks((Component)this, 101); } else { if ((MonoSingleton <GameManager> .Instance.Player.TutorialFlags & 1L) == 0L) { return; } DataSource.Bind <TrophyParam>(((Component)this.DetailWindow).get_gameObject(), selectTrophy); FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); } }
public RewardData(TrophyParam trophy) { this.Exp = trophy.Exp; this.Coin = trophy.Coin; this.Gold = trophy.Gold; this.Stamina = trophy.Stamina; GameManager instance = MonoSingleton <GameManager> .Instance; foreach (TrophyParam.RewardItem rewardItem in trophy.Items) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type RewardData.\u003CRewardData\u003Ec__AnonStorey377 dataCAnonStorey377 = new RewardData.\u003CRewardData\u003Ec__AnonStorey377(); // ISSUE: reference to a compiler-generated field dataCAnonStorey377.itemData = new ItemData(); // ISSUE: reference to a compiler-generated field if (dataCAnonStorey377.itemData.Setup(0L, rewardItem.iname, rewardItem.Num)) { // ISSUE: reference to a compiler-generated field this.Items.Add(dataCAnonStorey377.itemData); // ISSUE: reference to a compiler-generated field if (dataCAnonStorey377.itemData.Param.type != EItemType.Unit) { // ISSUE: reference to a compiler-generated field ItemData itemDataByItemId = instance.Player.FindItemDataByItemID(dataCAnonStorey377.itemData.Param.iname); this.ItemsBeforeAmount.Add(itemDataByItemId == null ? 0 : itemDataByItemId.Num); } else { // ISSUE: reference to a compiler-generated method this.ItemsBeforeAmount.Add(instance.Player.Units.Find(new Predicate <UnitData>(dataCAnonStorey377.\u003C\u003Em__403)) == null ? 0 : 1); } } } foreach (TrophyParam.RewardItem artifact in trophy.Artifacts) { this.Artifacts.Add(new ArtifactRewardData() { ArtifactParam = instance.MasterParam.GetArtifactParam(artifact.iname), Num = artifact.Num }); } }
private void UpdateTrophyCount(TrophyParam rootTrophy) { TrophyParam[] currentTrophies = ChallengeMission.GetCurrentTrophies(rootTrophy); int num = 0; foreach (TrophyParam trophy in currentTrophies) { TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(trophy); if (trophyCounter.IsCompleted && !trophyCounter.IsEnded) { ++num; } } if (!Object.op_Inequality((Object)this.BadgeCount, (Object)null)) { return; } this.BadgeCount.set_text(num.ToString()); }
private void OnClickHelp() { TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null); if (dataOfClass == null) { return; } if (dataOfClass.help == 0) { string str = LocalizedText.Get("sys.CHALLENGE_HELP_" + dataOfClass.Objectives[0].type.ToString().ToUpper()); FlowNode_Variable.Set(HelpWindow.VAR_NAME_MENU_ID, str); } else { FlowNode_Variable.Set(HelpWindow.VAR_NAME_MENU_ID, dataOfClass.help.ToString()); } FlowNode_GameObject.ActivateOutputLinks((Component)this, 11); this.mShowingOverlay = true; }
private void ChallengeBtnSetting(SRPG_Button btn, TrophyParam trophy) { bool flag = true; switch (trophy.Objectives[0].type) { case TrophyConditionTypes.killenemy: case TrophyConditionTypes.getitem: case TrophyConditionTypes.vip: case TrophyConditionTypes.stamina: case TrophyConditionTypes.card: case TrophyConditionTypes.logincount: case TrophyConditionTypes.childrencomp: case TrophyConditionTypes.dailyall: flag = false; break; } if (trophy.DispType == TrophyDispType.HideChallenge) { flag = false; } ((Component)btn).get_gameObject().SetActive(flag); if (!flag) { VerticalLayoutGroup component = (VerticalLayoutGroup)((Component)((Component)btn).get_transform().get_parent()).GetComponent <VerticalLayoutGroup>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { return; } ((LayoutGroup)component).set_childAlignment((TextAnchor)7); } else { Text componentInChildren = (Text)((Component)((Component)btn).get_transform()).GetComponentInChildren <Text>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null)) { return; } componentInChildren.set_text(LocalizedText.Get("sys.TROPHY_BTN_GO")); } }
public RewardData(TrophyParam trophy) { this.Exp = trophy.Exp; this.Coin = trophy.Coin; this.Gold = trophy.Gold; this.Stamina = trophy.Stamina; GameManager instance = MonoSingleton <GameManager> .Instance; foreach (TrophyParam.RewardItem rewardItem in trophy.Items) { ItemData itemData = new ItemData(); if (itemData.Setup(0L, rewardItem.iname, rewardItem.Num)) { this.Items.Add(itemData); if (itemData.Param.type != EItemType.Unit) { ItemData itemDataByItemId = instance.Player.FindItemDataByItemID(itemData.Param.iname); this.ItemsBeforeAmount.Add(itemDataByItemId == null ? 0 : itemDataByItemId.Num); } else { this.ItemsBeforeAmount.Add(instance.Player.Units.Find((Predicate <UnitData>)(u => u.UnitParam.iname == itemData.ItemID)) == null ? 0 : 1); } } } foreach (TrophyParam.RewardItem artifact in trophy.Artifacts) { this.Artifacts.Add(new ArtifactRewardData() { ArtifactParam = instance.MasterParam.GetArtifactParam(artifact.iname), Num = artifact.Num }); } foreach (TrophyParam.RewardItem conceptCard in trophy.ConceptCards) { this.AddReward(instance.MasterParam.GetConceptCardParam(conceptCard.iname), conceptCard.Num); } }
private void Refresh(bool fromRefresh) { this.mShowingOverlay = false; TrophyParam mostPriorityTrophy = ChallengeMission.GetTopMostPriorityTrophy(); if (mostPriorityTrophy == null) { return; } TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(mostPriorityTrophy); if (!trophyCounter.IsEnded) { DataSource.Bind <TrophyParam>(((Component)this).get_gameObject(), mostPriorityTrophy); DataSource.Bind <TrophyState>(((Component)this).get_gameObject(), trophyCounter); this.RefreshRewardIcon(mostPriorityTrophy); } if (!((Component)this).get_gameObject().get_activeSelf()) { ((Component)this).get_gameObject().SetActive(true); } GameParameter.UpdateAll(((Component)this).get_gameObject()); ChallengeCategoryParam[] challengeCategories = MonoSingleton <GameManager> .Instance.MasterParam.ChallengeCategories; if (challengeCategories != null && challengeCategories.Length > 0) { DataSource.Bind <ChallengeCategoryParam>(((Component)this.HelpIcon).get_gameObject(), ((IEnumerable <ChallengeCategoryParam>)challengeCategories).FirstOrDefault <ChallengeCategoryParam>()); } bool flag = mostPriorityTrophy.IsChallengeMissionRoot || trophyCounter.IsCompleted; if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ButtonTry, (UnityEngine.Object)null) || !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ButtonDetail, (UnityEngine.Object)null) || (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ButtonReward, (UnityEngine.Object)null) || !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ButtonHelp, (UnityEngine.Object)null))) { return; } ((Component)this.ButtonTry).get_gameObject().SetActive(!flag); ((Component)this.ButtonDetail).get_gameObject().SetActive(!flag); ((Component)this.ButtonReward).get_gameObject().SetActive(flag); ((Component)this.ButtonHelp).get_gameObject().SetActive(!flag); }
private void reflectTrophyProgs(JSON_TrophyProgress[] trophy_progs) { if (trophy_progs == null) { return; } Dictionary <int, List <JSON_TrophyProgress> > progs = new Dictionary <int, List <JSON_TrophyProgress> >(); GameManager instance = MonoSingleton <GameManager> .Instance; for (int index = 0; index < trophy_progs.Length; ++index) { JSON_TrophyProgress trophyProg = trophy_progs[index]; if (trophyProg != null) { TrophyParam trophy = instance.MasterParam.GetTrophy(trophyProg.iname); if (trophy == null) { DebugUtility.LogWarning("存在しないミッション:" + trophyProg.iname); } else { if (trophy.Objectives[0].type.IsExtraClear()) { int type = (int)trophy.Objectives[0].type; if (!progs.ContainsKey(type)) { progs[type] = new List <JSON_TrophyProgress>(); } progs[type].Add(trophy_progs[index]); } instance.Player.RegistTrophyStateDictByProg(instance.MasterParam.GetTrophy(trophyProg.iname), trophyProg); } } } instance.Player.CreateInheritingExtraTrophy(progs); }