private void AddPanel(QuestParam questparam, QuestParam[] availableQuests) { if (questparam == null || questparam.IsMulti) { return; } GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.QuestListItemTemplate); SRPG_Button component1 = (SRPG_Button)gameObject.GetComponent <SRPG_Button>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null)) { component1.AddListener(new SRPG_Button.ButtonClickEvent(this.OnQuestSelect)); } this.mGainedQuests.Add(gameObject); Button component2 = (Button)gameObject.GetComponent <Button>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null)) { bool flag1 = questparam.IsDateUnlock(-1L); bool flag2 = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p == questparam)) != null; ((Selectable)component2).set_interactable(flag1 && flag2); } DataSource.Bind <QuestParam>(gameObject, questparam); gameObject.get_transform().SetParent((Transform)this.QuestListParent, false); gameObject.SetActive(true); }
public void SetParam(ChatLogParam param, SRPG_Button.ButtonClickEvent OnClickEvent) { if (param == null) { ((Component)this).get_gameObject().SetActive(false); this.mChatLogParam = (ChatLogParam)null; } else { this.mChatLogParam = param; ChatWindow.MessageTemplateType type = ChatWindow.MessageTemplateType.OtherUser; if (MonoSingleton <GameManager> .Instance.Player.FUID == param.fuid) { type = ChatWindow.MessageTemplateType.User; } else if (string.IsNullOrEmpty(param.fuid)) { type = ChatWindow.MessageTemplateType.System; } ((Component)this).get_gameObject().SetActive(true); this.Refresh(param, type); SRPG_Button component = (SRPG_Button)this.GetIcon.GetComponent <SRPG_Button>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { return; } ((UnityEventBase)component.get_onClick()).RemoveAllListeners(); if (!(param.fuid != MonoSingleton <GameManager> .Instance.Player.FUID)) { return; } component.AddListener(OnClickEvent); } }
private void LoadAllParties(RecentPartyList.JSON_List[] winRecords) { int num = 0; foreach (RecentPartyList.JSON_List winRecord in winRecords) { // ISSUE: object of a compiler-generated type is created // ISSUE: reference to a compiler-generated method SRPG_Button.ButtonClickEvent buttonClickEvent = new SRPG_Button.ButtonClickEvent(new RecentPartyList.\u003CLoadAllParties\u003Ec__AnonStorey375() { \u003C\u003Ef__this = this, index = num }.\u003C\u003Em__3FF); if (winRecord.id > this.mUnitId) { this.mUnitId = winRecord.id; } UnitData[] party = this.LoadParty((IEnumerable <Json_Unit>)winRecord.detail.my.units); SupportData support = this.LoadHelpUnit(winRecord.detail.help); ItemData[] itemDataArray = this.LoadUsedItems(winRecord.detail.items); this.allParties.Add(party); this.allHelpUnits.Add(support); this.allAchieves.Add(winRecord.achieved); this.allUsedItems.Add(itemDataArray); RecentPartyPanel partyPanel = this.CreatePartyPanel(party, support, winRecord, buttonClickEvent); this.allTeamPanel.Add(partyPanel); ((Component)partyPanel).get_transform().SetParent(this.PartyPanelHolder.get_gameObject().get_transform(), false); SRPG_Button component = (SRPG_Button)((Component)partyPanel).GetComponent <SRPG_Button>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.AddListener(buttonClickEvent); } ++num; } }
private void AddList(QuestParam qparam, bool isActive = false) { if (qparam == null || qparam.IsMulti) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => AddList():qparam is Null Reference!"); } else if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.QuestListItemTemplate, (UnityEngine.Object)null)) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => AddList():QuestListItemTemplate is Null Reference!"); } else if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.QuestListParent, (UnityEngine.Object)null)) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => AddList():QuestListParent is Null Reference!"); } else { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.QuestListItemTemplate); this.mGainedQuests.Add(gameObject); SRPG_Button component = (SRPG_Button)gameObject.GetComponent <SRPG_Button>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.AddListener(new SRPG_Button.ButtonClickEvent(this.OnQuestSelect)); bool flag = qparam.IsDateUnlock(-1L); ((Selectable)component).set_interactable(flag && isActive); } DataSource.Bind <QuestParam>(gameObject, qparam); gameObject.get_transform().SetParent(this.QuestListParent, false); gameObject.SetActive(true); } }
private void LoadAllParties(RecentPartyList.JSON_List[] winRecords) { int num = 0; foreach (RecentPartyList.JSON_List winRecord in winRecords) { int index = num; SRPG_Button.ButtonClickEvent buttonClickEvent = (SRPG_Button.ButtonClickEvent)(b => this.OnButtonClick(index)); if (winRecord.id > this.mUnitId) { this.mUnitId = winRecord.id; } UnitData[] party = this.LoadParty((IEnumerable <Json_Unit>)winRecord.detail.my.units); SupportData support = this.LoadHelpUnit(winRecord.detail.help); ItemData[] itemDataArray = this.LoadUsedItems(winRecord.detail.items); this.allParties.Add(((IEnumerable <UnitData>)party).ToArray <UnitData>()); this.allHelpUnits.Add(support); this.allAchieves.Add(winRecord.achieved); this.allUsedItems.Add(itemDataArray); RecentPartyPanel partyPanel = this.CreatePartyPanel(party, support, winRecord, buttonClickEvent); this.allTeamPanel.Add(partyPanel); ((Component)partyPanel).get_transform().SetParent(this.PartyPanelHolder.get_gameObject().get_transform(), false); SRPG_Button component = (SRPG_Button)((Component)partyPanel).GetComponent <SRPG_Button>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.AddListener(buttonClickEvent); } ++num; } }
private void RefreshGainedQuests() { ((Component)this.QuestsParent).get_gameObject().SetActive(false); if (Object.op_Equality((Object)this.QuestListItemTemplate, (Object)null) || Object.op_Equality((Object)this.QuestListParent, (Object)null)) { return; } for (int index = 0; index < this.GainedQuests.Count; ++index) { this.GainedQuests[index].SetActive(false); } if (Object.op_Inequality((Object)this.ConfirmQuestButton, (Object)null)) { ((Component)this.ConfirmQuestButton).get_gameObject().SetActive(false); } int index1 = this.mItemParamTree.Count - 1; if (MonoSingleton <GameManager> .Instance.GetRecipeParam(this.mItemParamTree[index1].recipe) != null) { return; } if (Object.op_Inequality((Object)this.ConfirmQuestButton, (Object)null)) { ((Component)this.ConfirmQuestButton).get_gameObject().SetActive(true); } DataSource.Bind <ItemParam>(((Component)this.QuestsParent).get_gameObject(), this.mItemParamTree[index1]); string[] quests = this.mItemParamTree[index1].quests; if (quests == null || quests.Length == 0) { return; } QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests; ((Component)this.QuestsParent).get_gameObject().SetActive(true); for (int index2 = 0; index2 < quests.Length; ++index2) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type UnitEquipmentWindow.\u003CRefreshGainedQuests\u003Ec__AnonStorey282 questsCAnonStorey282 = new UnitEquipmentWindow.\u003CRefreshGainedQuests\u003Ec__AnonStorey282(); if (!string.IsNullOrEmpty(quests[index2])) { // ISSUE: reference to a compiler-generated field questsCAnonStorey282.questparam = MonoSingleton <GameManager> .Instance.FindQuest(quests[index2]); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (questsCAnonStorey282.questparam != null && !questsCAnonStorey282.questparam.IsMulti) { if (index2 >= this.GainedQuests.Count) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.QuestListItemTemplate); gameObject.get_transform().SetParent((Transform)this.QuestListParent, false); SRPG_Button component = (SRPG_Button)gameObject.GetComponent <SRPG_Button>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.AddListener(new SRPG_Button.ButtonClickEvent(this.OnQuestSelect)); } this.GainedQuests.Add(gameObject); } this.GainedQuests[index2].SetActive(true); SRPG_Button component1 = (SRPG_Button)this.GainedQuests[index2].GetComponent <SRPG_Button>(); if (Object.op_Inequality((Object)component1, (Object)null)) { // ISSUE: reference to a compiler-generated field bool flag1 = questsCAnonStorey282.questparam.IsDateUnlock(-1L); // ISSUE: reference to a compiler-generated method bool flag2 = Array.Find <QuestParam>(availableQuests, new Predicate <QuestParam>(questsCAnonStorey282.\u003C\u003Em__31B)) != null; ((Selectable)component1).set_interactable(flag1 && flag2); } // ISSUE: reference to a compiler-generated field DataSource.Bind <QuestParam>(this.GainedQuests[index2], questsCAnonStorey282.questparam); } } } }
private void RefreshGainedQuests(UnitData unit) { if (Object.op_Equality((Object)this.QuestList, (Object)null)) { return; } this.QuestList.SetActive(false); if (Object.op_Inequality((Object)this.NotFoundGainQuestObject, (Object)null)) { Text component = (Text)this.NotFoundGainQuestObject.GetComponent <Text>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.set_text(LocalizedText.Get("sys.UNIT_GAINED_COMMENT")); } this.NotFoundGainQuestObject.SetActive(true); } if (Object.op_Equality((Object)this.QuestListItemTemplate, (Object)null) || Object.op_Equality((Object)this.QuestListParent, (Object)null) || unit == null) { return; } for (int index = 0; index < this.mGainedQuests.Count; ++index) { this.mGainedQuests[index].SetActive(false); } ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam((string)unit.UnitParam.piece); DataSource.Bind <ItemParam>(this.QuestList, itemParam); string[] quests = itemParam.quests; if (quests == null || quests.Length == 0) { return; } QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests; this.QuestList.SetActive(true); if (Object.op_Inequality((Object)this.NotFoundGainQuestObject, (Object)null)) { this.NotFoundGainQuestObject.SetActive(false); } int index1 = 0; int index2 = 0; for (; index1 < quests.Length; ++index1) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type UnitKakeraWindow.\u003CRefreshGainedQuests\u003Ec__AnonStorey287 questsCAnonStorey287 = new UnitKakeraWindow.\u003CRefreshGainedQuests\u003Ec__AnonStorey287(); if (!string.IsNullOrEmpty(quests[index1])) { // ISSUE: reference to a compiler-generated field questsCAnonStorey287.questparam = MonoSingleton <GameManager> .Instance.FindQuest(quests[index1]); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (questsCAnonStorey287.questparam != null && !questsCAnonStorey287.questparam.IsMulti) { if (index2 >= this.mGainedQuests.Count) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.QuestListItemTemplate); gameObject.get_transform().SetParent((Transform)this.QuestListParent, false); SRPG_Button component = (SRPG_Button)gameObject.GetComponent <SRPG_Button>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.AddListener(new SRPG_Button.ButtonClickEvent(this.OnQuestSelect)); } this.mGainedQuests.Add(gameObject); } GameObject mGainedQuest = this.mGainedQuests[index2]; mGainedQuest.SetActive(true); Button component1 = (Button)mGainedQuest.GetComponent <Button>(); if (Object.op_Inequality((Object)component1, (Object)null)) { // ISSUE: reference to a compiler-generated field bool flag1 = questsCAnonStorey287.questparam.IsDateUnlock(-1L); // ISSUE: reference to a compiler-generated method bool flag2 = Array.Find <QuestParam>(availableQuests, new Predicate <QuestParam>(questsCAnonStorey287.\u003C\u003Em__322)) != null; ((Selectable)component1).set_interactable(flag1 && flag2); } // ISSUE: reference to a compiler-generated field DataSource.Bind <QuestParam>(mGainedQuest, questsCAnonStorey287.questparam); ++index2; } } } }
private void Refresh() { if (Object.op_Inequality((Object)this.mScrollRect, (Object)null) && Object.op_Inequality((Object)this.mScrollRect.get_verticalScrollbar(), (Object)null)) { this.mScrollRect.get_verticalScrollbar().set_value(1f); } UnitData dataOfClass = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); if (dataOfClass == null) { DebugUtility.LogError("UnitDataがBindされていません"); } else { this.mCurrentUnit = dataOfClass; if (this.mUnitVoiceData != null && this.mLastUnitUniqueID != -1L && this.mLastUnitUniqueID != this.mCurrentUnit.UniqueID) { this.mUnitVoiceData.Cleanup(); this.mUnitVoiceData = (UnitData.UnitPlaybackVoiceData)null; } this.mLastUnitUniqueID = this.mCurrentUnit.UniqueID; if (this.mUnitVoiceData != null) { this.mUnitVoiceData.Cleanup(); } this.mUnitVoiceData = this.mCurrentUnit.GetUnitPlaybackVoiceData(); if (this.mItems != null) { for (int index = 0; index < this.mItems.Count; ++index) { if (!Object.op_Equality((Object)this.mItems[index], (Object)null)) { this.mItems[index].SetActive(false); } } } if (Object.op_Equality((Object)this.ItemParent, (Object)null) || Object.op_Equality((Object)this.ItemTemplate, (Object)null)) { DebugUtility.LogError("リストテンプレートが存在しません"); } else { if (this.mUnitVoiceData.VoiceCueList.Count > this.mItems.Count) { int num = this.mUnitVoiceData.VoiceCueList.Count - this.mItems.Count; for (int index = 0; index < num; ++index) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate); if (!Object.op_Equality((Object)gameObject, (Object)null)) { gameObject.get_transform().SetParent((Transform)this.ItemParent, false); this.mItems.Add(gameObject); SRPG_Button componentInChildren = (SRPG_Button)gameObject.GetComponentInChildren <SRPG_Button>(); if (Object.op_Equality((Object)componentInChildren, (Object)null)) { DebugUtility.LogError("Buttonが存在しません"); } else { componentInChildren.AddListener(new SRPG_Button.ButtonClickEvent(this.OnSelect)); } } } } for (int index = 0; index < this.mUnitVoiceData.VoiceCueList.Count; ++index) { GameObject mItem = this.mItems[index]; PlayBackUnitVoiceItem componentInChildren = (PlayBackUnitVoiceItem)mItem.GetComponentInChildren <PlayBackUnitVoiceItem>(); if (Object.op_Equality((Object)componentInChildren, (Object)null)) { DebugUtility.LogError("PlayBackUnitVoiceItemが取得できません"); break; } componentInChildren.SetUp(this.mUnitVoiceData.VoiceCueList[index]); componentInChildren.Refresh(); componentInChildren.Unlock(); if (this.mUnitVoiceData.VoiceCueList[index].is_locked) { componentInChildren.Lock(); } ((Object)mItem).set_name((string)this.mUnitVoiceData.VoiceCueList[index].cueInfo.name); mItem.SetActive(true); } } } }