private List <GameObject> CreateInstances() { if (this.category_data == null || this.category_data.Trophies.Count <= 0) { return((List <GameObject>)null); } List <GameObject> gameObjectList = new List <GameObject>(); int createChildCount = this.CREATE_CHILD_COUNT; for (int index = 0; index < this.category_data.Trophies.Count && createChildCount != 0; ++index) { ListItemEvents listItemEvents = this.trophy_list.MakeTrophyPlate(this.category_data.Trophies[index], this.category_data.Trophies[index].IsCompleted); if (Object.op_Inequality((Object)listItemEvents, (Object)null)) { --createChildCount; this.AddItem(listItemEvents); gameObjectList.Add(((Component)listItemEvents).get_gameObject()); listItemEvents.DisplayRectMergin = new Vector2(0.0f, this.view_mergin); listItemEvents.ParentScale = Vector2.op_Implicit(((Transform)this.grid_rect).get_localScale()); if (MonoSingleton <GameManager> .Instance.IsTutorial() && MonoSingleton <GameManager> .Instance.GetNextTutorialStep() == "ShowMissionFilter" && this.category_data.Trophies[index].Param.iname == "LOGIN_GLTUTOTIAL_01") { MonoSingleton <GameManager> .Instance.CompleteTutorialStep(); SGHighlightObject.Instance().highlightedObject = ((Component)listItemEvents).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.004", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, true, false, false); } } } return(gameObjectList); }
private void CreateHighlightObject() { if (!Object.op_Equality((Object)FlowNode_HighlightObject.highlight, (Object)null)) { return; } GameObject gameObject1 = AssetManager.Load <GameObject>("SGDevelopment/Tutorial/Tutorial_Guidance"); if (Object.op_Equality((Object)gameObject1, (Object)null)) { DebugUtility.LogError("Failed to load"); } else { GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); RectTransform component1 = (RectTransform)gameObject1.GetComponent <RectTransform>(); if (Object.op_Inequality((Object)component1, (Object)null) && Object.op_Inequality((Object)gameObject1.GetComponent <Canvas>(), (Object)null)) { RectTransform component2 = (RectTransform)gameObject2.GetComponent <RectTransform>(); component2.set_anchorMax(component1.get_anchorMax()); component2.set_anchorMin(component1.get_anchorMin()); component2.set_anchoredPosition(component1.get_anchoredPosition()); component2.set_sizeDelta(component1.get_sizeDelta()); } FlowNode_HighlightObject.highlight = (SGHighlightObject)gameObject2.GetComponent <SGHighlightObject>(); DebugUtility.LogWarning("highlight:" + (object)FlowNode_HighlightObject.highlight); } }
private void Awake() { this.isHighlighted = false; this.uiCam = (Camera)null; SGHighlightObject.instance = this; this.canvas = (Canvas)((Component)this).get_gameObject().GetComponent <Canvas>(); // ISSUE: method pointer this.clickAction = new UnityAction((object)this, __methodptr(OnClick)); ((UnityEvent)((Button)((Component)this.canvas).get_gameObject().AddComponent <Button>()).get_onClick()).AddListener(this.clickAction); if (Object.op_Inequality((Object)this.nextButton, (Object)null)) { ((UnityEvent)this.nextButton.get_onClick()).AddListener(this.clickAction); } HoldGesture holdGesture = (HoldGesture)((Component)this.canvas).get_gameObject().AddComponent <HoldGesture>(); if (!Object.op_Inequality((Object)holdGesture, (Object)null)) { return; } // ISSUE: method pointer UnityAction unityAction1 = new UnityAction((object)this, __methodptr(OnDown)); holdGesture.OnHoldStart = new UnityEvent(); holdGesture.OnHoldStart.AddListener(unityAction1); // ISSUE: method pointer UnityAction unityAction2 = new UnityAction((object)this, __methodptr(OnUp)); holdGesture.OnHoldEnd = new UnityEvent(); holdGesture.OnHoldEnd.AddListener(unityAction2); }
public override void OnActivate(int pinID) { switch (pinID) { case 10: this.CreateHighlightObject(); FlowNode_HighlightObject.highlight.highlightedObject = this.HighlightTarget; FlowNode_HighlightObject.highlight.Highlight(this.UnitID, this.TextID, (SGHighlightObject.OnActivateCallback)(() => this.ActivateOutputLinks(2)), this.dialogBubbleAnchor, this.portraitvisible, this.interactable, this.smallhighlight); break; case 11: if (Object.op_Inequality((Object)FlowNode_HighlightObject.highlight, (Object)null)) { Object.Destroy((Object)((Component)FlowNode_HighlightObject.highlight).get_gameObject()); FlowNode_HighlightObject.highlight = (SGHighlightObject)null; break; } break; case 12: if (Object.op_Inequality((Object)FlowNode_HighlightObject.highlight, (Object)null)) { Object.Destroy((Object)((Component)FlowNode_HighlightObject.highlight).get_gameObject()); FlowNode_HighlightObject.highlight = (SGHighlightObject)null; } this.CreateHighlightObject(); break; } this.ActivateOutputLinks(1); }
private void SGActivated(int pinID) { if (pinID != 999 || !this.HasStarted) { return; } using (List <GameObject> .Enumerator enumerator = this.mItems.GetEnumerator()) { while (enumerator.MoveNext()) { GameObject current = enumerator.Current; if (current.GetActive() && ((DataSource)current.GetComponent <DataSource>()).FindDataOfClass <UnitData>(new UnitData()).UnitID == "UN_V2_LOGI") { SGHighlightObject.Instance().highlightedObject = current.get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.017", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, true, false, false); } } } }
private void RefreshItems() { Transform transform = ((Component)this).get_transform(); this.ClearItems(); if (Object.op_Equality((Object)this.ItemTemplate, (Object)null)) { return; } if (Object.op_Inequality((Object)this.AreaInfo, (Object)null) && !string.IsNullOrEmpty((string)GlobalVars.SelectedSection)) { DataSource.Bind <ChapterParam>(this.AreaInfo, MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedSection)); } QuestParam[] array = this.mQuests.ToArray(); if (this.Descending) { Array.Reverse((Array)array); } bool flag = false; GameManager instance = MonoSingleton <GameManager> .Instance; if (this.isTriggeredRefresh && (instance.Player.TutorialFlags & 1L) == 0L) { flag = instance.GetNextTutorialStep() == "ShowQuestItem"; } for (int index = 0; index < array.Length; ++index) { QuestParam questParam = array[index]; if (questParam.difficulty == this.mDifficultyFilter) { GameObject gameObject1 = (GameObject)null; if (!string.IsNullOrEmpty(questParam.ItemLayout)) { gameObject1 = this.LoadQuestListItem(questParam); } if (Object.op_Equality((Object)gameObject1, (Object)null)) { gameObject1 = questParam.difficulty != QuestDifficulties.Elite ? (!questParam.IsScenario ? (!Object.op_Inequality((Object)this.SpecialQuestItem, (Object)null) || !this.HasEliteQuest(questParam) ? (questParam.GetChallangeLimit() <= 0 ? this.ItemTemplate : this.EventTemplateLimit) : this.SpecialQuestItem) : this.ScenarioQuestItem) : (!questParam.CheckEnableChallange() ? this.EliteQuestDisAbleItem : this.EliteQuestItem); } if (!Object.op_Equality((Object)gameObject1, (Object)null)) { GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); ((Object)gameObject2).set_hideFlags((HideFlags)52); DataSource.Bind <QuestParam>(gameObject2, questParam); QuestCampaignData[] questCampaigns = MonoSingleton <GameManager> .Instance.FindQuestCampaigns(questParam); DataSource.Bind <QuestCampaignData[]>(gameObject2, questCampaigns.Length != 0 ? questCampaigns : (QuestCampaignData[])null); ListItemEvents component = (ListItemEvents)gameObject2.GetComponent <ListItemEvents>(); component.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelectItem); component.OnOpenDetail = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail); component.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail); gameObject2.get_transform().SetParent(transform, false); gameObject2.get_gameObject().SetActive(true); this.AddItem(component); if (flag && questParam.iname == "QE_ST_NO_010001") { SGHighlightObject.Instance().highlightedObject = ((Component)component).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.034", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomRight, true, false, false); component.OnOpenDetail = (ListItemEvents.ListItemEvent)null; } } } } }
public virtual void Process() { this.IsHandling = false; if (!((Behaviour)this).get_enabled()) { return; } if (this.UseFakeInput()) { this.FakeTouches(); } else { this.ProcessTouchEvents(); } if (this.IsHandling || !Input.GetKeyDown((KeyCode)27) || !Object.op_Equality((Object)SGHighlightObject.Instance(), (Object)null)) { return; } BackHandler.Invoke(); Input.ResetInputAxes(); }
private void OnSelectAbility(AbilityData ability) { if (this.OnCommandSelect == null || MonoSingleton <GameManager> .Instance.IsTutorial() && Object.op_Inequality((Object)SGHighlightObject.Instance(), (Object)null) && ability.AbilityID != "AB_SEI_LOWER") { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Ability, (object)ability); }
private void Start() { if (Object.op_Inequality((Object)this.MoveButton, (Object)null)) { this.SetButtonEvent(this.MoveButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Move, (object)0); })); } if (Object.op_Inequality((Object)this.AttackButton, (Object)null)) { this.SetButtonEvent(this.AttackButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null || MonoSingleton <GameManager> .Instance.IsTutorial() && !Object.op_Equality((Object)SGHighlightObject.Instance(), (Object)null)) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Attack, (object)0); })); } if (Object.op_Inequality((Object)this.RenkeiButton, (Object)null)) { this.SetButtonEvent(this.RenkeiButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Attack, (object)0); })); } if (Object.op_Inequality((Object)this.ItemButton, (Object)null)) { this.SetButtonEvent(this.ItemButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Item, (object)0); })); } if (Object.op_Inequality((Object)this.MapButton, (Object)null)) { this.SetButtonEvent(this.MapButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Map, (object)0); })); } if (Object.op_Inequality((Object)this.EndButton, (Object)null)) { this.SetButtonEvent(this.EndButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.End, (object)0); })); } if (Object.op_Inequality((Object)this.AbilityButton, (Object)null)) { this.AbilityButton.SetActive(false); } if (Object.op_Inequality((Object)this.GridEventButton, (Object)null)) { this.SetButtonEvent(this.GridEventButton, (UnitCommands.ClickEvent)(() => { if (this.OnCommandSelect == null) { return; } this.OnCommandSelect(UnitCommands.CommandTypes.Gimmick, (object)0); })); } if (Object.op_Inequality((Object)this.OKButton, (Object)null)) { this.SetButtonEvent(this.OKButton, (UnitCommands.ClickEvent)(() => { if (this.OnYesNoSelect == null) { return; } this.OnYesNoSelect(true); })); } if (Object.op_Inequality((Object)this.CancelButton, (Object)null)) { this.SetButtonEvent(this.CancelButton, (UnitCommands.ClickEvent)(() => { if (this.OnYesNoSelect == null) { return; } this.OnYesNoSelect(false); })); } if (!Object.op_Inequality((Object)this.ExitMapButton, (Object)null)) { return; } this.SetButtonEvent(this.ExitMapButton, (UnitCommands.ClickEvent)(() => { if (this.OnMapExitSelect == null) { return; } this.OnMapExitSelect(); })); }
public void Refresh() { this.DestroyItems(); if (Object.op_Equality((Object)this.ItemTemplate, (Object)null)) { Debug.LogError((object)"ItemTemplate が未設定です。"); } else { AbilityData dataOfClass = DataSource.FindDataOfClass <AbilityData>(((Component)this).get_gameObject(), (AbilityData)null); if (dataOfClass == null) { Debug.LogWarning((object)"AbilityData を参照できません。"); } else { this.isCommandTutorial = false; GameManager instance = MonoSingleton <GameManager> .Instance; if ((instance.Player.TutorialFlags & 1L) == 0L && (instance.GetNextTutorialStep() == "ShowAbilityCommand" || instance.GetNextTutorialStep() == "ShowMACommand")) { instance.CompleteTutorialStep(); this.isCommandTutorial = true; } this.ScrollViewRect.set_normalizedPosition(new Vector2(0.5f, 1f)); GameParameter.UpdateAll(((Component)this).get_gameObject()); Transform parent = ((Component)this.ItemTemplate).get_transform().get_parent(); for (int index = 0; index < dataOfClass.Skills.Count; ++index) { ListItemEvents listItemEvents = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)this.ItemTemplate); ((Component)listItemEvents).get_transform().SetParent(parent, false); this.mItems.Add(listItemEvents); SkillData skill = dataOfClass.Skills[index]; DataSource.Bind <SkillData>(((Component)listItemEvents).get_gameObject(), skill); DataSource.Bind <Unit>(((Component)listItemEvents).get_gameObject(), this.mUnit); ((Component)listItemEvents).get_gameObject().SetActive(true); listItemEvents.OnSelect = (ListItemEvents.ListItemEvent)(go => this.SelectSkill(DataSource.FindDataOfClass <SkillData>(go, (SkillData)null))); Selectable selectable = (Selectable)((Component)listItemEvents).GetComponentInChildren <Selectable>(); if (Object.op_Equality((Object)selectable, (Object)null)) { selectable = (Selectable)((Component)listItemEvents).GetComponent <Selectable>(); } if (Object.op_Inequality((Object)selectable, (Object)null)) { selectable.set_interactable(this.mUnit.CheckEnableUseSkill(skill, false)); if (selectable.get_interactable()) { selectable.set_interactable(this.mUnit.IsUseSkillCollabo(skill, true)); } ((Behaviour)selectable).set_enabled(!((Behaviour)selectable).get_enabled()); ((Behaviour)selectable).set_enabled(!((Behaviour)selectable).get_enabled()); } UnitAbilitySkillListItem component = (UnitAbilitySkillListItem)((Component)listItemEvents).get_gameObject().GetComponent <UnitAbilitySkillListItem>(); if (Object.op_Inequality((Object)component, (Object)null)) { bool noLimit = !this.mUnit.CheckEnableSkillUseCount(skill); component.SetSkillCount((int)this.mUnit.GetSkillUseCount(skill), (int)this.mUnit.GetSkillUseCountMax(skill), noLimit); component.SetCastSpeed(skill.CastSpeed); } if (this.isCommandTutorial) { if (skill.SkillID == "SK_SEI_SWORD_CRASH") { SGHighlightObject.Instance().highlightedObject = ((Component)listItemEvents).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_0.005", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.TopLeft, false, false, false); } else if (skill.SkillID == "SK_SEI_SHINING_CROSS_TUTORIAL") { SGHighlightObject.Instance().highlightedObject = ((Component)listItemEvents).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_0.009", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, false, false, false); } } } } } }
public override void UpdateValue() { GameSettings instance = GameSettings.Instance; UnitData instanceData = this.GetInstanceData(); if (Object.op_Inequality((Object)this.Icon, (Object)null)) { MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.Icon, instanceData == null?(string)null : AssetPath.UnitSkinIconSmall(instanceData.UnitParam, instanceData.GetSelectedSkin(-1), instanceData.CurrentJobId)); } if (Object.op_Inequality((Object)this.LvParent, (Object)null)) { this.LvParent.SetActive(this.mIsLvActive); } if (Object.op_Inequality((Object)this.Level, (Object)null)) { if (instanceData != null) { this.Level.set_text(instanceData.Lv.ToString()); ((Component)this.Level).get_gameObject().SetActive(true); } else { ((Component)this.Level).get_gameObject().SetActive(false); } } if (Object.op_Inequality((Object)this.Rarity, (Object)null) && Object.op_Inequality((Object)instance, (Object)null) && instance.UnitIcon_Rarity.Length > 0) { if (instanceData != null) { int index = 0; if (instanceData.CurrentJob != null) { index = Mathf.Clamp(instanceData.Rarity, 0, instance.UnitIcon_Rarity.Length - 1); } this.Rarity.set_sprite(instance.UnitIcon_Rarity[index]); } else { this.Rarity.set_sprite((Sprite)null); } } if (Object.op_Inequality((Object)this.Frame, (Object)null) && Object.op_Inequality((Object)instance, (Object)null) && instance.UnitIcon_Frames.Length > 0) { if (instanceData != null) { int index = 0; if (instanceData.CurrentJob != null) { index = Mathf.Clamp(instanceData.CurrentJob.Rank, 0, instance.UnitIcon_Frames.Length - 1); } this.Frame.set_sprite(instance.UnitIcon_Frames[index]); } else { this.Frame.set_sprite((Sprite)null); } } if (Object.op_Inequality((Object)this.Element, (Object)null) && Object.op_Inequality((Object)instance, (Object)null)) { if (instanceData != null && EElement.None <= instanceData.Element && instanceData.Element < (EElement)instance.Elements_IconSmall.Length) { this.Element.set_sprite(instance.Elements_IconSmall[(int)instanceData.Element]); } else { this.Element.set_sprite((Sprite)null); } } if (Object.op_Inequality((Object)this.Job, (Object)null)) { JobParam job = (JobParam)null; if (instanceData != null && instanceData.CurrentJob != null) { job = instanceData.CurrentJob.Param; } MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.Job, job == null?(string)null : AssetPath.JobIconSmall(job)); } if (!MonoSingleton <GameManager> .Instance.IsTutorial() || instanceData == null || (!(MonoSingleton <GameManager> .Instance.GetNextTutorialStep() == "ShowUnitList") || !(instanceData.UnitID == "UN_V2_LOGI"))) { return; } SGHighlightObject.Instance().highlightedObject = ((Component)this).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.017", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, true, false, false); }
private void RefreshTrophyRecord() { if (!this.Trophy_Window.TrophyRecordDatas.ContainsKey(this.TrophyCategory)) { return; } List <TrophyCategoryData> trophyRecordData = this.Trophy_Window.TrophyRecordDatas[this.TrophyCategory]; if (trophyRecordData == null || trophyRecordData.Count <= 0) { return; } int num = 50; Dictionary <int, TrophyRecordPullView> dictionary = new Dictionary <int, TrophyRecordPullView>(); this.child_pull_viewes.Clear(); for (int index = 0; index < trophyRecordData.Count && num != 0; ++index) { if (!dictionary.ContainsKey(trophyRecordData[index].Param.hash_code)) { if (!trophyRecordData[index].Param.IsNotPull) { TrophyRecordPullView trophyRecordPullView = this.MakeTrophyCategory(trophyRecordData[index].Param.name); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)trophyRecordPullView, (UnityEngine.Object)null)) { --num; trophyRecordPullView.Setup(dictionary.Count, this); dictionary.Add(trophyRecordData[index].Param.hash_code, trophyRecordPullView); this.child_pull_viewes.Add(trophyRecordPullView); this.AddItem((ListItemEvents)((Component)trophyRecordPullView).GetComponent <ListItemEvents>()); if (MonoSingleton <GameManager> .Instance.IsTutorial() && MonoSingleton <GameManager> .Instance.GetNextTutorialStep() == "ShowMissionFilter") { if (trophyRecordData[index].Param.iname == "BEGINNER_MISSIONS") { SGHighlightObject.Instance().highlightedObject = ((Component)trophyRecordPullView).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.003b", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, true, false, false); } else if (trophyRecordData[index].Param.iname == "PLAYER_LEVEL") { SGHighlightObject.Instance().highlightedObject = ((Component)this.trophy_window.TrophyTab[5]).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.003c", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomLeft, true, false, false); } } } } else { continue; } } dictionary[trophyRecordData[index].Param.hash_code].SetCategoryData(trophyRecordData[index]); if (dictionary.Count >= 50) { break; } } this.child_plates.Clear(); for (int index1 = 0; index1 < trophyRecordData.Count && num != 0; ++index1) { if (trophyRecordData[index1].Param.IsNotPull) { for (int index2 = 0; index2 < trophyRecordData[index1].Trophies.Count; ++index2) { ListItemEvents listItemEvents = this.MakeTrophyPlate(trophyRecordData[index1].Trophies[index2], trophyRecordData[index1].Trophies[index2].IsCompleted); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)listItemEvents, (UnityEngine.Object)null)) { this.child_plates.Add(DataSource.FindDataOfClass <TrophyParam>(((Component)listItemEvents).get_gameObject(), (TrophyParam)null)); this.AddItem(listItemEvents); --num; } } } } using (Dictionary <int, TrophyRecordPullView> .KeyCollection.Enumerator enumerator = dictionary.Keys.GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.Current; dictionary[current].RefreshDisplayParam(); } } ((Component)this.view_port_handle).get_transform().SetAsLastSibling(); }
private void OnSelectAbility(AbilityData ability) { if (this.OnCommandSelect == null) { return; } if (MonoSingleton <GameManager> .Instance.IsTutorial() && UnityEngine.Object.op_Inequality((UnityEngine.Object)SGHighlightObject.Instance(), (UnityEngine.Object)null)) { string nextTutorialStep = MonoSingleton <GameManager> .Instance.GetNextTutorialStep(); if (nextTutorialStep == "ShowAbilityCommand" && ability.AbilityID != "AB_SEI_LOWER" || nextTutorialStep == "ShowMACommand" && ability.AbilityID != "AB_SEI_SHINING_CROSS_TUTORIAL") { return; } } this.OnCommandSelect(UnitCommands.CommandTypes.Ability, (object)ability); }
public void DisplaySlotType(EAbilitySlot slotType, bool hideEquipped = false) { this.mLastDisplayMode = UnitAbilityList.RefreshTypes.DisplayAll; this.mLastDisplaySlot = slotType; for (int index = 0; index < this.mItems.Count; ++index) { Object.Destroy((Object)((Component)this.mItems[index]).get_gameObject()); } this.mItems.Clear(); if (this.Unit == null) { this.Unit = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); } if (this.Unit == null) { return; } List <AbilityData> learnedAbilities = this.Unit.GetAllLearnedAbilities(); Transform transform1 = ((Component)this).get_transform(); bool flag1 = false; GameManager instance = MonoSingleton <GameManager> .Instance; if ((instance.Player.TutorialFlags & 1L) == 0L && instance.GetNextTutorialStep() == "ShowAbilityTab") { instance.CompleteTutorialStep(); if (instance.GetNextTutorialStep() == "ShowAbilityLvUp") { flag1 = true; } } if (Object.op_Inequality((Object)this.Item_Normal, (Object)null)) { for (int index1 = 0; index1 < learnedAbilities.Count; ++index1) { AbilityData data = learnedAbilities[index1]; if ((slotType == ~EAbilitySlot.Action || slotType == data.SlotType) && (this.ShowFixedAbilities || !data.Param.is_fixed) && (this.ShowMasterAbilities || !((string)this.Unit.UnitParam.ability == data.AbilityID) && !this.Unit.IsQuestClearUnlocked(data.Param.iname, QuestClearUnlockUnitDataParam.EUnlockTypes.MasterAbility))) { if (hideEquipped) { bool flag2 = false; for (int index2 = 0; index2 < this.Unit.CurrentJob.AbilitySlots.Length; ++index2) { if (this.Unit.CurrentJob.AbilitySlots[index2] == data.UniqueID) { flag2 = true; break; } } if (flag2) { continue; } } UnitAbilityListItemEvents abilityListItemEvents = (UnitAbilityListItemEvents)Object.Instantiate <UnitAbilityListItemEvents>((M0)this.Item_Normal); this.mItems.Add(abilityListItemEvents); DataSource.Bind <AbilityData>(((Component)abilityListItemEvents).get_gameObject(), data); abilityListItemEvents.OnSelect = new ListItemEvents.ListItemEvent(this._OnAbilitySelect); abilityListItemEvents.OnRankUp = new ListItemEvents.ListItemEvent(this._OnAbilityRankUp); abilityListItemEvents.OnOpenDetail = new ListItemEvents.ListItemEvent(this._OnAbilityDetail); abilityListItemEvents.OnRankUpBtnPress = new ListItemEvents.ListItemEvent(this._OnRankUpBtnPress); abilityListItemEvents.OnRankUpBtnUp = new ListItemEvents.ListItemEvent(this._OnRankUpBtnUp); ((Component)abilityListItemEvents).get_transform().SetParent(transform1, false); ((Component)abilityListItemEvents).get_gameObject().SetActive(true); JobData job; int rank; if (this.GetAbilitySource(data.AbilityID, out job, out rank)) { DataSource.Bind <AbilityUnlockInfo>(((Component)abilityListItemEvents).get_gameObject(), new AbilityUnlockInfo() { JobName = job.Name, Rank = rank }); } if (flag1 && index1 == 0) { SGHighlightObject.Instance().highlightedObject = ((Component)abilityListItemEvents.RankupButton).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.023", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.TopLeft, true, false, false); } } } } if (slotType != ~EAbilitySlot.Action && Object.op_Inequality((Object)this.Item_SlotMismatch, (Object)null)) { for (int index = 0; index < learnedAbilities.Count; ++index) { AbilityData data = learnedAbilities[index]; if (slotType != data.SlotType && (this.ShowFixedAbilities || !data.Param.is_fixed) && (this.ShowMasterAbilities || !((string)this.Unit.UnitParam.ability == data.AbilityID) && !this.Unit.IsQuestClearUnlocked(data.Param.iname, QuestClearUnlockUnitDataParam.EUnlockTypes.MasterAbility))) { UnitAbilityListItemEvents abilityListItemEvents = (UnitAbilityListItemEvents)Object.Instantiate <UnitAbilityListItemEvents>((M0)this.Item_SlotMismatch); this.mItems.Add(abilityListItemEvents); DataSource.Bind <AbilityData>(((Component)abilityListItemEvents).get_gameObject(), data); abilityListItemEvents.OnRankUp = new ListItemEvents.ListItemEvent(this._OnAbilityRankUp); abilityListItemEvents.OnOpenDetail = new ListItemEvents.ListItemEvent(this._OnAbilityDetail); abilityListItemEvents.OnRankUpBtnPress = new ListItemEvents.ListItemEvent(this._OnRankUpBtnPress); abilityListItemEvents.OnRankUpBtnUp = new ListItemEvents.ListItemEvent(this._OnRankUpBtnUp); ((Component)abilityListItemEvents).get_transform().SetParent(transform1, false); ((Component)abilityListItemEvents).get_gameObject().SetActive(true); JobData job; int rank; if (this.GetAbilitySource(data.AbilityID, out job, out rank)) { DataSource.Bind <AbilityUnlockInfo>(((Component)abilityListItemEvents).get_gameObject(), new AbilityUnlockInfo() { JobName = job.Name, Rank = rank }); } } } } if (Object.op_Inequality((Object)this.Item_Locked, (Object)null)) { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); for (int index1 = 0; index1 < this.Unit.Jobs.Length; ++index1) { if (this.ShowLockedJobAbilities || this.Unit.Jobs[index1].Rank > 0) { RarityParam rarityParam = instanceDirect.GetRarityParam((int)this.Unit.UnitParam.raremax); for (int lv = this.Unit.Jobs[index1].Rank + 1; lv < JobParam.MAX_JOB_RANK; ++lv) { OString[] learningAbilitys = this.Unit.Jobs[index1].Param.GetLearningAbilitys(lv); if (learningAbilitys != null && (int)rarityParam.UnitJobLvCap >= lv) { for (int index2 = 0; index2 < learningAbilitys.Length; ++index2) { string key = (string)learningAbilitys[index2]; if (!string.IsNullOrEmpty(key)) { AbilityParam abilityParam = instanceDirect.GetAbilityParam(key); if (this.ShowFixedAbilities || !abilityParam.is_fixed) { UnitAbilityListItemEvents abilityListItemEvents = (UnitAbilityListItemEvents)Object.Instantiate <UnitAbilityListItemEvents>((M0)this.Item_Locked); this.mItems.Add(abilityListItemEvents); DataSource.Bind <AbilityParam>(((Component)abilityListItemEvents).get_gameObject(), abilityParam); abilityListItemEvents.OnSelect = new ListItemEvents.ListItemEvent(this._OnAbilitySelect); abilityListItemEvents.OnRankUp = new ListItemEvents.ListItemEvent(this._OnAbilityRankUp); abilityListItemEvents.OnOpenDetail = new ListItemEvents.ListItemEvent(this._OnAbilityDetail); abilityListItemEvents.OnRankUpBtnPress = new ListItemEvents.ListItemEvent(this._OnRankUpBtnPress); abilityListItemEvents.OnRankUpBtnUp = new ListItemEvents.ListItemEvent(this._OnRankUpBtnUp); ((Component)abilityListItemEvents).get_transform().SetParent(transform1, false); ((Component)abilityListItemEvents).get_gameObject().SetActive(true); DataSource.Bind <AbilityUnlockInfo>(((Component)abilityListItemEvents).get_gameObject(), new AbilityUnlockInfo() { JobName = this.Unit.Jobs[index1].Name, Rank = lv }); } } } } } } } if (this.ShowMasterAbilities && !string.IsNullOrEmpty((string)this.Unit.UnitParam.ability) && this.Unit.LearnAbilitys.Find((Predicate <AbilityData>)(p => p.AbilityID == (string)this.Unit.UnitParam.ability)) == null) { AbilityParam abilityParam = instanceDirect.GetAbilityParam((string)this.Unit.UnitParam.ability); UnitAbilityListItemEvents abilityListItemEvents = (UnitAbilityListItemEvents)Object.Instantiate <UnitAbilityListItemEvents>((M0)this.Item_Locked); this.mItems.Add(abilityListItemEvents); DataSource.Bind <AbilityParam>(((Component)abilityListItemEvents).get_gameObject(), abilityParam); abilityListItemEvents.OnSelect = new ListItemEvents.ListItemEvent(this._OnAbilitySelect); abilityListItemEvents.OnRankUp = new ListItemEvents.ListItemEvent(this._OnAbilityRankUp); abilityListItemEvents.OnOpenDetail = new ListItemEvents.ListItemEvent(this._OnAbilityDetail); abilityListItemEvents.OnRankUpBtnPress = new ListItemEvents.ListItemEvent(this._OnRankUpBtnPress); abilityListItemEvents.OnRankUpBtnUp = new ListItemEvents.ListItemEvent(this._OnRankUpBtnUp); ((Component)abilityListItemEvents).get_transform().SetParent(transform1, false); ((Component)abilityListItemEvents).get_gameObject().SetActive(true); } } if (Object.op_Inequality((Object)this.ScrollParent, (Object)null)) { this.mDecelerationRate = this.ScrollParent.get_decelerationRate(); this.ScrollParent.set_decelerationRate(0.0f); } RectTransform transform2 = ((Component)this).get_transform() as RectTransform; transform2.set_anchoredPosition(new Vector2((float)transform2.get_anchoredPosition().x, 0.0f)); this.StartCoroutine(this.RefreshScrollRect()); }