private void ShowToolTip(IUIObject pObj) { ItemTexture itemTexture = (ItemTexture)pObj; if (itemTexture == null) { return; } ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; if (itemTooltipDlg != null) { if (itemTexture.Data is int) { itemTooltipDlg.Set_Tooltip(base.Orignal_ID, (int)itemTexture.Data); } else if (itemTexture.Data is ITEM) { itemTooltipDlg.Set_Tooltip(base.Orignal_ID, itemTexture.Data as ITEM, null, false); } else { itemTooltipDlg.Close(); } } }
private void ClickSelectItem(IUIObject obj) { ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; if (this.m_itSelectItem.Data is ITEM) { ITEM pkItem = (ITEM)this.m_itSelectItem.Data; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, pkItem, null, false); } else if (this.m_itSelectItem.Data is PointTable) { PointTable pointTable = (PointTable)this.m_itSelectItem.Data; ITEM iTEM = new ITEM(); iTEM.Init(); iTEM.m_nItemUnique = pointTable.m_nItemUnique; iTEM.m_nItemNum = 1; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); } else if (this.m_itSelectItem.Data is JewelryTable) { JewelryTable jewelryTable = (JewelryTable)this.m_itSelectItem.Data; ITEM iTEM2 = new ITEM(); iTEM2.Init(); iTEM2.m_nItemUnique = jewelryTable.m_nItemUnique; iTEM2.m_nItemNum = 1 * jewelryTable.m_nExchangeNum; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM2, null, false); } else { Debug.LogError("Can't Find Obj type"); itemTooltipDlg.Close(); } }
private void On_Mouse_Over(IUIObject a_oObject) { ImageView imageView = a_oObject as ImageView; if (imageView != null) { IUIListObject iUIListObject; if (TsPlatform.IsMobile) { iUIListObject = imageView.SelectedItem; } else { iUIListObject = imageView.MouseItem; } if (iUIListObject != null) { ImageSlot imageSlot = iUIListObject.Data as ImageSlot; if (imageSlot != null && imageSlot.c_oItem != null) { ITEM iTEM = new ITEM(); iTEM.Set(imageSlot.c_oItem as ITEM); if (iTEM != null && iTEM.m_nItemUnique > 0) { 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); } } } } } }
public static void ShowItemDetailInfo(ITEM Item, G_ID eGID) { ITEM iTEM = new ITEM(); iTEM.Set(Item); if (iTEM != null && iTEM.m_nItemUnique > 0) { ItemTooltipDlg itemTooltipDlg = NrTSingleton<FormsManager>.Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip(eGID, iTEM, null, false); } }
public void OnClickItemDT(IUIObject obj) { int num = (int)obj.Data; ITEM iTEM = new ITEM(); iTEM.m_nItemUnique = this.m_ItemToolTipUnique[num]; iTEM.m_nItemNum = this.m_ItemToolTipCount[num]; ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); }
private void ClickTicketItemToolTip(IUIObject obj) { long itemID = (long)obj.Data; ITEM itemFromItemID = NkUserInventory.instance.GetItemFromItemID(itemID); if (itemFromItemID == null) { return; } ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, itemFromItemID, null, false); }
public void OnClickItemAttend(IUIObject obj) { if (this.m_AttendItemToolTipUnique <= 0 || this.m_AttendItemToolTipCount <= 0) { return; } ITEM iTEM = new ITEM(); iTEM.m_nItemUnique = this.m_AttendItemToolTipUnique; iTEM.m_nItemNum = (int)this.m_AttendItemToolTipCount; ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); }
private void ClickSelectItem(IUIObject obj) { ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; if (this.m_kSelectItem.Data is ITEM) { ITEM pkItem = (ITEM)this.m_kSelectItem.Data; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, pkItem, null, false); } else { Debug.LogError("Can't Find Obj type"); itemTooltipDlg.Close(); } }
private void OnClickItem(IUIObject obj) { ITEM iTEM = obj.Data as ITEM; if (iTEM == null) { return; } 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); } }
private void OnItemToolTip(IUIObject a_oObject) { ItemTexture itemTexture = a_oObject as ItemTexture; if (itemTexture != null) { ITEM iTEM = itemTexture.Data as ITEM; if (iTEM != null && iTEM.m_nItemUnique > 0) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.TOOLTIP_DLG); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ITEMTOOLTIP_DLG); ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); } } }
public void OnClickEquipItem(IUIObject obj) { if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLEQUIPITEMSELECT_DLG)) { SolEquipItemSelectDlg solEquipItemSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLEQUIPITEMSELECT_DLG) as SolEquipItemSelectDlg; ITEM iTEM = solEquipItemSelectDlg.MobileSelbutton.data as ITEM; if (iTEM == null) { return; } long solid = 0L; SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg; if (solMilitaryGroupDlg != null && solMilitaryGroupDlg.Visible) { NkSoldierInfo selectedSolinfo = solMilitaryGroupDlg.GetSelectedSolinfo(); solid = selectedSolinfo.GetSolID(); } Protocol_Item.Item_Use(iTEM, solid); solEquipItemSelectDlg.CloseForm(null); } if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLSELECT_DLG)) { ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; ItemTooltipDlg_Second itemTooltipDlg_Second = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMTOOLTIP_SECOND_DLG) as ItemTooltipDlg_Second; if (itemTooltipDlg != null && itemTooltipDlg_Second != null) { Protocol_Item.Item_Use(itemTooltipDlg.Item, itemTooltipDlg.SolID); SoldierSelectDlg soldierSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLSELECT_DLG) as SoldierSelectDlg; if (soldierSelectDlg != null) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.SOLSELECT_DLG); } } } this.Close(); }
public void OnClickItemAttend(IUIObject obj) { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return; } byte index = (byte)obj.Data; ATTENDANCE aTTENDANCE = NrTSingleton <NrAttendance_Manager> .Instance.Get_ConsecutivelyattendanceIndex(index, myCharInfo.ConsecutivelyattendanceRewardType); if (aTTENDANCE != null) { ITEM iTEM = new ITEM(); iTEM.m_nItemUnique = aTTENDANCE.m_i32Item_Unique; iTEM.m_nItemNum = (int)aTTENDANCE.m_i16Item_Num; ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); } }
public void On_ClickItem(IUIObject obj) { UIScrollList uIScrollList = obj as UIScrollList; if (uIScrollList != null) { UIListItemContainer selectedItem = uIScrollList.SelectedItem; if (selectedItem != null) { ImageSlot imageSlot = selectedItem.Data as ImageSlot; if (imageSlot != null && imageSlot.c_oItem != null) { ITEM iTEM = new ITEM(); iTEM.Set(imageSlot.c_oItem as ITEM); if (iTEM != null && iTEM.m_nItemUnique > 0) { ItemTooltipDlg itemTooltipDlg = NrTSingleton<FormsManager>.Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); } } } } }
private void ClickSelectItem(IUIObject obj) { ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg; if (this.m_kSelectItem.Data is ITEM) { ITEM pkItem = (ITEM)this.m_kSelectItem.Data; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, pkItem, null, false); } else if (this.m_kSelectItem.Data is GuildWarExchangeTable) { GuildWarExchangeTable guildWarExchangeTable = (GuildWarExchangeTable)this.m_kSelectItem.Data; ITEM iTEM = new ITEM(); iTEM.Init(); iTEM.m_nItemUnique = guildWarExchangeTable.m_nItemUnique; iTEM.m_nItemNum = 1; itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false); } else { Debug.LogError("Can't Find Obj type"); itemTooltipDlg.Close(); } }
public override void Update() { base.Update(); if ((NkInputManager.GetMouseButtonDown(0) || NkInputManager.GetMouseButtonDown(1)) && NrTSingleton <FormsManager> .Instance.FocusFormID() == this.m_ParentWinID && TsPlatform.IsMobile) { Form form = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_ParentWinID); if (form != null) { if (form is ItemTooltipDlg) { ItemTooltipDlg itemTooltipDlg = form as ItemTooltipDlg; if (itemTooltipDlg != null) { itemTooltipDlg.CloseSetItemTooltip(); } } if (form is ItemTooltipDlg_Second) { ItemTooltipDlg_Second itemTooltipDlg_Second = form as ItemTooltipDlg_Second; if (itemTooltipDlg_Second != null) { itemTooltipDlg_Second.CloseSetItemTooltip(); } } if (form is Item_Box_Select_Dlg) { Item_Box_Select_Dlg item_Box_Select_Dlg = form as Item_Box_Select_Dlg; if (item_Box_Select_Dlg != null) { item_Box_Select_Dlg.CloseSetItemTooltip(); } } } } }
public void SetItemData(ITEM pItem, ItemBoxContinue_Dlg.SHOW_TYPE type = ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX) { this.m_MainBoxItem = NkUserInventory.instance.GetFirstItemByUnique(pItem.m_nItemUnique); if (this.m_MainBoxItem == null) { this.Close(); return; } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_MainBoxItem.m_nItemUnique); if (itemInfo == null) { return; } this.m_eShowType = type; if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX) { this.SetItemRandomBox(); } else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_GOLDBAR) { this.SetItemGoldBar(); } else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_EXCHANGE) { this.SetItemExchage(); } else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET) { this.SetItemTicket(); } else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED) { this.SetItemBattleSpeed(); } this.m_itItemTex.SetItemTexture(this.m_MainBoxItem); this.m_lbItemTitle.SetText(NrTSingleton <ItemManager> .Instance.GetName(this.m_MainBoxItem)); this.m_lbItemTypeName.SetText(NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType)); ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(this.m_MainBoxItem, null, false, true, G_ID.NONE); int num = 0; 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()); this.m_lbText.SetLocation(this.m_lbText.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 10f); if (itemInfo.m_strToolTipTextKey != "0") { string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey); this.m_lbText.SetFlashLabel(textFromItemHelper); } float num2 = this.m_lbText.GetLocationY() + this.m_lbText.Height + 14f; this.m_txLine.SetLocationY(num2); num2 += 14f; this.m_ItemOpenValue_Add.SetLocationY(num2); this.m_ItemOpenValue_Minus.SetLocationY(num2); this.m_ItemOpenValueSlider.SetLocationY(num2 + 24f); this.m_ItemOpenValue_textBG.SetLocationY(num2 + 7f); this.m_ItemOpenValue_Button.SetLocationY(num2 + 7f); this.m_lbItemOpenValue_Text.SetLocationY(num2 + 7f); this.m_ItemOpenValueSliderBG.SetLocationY(num2 + 19f); num2 = num2 + this.m_ItemOpenValue_Minus.GetSize().y + 14f; this.m_btClose.SetLocationY(num2 + 14f); this.m_btAllUse.SetLocationY(num2 + 14f); base.SetSize(base.GetSizeX(), num2 + 92f); this.m_txBG.SetSize(base.GetSize().x, num2 + 92f); }
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); }
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; }
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 SowCompleteItem() { if (this.m_CompleteItem == null || !this.m_CompleteItem.IsValid()) { this.Close(); return; } this.m_ivMainBoxItem.SetTexture(NrTSingleton <ItemManager> .Instance.GetItemTexture(this.m_CompleteItem.m_nItemUnique)); string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_CompleteItem.m_nItemUnique); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("572"), "Count", this.m_nCompleteItemNum }); this.m_laSelectItemName.SetText(itemNameByItemUnique); this.m_laSelectItemCount.SetText(empty); ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(this.m_CompleteItem, null, false, false, G_ID.NONE); int num = 10; if (array.Length > 0) { if (array.Length > 2) { array[1].m_OptionName = "\n" + array[1].m_OptionName; array[1].m_OptionValue = "\n" + array[1].m_OptionValue; } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); for (int i = 0; i < array.Length; i++) { stringBuilder.Append(array[i].m_OptionName); stringBuilder2.Append(array[i].m_OptionValue); } this.m_flToolTip4.SetFlashLabel(stringBuilder.ToString()); this.m_flToolTip5.SetFlashLabel(stringBuilder2.ToString()); } else { this.m_flToolTip4.SetFlashLabel(string.Empty); this.m_flToolTip5.SetFlashLabel(string.Empty); num = 110; } if (!Protocol_Item.Is_EquipItem(this.m_CompleteItem.m_nItemUnique)) { this.m_flToolTip6.SetLocation(this.m_flToolTip6.GetLocation().x, this.m_flToolTip5.GetLocationY() + this.m_flToolTip5.Height + (float)num); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_CompleteItem.m_nItemUnique); if (itemInfo.m_strToolTipTextKey != "0") { string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey); this.m_flToolTip6.SetFlashLabel(textFromItemHelper); } else { this.m_flToolTip6.SetFlashLabel(string.Empty); } } this.m_NlbItemListBox.Visible = false; this.m_flToolTip1.Hide(true); this.m_flToolTip2.Hide(true); this.m_flToolTip3.Hide(true); this.m_btSlide1.Hide(true); this.m_btSlide2.Hide(true); this.m_dwSlideBG1.Hide(true); this.m_dwSlideBG2.Hide(true); this.m_laSelectItemName.Hide(false); this.m_flToolTip4.Hide(false); this.m_flToolTip5.Hide(false); this.m_flToolTip6.Hide(false); if (this.m_BoxitemCount > 0) { this.m_btUseBoxItem.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2484")); } else { this.m_btUseBoxItem.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("415")); } this.m_btUseBoxItem.Hide(false); string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_CompleteItem.m_nItemUnique); if (!string.IsNullOrEmpty(itemMaterialCode)) { TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "SELECT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } TsAudioManager.Container.RequestAudioClip("UI_SFX", "ETC", "ROULETTE_POP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); }
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); }