private RecentPartyPanel CreatePartyPanel(UnitData[] party, SupportData support, RecentPartyList.JSON_List record, SRPG_Button.ButtonClickEvent buttonClickCallback) { RecentPartyPanel component = (RecentPartyPanel)((GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)((Component)this.PartyPanelTemplate).get_gameObject())).GetComponent <RecentPartyPanel>(); component.SetPartyInfo(party, support, this.mCurrentQuest); component.SetUnitIconPressedCallback(buttonClickCallback); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.UserName, (UnityEngine.Object)null)) { component.UserName.set_text(record.detail.my.name); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.Level, (UnityEngine.Object)null)) { component.Level.set_text(record.detail.my.lv.ToString()); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.ClearDate, (UnityEngine.Object)null)) { component.ClearDate.set_text(this.GetClearedTime(record.created_at)); } if (component.ConditionStars != null) { for (int index = 0; index < record.achieved.Length && index < component.ConditionStars.Length; ++index) { component.ConditionStars[index].SetActive(record.achieved[index] != 0); } } if (component.ConditionItems != null && this.mCurrentQuest.type == QuestTypes.Tower && component.ConditionItems.Length >= 3) { component.ConditionItems[2].SetActive(false); } ((Component)component).get_gameObject().SetActive(true); return(component); }
private RecentPartyPanel CreatePartyPanel(UnitData[] party, SupportData support, RecentPartyList.JSON_List record, SRPG_Button.ButtonClickEvent buttonClickCallback) { RecentPartyPanel component = (RecentPartyPanel)((GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)((Component)this.PartyPanelTemplate).get_gameObject())).GetComponent <RecentPartyPanel>(); component.SetPartyInfo(party, support, this.mCurrentQuest); component.SetUnitIconPressedCallback(buttonClickCallback); component.SetUserName(record.detail.my.name); component.SetUserRank(record.detail.my.lv.ToString()); component.SetClearDate(this.GetClearedTime(record.created_at)); for (int index = 0; index < record.achieved.Length; ++index) { component.SetConditionStarActive(index, record.achieved[index] != 0); } if (this.mCurrentQuest.type == QuestTypes.Tower) { component.SetConditionItemActive(2, false); } ((Component)component).get_gameObject().SetActive(true); return(component); }