void UpdateItemInfo() { CActionItem_Item item = SuperTooltips.Instance.GetActionItem() as CActionItem_Item; if (item != null) { itemAction.SetTexture(IconManager.Instance.GetIcon(item.GetIconName())); itemName.Text = item.GetName(); itemReqLevel.Text = item.GetItemLevel().ToString(); itemDesc.Text = UIString.Instance.ParserString_Runtime(item.GetDesc()); itemGo.SetActiveRecursively(true); } }
void UpdateEquipInfo() { CActionItem_Item equip = SuperTooltips.Instance.GetActionItem() as CActionItem_Item; if (equip != null) { equipAction.SetTexture(IconManager.Instance.GetIcon(equip.GetIconName())); equipName.Text = equip.GetName(); equipStrongLv.Text = "强化等级:" + equip.GetStrengthLevel(); equipReqLv.Text = equip.GetItemLevel().ToString(); if (equip.GetNeedJob() >= 0 && equip.GetNeedJob() <= 3) { equipReqJob.Text = jobNames[equip.GetNeedJob()]; } else { equipReqJob.Text = "无限制"; } equipType.Text = equip.GetEquipType(); equipAttInfo.Text = UIString.Instance.ParserString_Runtime(equip.GetAttributeValue(ITEMATTRIBUTE.ITEMATTRIBUTE_WHITE_ATT)); // 获得宝石属性 [3/29/2012 Ivan] CObject_Item_Equip itemEquip = equip.GetImpl() as CObject_Item_Equip; if (itemEquip != null) { int i = 0; for (; i < itemEquip.GetGemCount(); i++) { string info = ""; itemEquip.GetGemExtAttr(i, ref info); if (string.IsNullOrEmpty(info)) { equipGemInfos[i].Text = "RGBA(0.56, 0.56, 0.56, 1.000)未镶嵌"; } else { equipGemInfos[i].Text = "RGBA(0.48, 0.917, 0.34, 1.000)" + UIString.Instance.ParserString_Runtime(info); } } } equipSelPrice.Text = equip.GetAttributeValue(ITEMATTRIBUTE.ITEMATTRIBUTE_PRICE); equipGo.SetActiveRecursively(true); } }
void ShowShengDangInfo(int index) { ShengDangItem = sItem[index]; ShengDangImageButton[0].UpdateItem(ShengDangItem.GetID()); int j = ShengDangPage[nTheIndex] * 10; for (int i = 0; i < 10; i++) { if (i + j >= sItem.Count) { ShengDangNames[i].Text = ""; ShengDangLevels[i].Text = ""; ShengDangRadios[i].Hide(true); } else { ShengDangNames[i].Text = sItem[i + j].GetName(); ShengDangLevels[i].Text = "档次:" + sItem[i + j].GetCurrentDangCi(); ShengDangRadios[i].Hide(false); } } int selectIndex = (int)ShengDangSelect[nTheIndex]; if (ShengDangPage[nTheIndex] == ShengDangPageRadio[nTheIndex]) { ShengDangRadios[selectIndex].Value = true; } else { ShengDangRadios[selectIndex].Value = false; } ShengDangPageNum.Text = (ShengDangPage[nTheIndex] + 1) + "/" + GetPageNum(); ShengDangPreEnchanceLevel.Text = "强化等级:" + CDataPool.Instance.GetStrengthLevelDesc(ShengDangItem.GetStrengthLevel()); if (ShengDangItem.GetCurrentDangCi() == -1) { ShengDangCurrentDangCi.Text = ""; ShengDangNextDangCi.Text = "档次1"; } else { ShengDangCurrentDangCi.Text = "档次:" + ShengDangItem.GetCurrentDangCi(); ShengDangNextDangCi.Text = "档次:" + (ShengDangItem.GetCurrentDangCi() + 1); } Lua_Item_LevelUp item = LifeAbility.Instance.Get_Equip_LevelUpMaterial(ShengDangItem.GetCurrentDangCi()); CObject_Item pItemObj1 = ObjectSystem.Instance.NewItem((uint)item.needItemID); CObject_Item pItemObj2 = ObjectSystem.Instance.NewItem((uint)item.needItemID2); CActionItem_Item actionItem1 = CActionSystem.Instance.GetAction_ItemID(pItemObj1.GetID()); CActionItem_Item actionItem2 = CActionSystem.Instance.GetAction_ItemID(pItemObj2.GetID()); MaterialName[0].Text = actionItem1.GetName(); MaterialName[1].Text = actionItem2.GetName(); MaterialButton[0].SetActionItemByActionId(actionItem1.GetID()); MaterialButton[1].SetActionItemByActionId(actionItem2.GetID()); int count1 = CDataPool.Instance.UserBag_CountItemByIDTable(item.needItemID); int count2 = CDataPool.Instance.UserBag_CountItemByIDTable(item.needItemID2); if (count1 >= item.needItemNum) { count1 = item.needItemNum; } else if (count1 == -1) { count1 = 0; } if (count2 >= item.needItem2Num) { count2 = item.needItem2Num; } else if (count2 == -1) { count2 = 0; } MaterialNum[0].Text = count1 + "/" + item.needItemNum; MaterialNum[1].Text = count2 + "/" + item.needItem2Num; ShengDangMoney.Text = item.money.ToString(); }