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 void ConvertItemInfo(ITEM pItem) { if (pItem == null) { return; } pItem.Set(this.m_kBaseItem); }
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 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 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_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(); }