public void ShowItemList() { this.m_nlbItemList.Clear(); int num = 5; for (int i = 1; i < num; i++) { for (int j = 0; j < ItemDefine.INVENTORY_ITEMSLOT_MAX; j++) { ITEM item = NkUserInventory.GetInstance().GetItem(i, j); if (item != null) { if (0 < item.m_nOption[7]) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique); if (itemInfo != null) { if (!itemInfo.IsItemATB(131072L) && !itemInfo.IsItemATB(524288L) && !itemInfo.IsItemATB(2097152L)) { this.SetAddItemInfo(item, itemInfo); } } } } } } this.m_nlbItemList.RepositionItems(); }
public void SolTicketOpen() { if (this.m_OpenTicket == null) { return; } NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList(); if (readySolList == null || readySolList.GetCount() >= 100) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("507"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } if (this.m_OpenTicket.m_nItemNum >= 2 && this.GetNowOpenTicketCardType() == 0) { ItemBoxContinue_Dlg itemBoxContinue_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEM_BOX_CONTINUE_DLG) as ItemBoxContinue_Dlg; if (itemBoxContinue_Dlg == null) { return; } itemBoxContinue_Dlg.SetItemData(this.m_OpenTicket, ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET); return; } else { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_OpenTicket.m_nItemUnique); if (itemInfo == null) { return; } NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(false); if (itemInfo.IsItemATB(2048L) || itemInfo.IsItemATB(32768L)) { this.SetRecruitButtonEnable(false); Protocol_Item.Item_Use(this.m_OpenTicket); } else { this.ExcuteTicket(this.m_OpenTicket.m_nItemUnique, itemInfo.m_nRecruitType, itemInfo.m_nParam[1], false); } return; } }
private void On_Button(IUIObject obj) { List <Protocol_Item.Add_Item> list = new List <Protocol_Item.Add_Item>(); Protocol_Item.Add_Item item = default(Protocol_Item.Add_Item); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } if (itemInfo != null) { for (int i = 0; i < 12; i++) { int num; int num2; if (iTEM_BOX_GROUP != null) { num = iTEM_BOX_GROUP.i32GroupItemUnique[i]; num2 = iTEM_BOX_GROUP.i32GroupItemNum[i]; } else { num = itemInfo.m_nBoxItemUnique[i]; num2 = itemInfo.m_nBoxItemNumber[i]; } if (num > 0) { if (!Protocol_Item.CanAddItem(num, num2)) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("46"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } item.m_nItemUnique = num; item.m_nItemNum = num2; list.Add(item); } } } if (this.m_eItemMall_BoxType == eITEMMALL_BOXTRADE_TYPE.ITEMMALL_TRADETYPE_GETBOX) { GS_BOX_USE_REQ gS_BOX_USE_REQ = new GS_BOX_USE_REQ(); gS_BOX_USE_REQ.m_nItemID = this.m_cItem.m_nItemID; gS_BOX_USE_REQ.m_nItemUnique = this.m_cItem.m_nItemUnique; gS_BOX_USE_REQ.m_nPosType = this.m_cItem.m_nPosType; gS_BOX_USE_REQ.m_nItemPos = this.m_cItem.m_nItemPos; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BOX_USE_REQ, gS_BOX_USE_REQ); } this.Close(); }
public void SetData(GS_BOX_USE_ACK ACK) { for (int i = 0; i < 12; i++) { this.m_nItemUnique[i] = ACK.m_nGetItemUnique[i]; this.m_nItemNum[i] = ACK.m_nGetItemNum[i]; if (ACK.m_caAddItem[i].m_nItemUnique > 0) { this.m_GetItems.Add(ACK.m_caAddItem[i]); } } this.m_nBoxUnique = ACK.m_lUnique; ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_nBoxUnique); if (itemInfo.IsItemATB(65536L)) { ITEM_BOX_GROUP boxGroup = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_nBoxUnique); if (boxGroup != null) { for (int j = 0; j < 12; j++) { if (boxGroup.i32GroupItemUnique[j] > 0 && boxGroup.i32GroupItemRate[j] <= 1000) { Item_Box_Random_Result_Dlg.BEST_ITEM item = default(Item_Box_Random_Result_Dlg.BEST_ITEM); item.nItemUnique = boxGroup.i32GroupItemUnique[j]; item.nItemNum = boxGroup.i32GroupItemNum[j]; this.m_BestItemUnique.Add(item); } } } } else { for (int k = 0; k < 12; k++) { if (itemInfo.m_nBoxItemProbability[k] > 0 && itemInfo.m_nBoxItemProbability[k] <= 1000) { Item_Box_Random_Result_Dlg.BEST_ITEM item2 = default(Item_Box_Random_Result_Dlg.BEST_ITEM); item2.nItemUnique = itemInfo.m_nBoxItemUnique[k]; item2.nItemNum = itemInfo.m_nBoxItemNumber[k]; this.m_BestItemUnique.Add(item2); } } } this.m_lbTitle.SetText(NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_nBoxUnique)); this.SetContent(); }
public static void Item_Box_Random_Show(ITEM a_cItem) { if (a_cItem != null) { List <Protocol_Item_Box.Roulette_Item> list = new List <Protocol_Item_Box.Roulette_Item>(); Protocol_Item_Box.Roulette_Item item = default(Protocol_Item_Box.Roulette_Item); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(a_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(itemInfo.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } for (int i = 0; i < 12; i++) { int num; int num2; if (iTEM_BOX_GROUP != null) { num = iTEM_BOX_GROUP.i32GroupItemUnique[i]; num2 = iTEM_BOX_GROUP.i32GroupItemNum[i]; } else { num = itemInfo.m_nBoxItemUnique[i]; num2 = itemInfo.m_nBoxItemNumber[i]; } if (num > 0) { item.m_nItemUnique = num; item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(num2.ToString(), " ", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442")); list.Add(item); } } Protocol_Item_Box.Roulette_Show(a_cItem.m_nItemUnique, new Action <object>(Protocol_Item_Box.On_Sead_Box_Use_Random), a_cItem, list.ToArray()); } }
private bool CostumeBoxPreProcess(ITEM item, int index, YesDelegate a_deYes) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique); if (!itemInfo.IsItemATB(33554432L)) { return(false); } int itemunique = itemInfo.m_nBoxItemUnique[index]; ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(itemunique); if (itemInfo2 == null) { return(false); } if (itemInfo2.m_nFunctions != 14) { return(false); } int num = itemInfo2.m_nParam[0]; int costumeSolKind = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeSolKind(num); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("845"); if (!NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsMySolKindExist(costumeSolKind)) { NrTSingleton <FormsManager> .Instance.ShowMessageBox(textFromInterface, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("355"), eMsgType.MB_OK_CANCEL, a_deYes, index); return(true); } if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsBuyCostume(num)) { NrTSingleton <FormsManager> .Instance.ShowMessageBox(textFromInterface, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("356"), eMsgType.MB_OK_CANCEL, a_deYes, index); return(true); } return(false); }
private void Click_Item(IUIObject _obj) { if (null == this.m_nlbEquipList.SelectedItem) { return; } int num = (int)this.m_nlbEquipList.SelectedItem.Data; if (num == -1 || num < 0 || num >= 12) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("226"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } int num2 = itemInfo.m_nBoxItemUnique[num]; int num3 = itemInfo.m_nBoxRank; if (iTEM_BOX_GROUP != null) { num2 = iTEM_BOX_GROUP.i32GroupItemUnique[num]; num3 = iTEM_BOX_GROUP.i32GroupItemGrade[num]; } if (itemInfo == null || num2 == 0) { string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("226"); Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } ITEM iTEM = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM.m_nItemID = -9223372036854775808L; iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[num]; iTEM.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[num]; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[num]); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[num]); iTEM.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[num]; iTEM.m_nOption[3] = 1; iTEM.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[num]; iTEM.m_nOption[5] = 1; iTEM.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[num]; iTEM.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[num]; iTEM.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[num]; iTEM.m_nOption[9] = 1; iTEM.m_nDurability = 100; } else { iTEM.Set(this.m_cItem); iTEM.m_nItemUnique = num2; iTEM.m_nOption[2] = num3; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)num3); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)num3); } this.Set_ItemInfo(iTEM); }
public void Set_ItemInfo(ITEM _cItem) { if (_cItem == null || !_cItem.IsValid()) { return; } this.m_nlbEquipInfo.Clear(); ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(_cItem, null, false, true, G_ID.NONE); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(_cItem.m_nItemUnique); if (itemInfo == null) { return; } NewListItem newListItem = new NewListItem(this.m_nlbEquipInfo.ColumnNum, true, string.Empty); int rank = _cItem.m_nOption[2]; int num = 0; bool flag = false; string text = string.Empty; if (_cItem.m_nPosType == 10 || _cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4) { text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType)); } else { text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType)); } newListItem.SetListItemData(2, text, null, null, null); if (array.Length > 0) { if (array[0].m_MainOption) { newListItem.SetListItemData(4, array[0].m_OptionName, null, null, null); newListItem.SetListItemData(6, array[0].m_OptionValue, null, null, null); num++; } else { newListItem.SetListItemData(4, string.Empty, null, null, null); newListItem.SetListItemData(6, string.Empty, null, null, null); } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); if (array.Length > num) { for (int i = num; i < array.Length; i++) { stringBuilder.Append(array[i].m_OptionName); stringBuilder2.Append(array[i].m_OptionValue); } } newListItem.SetListItemData(5, stringBuilder.ToString(), null, null, null); newListItem.SetListItemData(7, stringBuilder2.ToString(), null, null, null); } else { newListItem.SetListItemData(4, string.Empty, null, null, null); newListItem.SetListItemData(5, string.Empty, null, null, null); newListItem.SetListItemData(6, string.Empty, null, null, null); newListItem.SetListItemData(7, string.Empty, null, null, null); } string text2 = NrTSingleton <ItemManager> .Instance.GetName(_cItem); if (_cItem.m_nDurability == 0 && (_cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4)) { text2 = string.Format("{0} {1}", text2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2984")); } newListItem.SetListItemData(11, text2, null, null, null); StringBuilder stringBuilder3 = new StringBuilder(); string value = "\r\n"; if (itemInfo.m_strToolTipTextKey != "0") { stringBuilder3.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey)); stringBuilder3.Append(value); } int num2 = _cItem.m_nOption[4]; int num3 = _cItem.m_nOption[5]; int num4 = _cItem.m_nOption[6]; int num5 = _cItem.m_nOption[9]; if (num2 > 0 && num3 > 0) { string value2 = string.Empty; string empty = string.Empty; BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3); if (battleSkillDetail != null) { if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L)) { value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381")); } else { value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183")); } stringBuilder3.Append(value2); stringBuilder3.Append(value); NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1); stringBuilder3.Append(empty); stringBuilder3.Append(value); flag = true; } string empty2 = string.Empty; if (num4 > 0 && num5 > 0 && flag) { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5); if (battleSkillDetail2 != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1); } stringBuilder3.Append(empty2); stringBuilder3.Append(value); } } newListItem.SetListItemData(14, stringBuilder3.ToString(), null, null, null); newListItem.SetListItemData(8, NrTSingleton <ItemManager> .Instance.GetItemTexture(_cItem.m_nItemUnique), null, null, null); if (itemInfo.m_nSetUnique != 0) { newListItem.SetListItemData(12, string.Empty, _cItem, new EZValueChangedDelegate(this.Click_SetItem), null); } else { newListItem.SetListItemData(12, false); } newListItem.Data = _cItem; this.m_nlbEquipInfo.Add(newListItem); this.m_nlbEquipInfo.RepositionItems(); if (itemInfo.m_nSetUnique != 0) { this.Load_SetEffect(); } this.m_lbNotice.Visible = false; }
public void Set_Item(ITEM a_cItem) { if (a_cItem == null) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NkSoldierInfo nkSoldierInfo = null; if (nrCharUser != null) { nkSoldierInfo = nrCharUser.GetPersonInfo().GetLeaderSoldierInfo(); } this.m_cItem = a_cItem; this.m_nCurItemNum = 1; this.m_nMaxItemNum = 12; if (a_cItem.m_nItemNum < 12) { this.m_nMaxItemNum = a_cItem.m_nItemNum; } this.Set_GetItemNum(); this.m_lbNotice.Visible = true; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"), "itemname", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_cItem), "count", this.m_nMaxItemNum }); this.m_lbTitle.Text = empty; this.m_nlbEquipList.Clear(); this.m_nlbEquipList.SelectStyle = "Win_B_ListBoxOrange"; ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } int num = 0; for (int i = 0; i < 12; i++) { int num2; int num3; int num4; if (iTEM_BOX_GROUP != null) { num2 = iTEM_BOX_GROUP.i32GroupItemUnique[i]; num3 = iTEM_BOX_GROUP.i32GroupItemNum[i]; num4 = iTEM_BOX_GROUP.i32GroupItemGrade[i]; } else { num2 = itemInfo.m_nBoxItemUnique[i]; num3 = itemInfo.m_nBoxItemNumber[i]; num4 = itemInfo.m_nBoxRank; } if (num2 > 0) { if (NrTSingleton <ItemManager> .Instance.IsItemATB(a_cItem.m_nItemUnique, 256L)) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null) { ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(num2); if (itemTypeInfo != null) { if (nkSoldierInfo != null && nkSoldierInfo.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE)) { num++; NewListItem newListItem = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty); if (num4 == 0) { UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2); newListItem.SetListItemData(1, itemTexture, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null); TsLog.LogError("0 == itemRank", new object[0]); } else { ITEM iTEM = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM.m_nItemID = -9223372036854775808L; iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i]; iTEM.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[i]; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[i]; iTEM.m_nOption[3] = 1; iTEM.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i]; iTEM.m_nOption[5] = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i]; iTEM.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[i]; iTEM.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[i]; iTEM.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i]; iTEM.m_nOption[9] = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i]; iTEM.m_nDurability = 100; newListItem.SetListItemData(1, iTEM, null, null, null); } else { iTEM.Set(this.m_cItem); iTEM.m_nItemUnique = num2; iTEM.m_nOption[2] = num4; newListItem.SetListItemData(1, iTEM, null, null, null); } } string text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2)); newListItem.SetListItemData(2, text, null, null, null); string arg = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"); string text2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg); newListItem.SetListItemData(3, text2, null, null, null); newListItem.Data = i; this.m_nlbEquipList.Add(newListItem); } } } } else { num++; NewListItem newListItem2 = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty); newListItem2.SetListItemData(0, string.Empty, "Win_T_ItemEmpty", null, null); if (num4 == 0) { UIBaseInfoLoader itemTexture2 = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2); newListItem2.SetListItemData(1, itemTexture2, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null); } else { ITEM iTEM2 = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM2.m_nItemID = -9223372036854775808L; iTEM2.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i]; iTEM2.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[i]; iTEM2.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM2.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM2.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[i]; iTEM2.m_nOption[3] = 1; iTEM2.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i]; iTEM2.m_nOption[5] = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i]; iTEM2.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[i]; iTEM2.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[i]; iTEM2.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i]; iTEM2.m_nOption[9] = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i]; iTEM2.m_nDurability = 100; newListItem2.SetListItemData(1, iTEM2, null, null, null); } else { iTEM2.Set(this.m_cItem); iTEM2.m_nItemUnique = num2; iTEM2.m_nOption[2] = num4; newListItem2.SetListItemData(1, iTEM2, null, null, null); } } string text3 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2)); newListItem2.SetListItemData(2, text3, null, null, null); string arg2 = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"); string text4 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg2); newListItem2.SetListItemData(3, text4, null, null, null); newListItem2.Data = i; this.m_nlbEquipList.Add(newListItem2); } } } this.m_nlbEquipList.RepositionItems(); this.Show(); }
private void OnClickItemIcon(IUIObject obj) { if (!TsPlatform.IsMobile) { return; } if (null == this.m_lbListBox.SelectedItem) { return; } int num = (int)this.m_lbListBox.SelectedItem.Data; if (num == -1 || num < 0 || num >= 12) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("226"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } int num2 = itemInfo.m_nBoxItemUnique[num]; int num3 = itemInfo.m_nBoxRank; if (iTEM_BOX_GROUP != null) { num2 = iTEM_BOX_GROUP.i32GroupItemUnique[num]; num3 = iTEM_BOX_GROUP.i32GroupItemGrade[num]; } if (itemInfo == null || num2 == 0) { string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("226"); Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } ITEM iTEM = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM.m_nItemID = -9223372036854775808L; iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[num]; iTEM.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[num]; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[num]); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[num]); iTEM.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[num]; iTEM.m_nOption[3] = 1; iTEM.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[num]; iTEM.m_nOption[5] = 1; iTEM.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[num]; iTEM.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[num]; iTEM.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[num]; iTEM.m_nOption[9] = 1; iTEM.m_nDurability = 100; } else { iTEM.Set(this.m_cItem); iTEM.m_nItemUnique = num2; iTEM.m_nOption[2] = num3; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)num3); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)num3); } ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; if (itemTooltipDlg != null) { itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); this.BoxColliderActive(false); } }
public void Set_Item(ITEM a_cItem) { this.m_lbListBox.Clear(); this.m_cItem = a_cItem; this.m_laTitle.Text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_cItem); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } int i = 0; for (int j = 0; j < 12; j++) { int num; int num2; int num3; if (iTEM_BOX_GROUP != null) { num = iTEM_BOX_GROUP.i32GroupItemUnique[j]; num2 = iTEM_BOX_GROUP.i32GroupItemNum[j]; num3 = iTEM_BOX_GROUP.i32GroupItemGrade[j]; } else { num = itemInfo.m_nBoxItemUnique[j]; num2 = itemInfo.m_nBoxItemNumber[j]; num3 = itemInfo.m_nBoxRank; } if (num > 0) { i++; ListItem listItem = new ListItem(); listItem.SetColumnGUIContent(0, string.Empty, "Win_T_ItemEmpty"); if (num3 == 0) { UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(num); listItem.SetColumnGUIContent(1, string.Empty, itemTexture, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, j)); } else { ITEM iTEM = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM.m_nItemID = -9223372036854775808L; iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[j]; iTEM.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[j]; iTEM.m_nOption[0] = 100; iTEM.m_nOption[1] = 100; iTEM.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[j]; iTEM.m_nOption[3] = 1; iTEM.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[j]; iTEM.m_nOption[5] = iTEM_BOX_GROUP.i32GroupItemSkillLevel[j]; iTEM.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[j]; iTEM.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[j]; iTEM.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[j]; iTEM.m_nOption[9] = iTEM_BOX_GROUP.i32GroupItemSkill2Level[j]; iTEM.m_nDurability = 100; listItem.SetColumnGUIContent(1, iTEM, true); } else { iTEM.Set(this.m_cItem); iTEM.m_nItemUnique = num; iTEM.m_nOption[2] = num3; listItem.SetColumnGUIContent(1, iTEM, true); } } string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num); string textColor = NrTSingleton <CTextParser> .Instance.GetTextColor("1101"); listItem.SetColumnStr(2, itemNameByItemUnique, textColor); int num4 = num2; string str = Protocol_Item.Money_Format((long)num4) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"); string textColor2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1105"); listItem.SetColumnStr(3, str, textColor2); listItem.Key = j; this.m_lbListBox.Add(listItem); } } while (i < 5) { ListItem listItem2 = new ListItem(); listItem2.SetColumnGUIContent(0, string.Empty, "Win_T_ItemEmpty"); listItem2.SetColumnGUIContent(1, string.Empty); listItem2.SetColumnGUIContent(2, string.Empty); listItem2.SetColumnGUIContent(3, string.Empty); listItem2.Key = i; this.m_lbListBox.Add(listItem2); i++; } this.m_lbListBox.RepositionItems(); this.Show(); }
public void SetItemSkillReinforceData(GS_ITEMSKILL_REINFORCE_ACK pPacket) { base.SetShowLayer(1, false); this.m_lbBefore.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2960")); this.m_lbAfter.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2961")); this.m_SelectItem = NkUserInventory.GetInstance().GetItemFromItemID(pPacket.i64BaseItemID); if (this.m_SelectItem == null) { ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID(); this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(pPacket.i64BaseItemID); } } if (this.m_SelectItem == null) { return; } string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem); this.m_itxItem.SetItemTexture(this.m_SelectItem); this.m_lbItemName.SetText(name); ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg2 != null) { itemSkill_Dlg2.UpdateData(this.m_SelectItem.m_nItemPos, this.m_SelectItem.m_nPosType, 0L); itemSkill_Dlg2.CheckSelectItem(); } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_SelectItem.m_nItemUnique); bool flag = false; if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L)) { flag = true; } int skillUnique = this.m_SelectItem.m_nOption[6]; int num = this.m_SelectItem.m_nOption[9]; if (!flag) { skillUnique = this.m_SelectItem.m_nOption[4]; num = this.m_SelectItem.m_nOption[5]; } int num2 = 0; this.m_bItemSkillSuccess = false; string empty = string.Empty; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (battleSkillBase != null) { if (pPacket.RessultType == 0) { num2 = num - 1; this.m_bItemSkillSuccess = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2963"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -1) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2964"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -2) { num2 = num + 1; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2965"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -3) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2966"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -4) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2986"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } this.m_lbAfter2.SetText(empty); empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2670"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num2 }); this.m_lbBefore2.SetText(empty); } base.SetShowLayer(2, true); this.LoadSolComposeSuccessBundle(); }
public void Item_Tooltip(Form cThis, ITEM pkItem, ITEM pkEquipItem, G_ID eWidowID, bool bEquiped = false) { if (pkItem == null || !pkItem.IsValid()) { return; } if (pkItem != null) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique); if (itemInfo != null) { if (itemInfo.m_nSetUnique != 0) { this.SetItemView(true); } else { this.SetItemView(false); } } } ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(pkItem, pkEquipItem, bEquiped, true, G_ID.NONE); ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique); if (itemInfo2 == null) { return; } int rank = pkItem.m_nOption[2]; int num = 0; string name = NrTSingleton <ItemManager> .Instance.GetName(pkItem); this.m_txClass.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(rank)); this.m_lbTitle.Text = string.Format("{0} {1}", name, (!bEquiped) ? string.Empty : string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("2002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1479"))); this.m_itItemTex.SetItemTexture(pkItem); if (pkItem.m_nPosType == 10 || Protocol_Item.Is_EquipItem(pkItem.m_nItemUnique)) { this.m_lbClass.Text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType)); } else { this.m_lbClass.Text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType)); } this.m_lbType.Text = Protocol_Item.GetItemPartText(NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(pkItem.m_nItemUnique)); if (array.Length > 0) { if (array[0].m_MainOption) { this.m_lbMainOption.Text = array[0].m_OptionName; this.m_flMainValue.SetFlashLabel(array[0].m_OptionValue); num++; } else { this.m_lbMainOption.Text = string.Empty; this.m_flMainValue.SetFlashLabel(string.Empty); } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); if (array.Length > num) { for (int i = num; i < array.Length; i++) { stringBuilder.Append(array[i].m_OptionName); stringBuilder2.Append(array[i].m_OptionValue); } } this.m_lbSubOption.SetFlashLabel(stringBuilder.ToString()); this.m_flSubValue.SetFlashLabel(stringBuilder2.ToString()); } else { this.m_lbMainOption.Text = string.Empty; this.m_flMainValue.SetFlashLabel(string.Empty); this.m_lbSubOption.SetFlashLabel(string.Empty); this.m_flSubValue.SetFlashLabel(string.Empty); } this.m_lbText.SetLocation(this.m_lbText.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 10f); if (itemInfo2.m_strToolTipTextKey != "0") { string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo2.m_strToolTipTextKey); this.m_lbText.SetFlashLabel(textFromItemHelper); this.bText = true; } else { this.m_lbText.SetFlashLabel(string.Empty); this.bText = false; } int num2 = pkItem.m_nOption[4]; int num3 = pkItem.m_nOption[5]; int num4 = pkItem.m_nOption[6]; int num5 = pkItem.m_nOption[9]; this.bItemSkillText = false; this.bItemSkillText2 = false; if (num2 > 0 && num3 > 0) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3); if (battleSkillDetail != null) { string flashLabel = string.Empty; if (itemInfo2.IsItemATB(131072L) || itemInfo2.IsItemATB(524288L)) { flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381")); } else { flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183")); } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1); if (this.bText) { this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbText.GetLocationY() + this.m_lbText.Height + 20f); } else { this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 20f); } this.m_lbItemSkillName.SetFlashLabel(flashLabel); this.m_lbItemSkillText.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillName.GetLocationY() + this.m_lbItemSkillName.Height + 10f); this.m_lbItemSkillText.SetFlashLabel(empty); this.bItemSkillText = true; } } else { this.m_lbItemSkillName.SetFlashLabel(string.Empty); this.m_lbItemSkillText.SetFlashLabel(string.Empty); } if (num4 > 0 && num5 > 0 && this.bItemSkillText) { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5); if (battleSkillDetail2 != null) { string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1); this.m_lbItemSkillText2.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height); this.m_lbItemSkillText2.SetFlashLabel(empty2); this.bItemSkillText2 = true; } } else { this.m_lbItemSkillText2.SetFlashLabel(string.Empty); } float height; if (this.bItemSkillText) { if (this.bItemSkillText2) { height = this.m_lbItemSkillText2.GetLocationY() + this.m_lbItemSkillText.Height + 10f; } else { height = this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height + 10f; } } else { height = this.m_lbText.GetLocationY() + this.m_lbText.Height + 14f; } if (this.bItemSkillText2) { this.m_txLine.Visible = true; } else { this.m_txLine.Visible = false; } base.SetSize(base.GetSizeX(), height); this.m_txBG.SetSize(base.GetSize().x, height); }
public void Set_Item(ITEM a_cItem) { if (a_cItem == null || !a_cItem.IsValid()) { this.Close(); return; } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(a_cItem.m_nItemUnique); if (itemInfo == null) { this.Close(); return; } bool flag = false; ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { flag = true; iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(a_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { this.Close(); return; } } this.m_lMainBoxItem = a_cItem; this.m_strItemName = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_lMainBoxItem.m_nItemUnique); this.m_BoxitemCount = this.m_lMainBoxItem.m_nItemNum; this.SetTitle(); this.m_ivMainBoxItem.BaseInfoLoderImage = NrTSingleton <ItemManager> .Instance.GetItemTexture(this.m_lMainBoxItem.m_nItemUnique); this.m_NlbItemListBox.Clear(); if (a_cItem != null) { List <Protocol_Item_Box.Roulette_Item> list = new List <Protocol_Item_Box.Roulette_Item>(); Protocol_Item_Box.Roulette_Item item = default(Protocol_Item_Box.Roulette_Item); for (int i = 0; i < 12; i++) { int num; int num2; if (flag) { num = iTEM_BOX_GROUP.i32GroupItemUnique[i]; num2 = iTEM_BOX_GROUP.i32GroupItemNum[i]; } else { num = itemInfo.m_nBoxItemUnique[i]; num2 = itemInfo.m_nBoxItemNumber[i]; } if (num > 0) { ITEM boxItemTemp = NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(a_cItem.m_nItemUnique, i); if (boxItemTemp != null && boxItemTemp.IsValid()) { item.m_nItemUnique = num; item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(num2.ToString(), " ", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442")); list.Add(item); NewListItem newListItem = new NewListItem(this.m_NlbItemListBox.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, true); newListItem.SetListItemData(1, boxItemTemp, boxItemTemp, new EZValueChangedDelegate(this.OnItemToolTip), null); this.m_NlbItemListBox.Add(newListItem); } } } this.m_NlbItemListBox.RepositionItems(); this.m_saRouletteItem = list.ToArray(); ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(a_cItem, null, false, false, G_ID.NONE); if (array.Length > 0) { StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); for (int j = 0; j < array.Length; j++) { stringBuilder.Append(array[j].m_OptionName); stringBuilder2.Append(array[j].m_OptionValue); } this.m_flToolTip1.SetFlashLabel(stringBuilder.ToString()); this.m_flToolTip2.SetFlashLabel(stringBuilder2.ToString()); } else { this.m_flToolTip1.SetFlashLabel(string.Empty); this.m_flToolTip2.SetFlashLabel(string.Empty); } this.m_flToolTip3.SetLocation(this.m_flToolTip3.GetLocation().x, this.m_flToolTip2.GetLocationY() + this.m_flToolTip2.Height + 10f); if (itemInfo.m_strToolTipTextKey != "0") { string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey); this.m_flToolTip3.SetFlashLabel(textFromItemHelper); } else { this.m_flToolTip3.SetFlashLabel(string.Empty); } } base.ShowLayer(0, 1); }