private void OnSoldierView(IUIListObject obj) { UIListItemContainer uIListItemContainer = (UIListItemContainer)obj; if (null == uIListItemContainer) { return; } long num = -1L; if (uIListItemContainer.data != null) { num = (long)uIListItemContainer.data; } if (num != 0L) { return; } SolMilitarySelectDlg solMilitarySelectDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLMILITARYSELECT_DLG) as SolMilitarySelectDlg; if (solMilitarySelectDlg != null) { solMilitarySelectDlg.SetLocationByForm(this); solMilitarySelectDlg.SetFocus(); solMilitarySelectDlg.SolSortType = 2; solMilitarySelectDlg.SetSortList(); } }
private void OnClickUseSol(IUIObject obj) { int num = (int)obj.Data; if (num < 0 || num > 5) { return; } long[] array = new long[5]; for (int i = 0; i < 5; i++) { NkSoldierInfo legendSolInfo = this.m_Element_SolID.GetLegendSolInfo(i); if (legendSolInfo != null) { array[i] = this.m_Element_SolID.GetLegendSolInfo(i).GetSolID(); } else { array[i] = 0L; } } SolMilitarySelectDlg solMilitarySelectDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLMILITARYSELECT_DLG) as SolMilitarySelectDlg; if (solMilitarySelectDlg != null) { solMilitarySelectDlg.SetLocationByForm(this); solMilitarySelectDlg.SetFocus(); solMilitarySelectDlg.SetLegendElement(this.m_SelectSlotData.i32KindInfo, array, (byte)num); solMilitarySelectDlg.SetSortList(); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MERCENARY", "OPEN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } }
public void ClickSolSelect(IUIObject obj) { SolMilitarySelectDlg solMilitarySelectDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLMILITARYSELECT_DLG) as SolMilitarySelectDlg; if (solMilitarySelectDlg != null) { solMilitarySelectDlg.SetLoadType(SolMilitarySelectDlg.LoadType.SOLAWAKENING); solMilitarySelectDlg.SetLocationByForm(this); solMilitarySelectDlg.SetFocus(); solMilitarySelectDlg.SolSortType = 2; solMilitarySelectDlg.SetSortList(); } }