private void ClickItemButton(IUIObject obj) { Button button = (Button)obj; int num = (this.m_CurrentPage - 1) * ItemListDlg.NUM_ITEMLIST; num += (int)button.data; if (num >= this.m_ItemList.Count) { return; } if (num >= this.m_ItemList.Count) { return; } SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); this._dtSelectItem.SetLocation(button.GetLocation().x, button.GetLocationY()); this._dtSelectItem.Visible = true; string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_ItemList[num].m_nItemUnique); if (!string.IsNullOrEmpty(itemMaterialCode)) { TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "DROP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (TsPlatform.IsMobile) { selectItemDlg.CloseNow(); } }
public void SetItemList() { if (this.m_SolID == 0L) { return; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.m_SolID); if (soldierInfoFromSolID == null) { return; } this.m_ItemList.Clear(); SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); for (int i = 0; i < 6; i++) { ITEM item = soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem(); if (item != null) { if (item.m_nItemUnique > 0) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique); if (itemInfo != null) { if (selectItemDlg.DlgType == SelectItemDlg.eType.Enhance && item.m_nRank >= 10) { if (itemInfo == null) { goto IL_12F; } if ((int)soldierInfoFromSolID.GetLevel() < itemInfo.GetUseMinLevel(item)) { goto IL_12F; } } if (selectItemDlg.DlgType != SelectItemDlg.eType.Repair || item.m_nDurability < 100) { if (selectItemDlg.DlgType == SelectItemDlg.eType.Dissemblie) { } this.m_ItemList.Add(soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem()); } } } } IL_12F :; } this.m_TotalPage = Math.Abs(this.m_ItemList.Count - 1) / ItemListDlg.NUM_ITEMLIST + 1; this.m_CurrentPage = 1; this.m_UpdateCount = soldierInfoFromSolID.GetItemUpdateCount(); this.ShowItemList(); }
private void ClickItemDrawTexture(IUIObject obj) { ItemTexture itemTexture = (ItemTexture)obj; int num = (this.m_CurrentPage - 1) * ItemListDlg.NUM_ITEMLIST; num += (int)itemTexture.data; if (num >= this.m_ItemList.Count) { return; } SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); SelectItemDlg.eType dlgType = selectItemDlg.DlgType; if (dlgType != SelectItemDlg.eType.Enhance) { } if (this._btItem[num] != null) { this._dtSelectItem.SetLocation(this._btItem[num].GetLocation().x, this._btItem[num].GetLocationY()); this._dtSelectItem.Visible = true; } string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_ItemList[num].m_nItemUnique); if (!string.IsNullOrEmpty(itemMaterialCode)) { TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "DROP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (TsPlatform.IsMobile) { selectItemDlg.CloseNow(); } }
private void ShowHideControl() { SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); if (selectItemDlg.DlgType == SelectItemDlg.eType.Repair) { base.ShowLayer(1); this._btPrev.Visible = false; this._btNext.Visible = false; this.m_Box_page.Visible = false; } else { base.SetShowLayer(1, false); } }