Example #1
0
    private void SetGem()
    {
        GemItem     gem         = select_gem == null ? null : GemItemConfig.GetGemItem(int.Parse(select_gem.itemID));
        GemCompound compound    = select_gem == null ? null : GemCompoundConfig.GetGemCompound(int.Parse(select_gem.itemID));
        GemItem     compoundGem = compound == null?null: GemItemConfig.GetGemItem(compound.compoundId);


        string name = select_gem == null?TextManager.GetUIString("UI2065") : TextManager.GetItemString(select_gem.itemID);

        string prop_name   = gem == null ? " " : TextManager.GetUIString(gem.propType);
        string prop_value  = gem == null ? " " : gem.propValue.ToString();
        string prop_value1 = compoundGem == null ? " " : compoundGem.propValue.ToString();

        panel.next.gameObject.SetActive(gem != null && gem.level < 9);
        panel.compoundBtn.gameObject.SetActive(gem != null && gem.level < 9);

        panel.info.FindChild("gem_name").GetComponent <UILabel>().text   = name;
        panel.info.FindChild("prop_name").GetComponent <UILabel>().text  = prop_name;
        panel.next.FindChild("prop_name1").GetComponent <UILabel>().text = prop_name;
        panel.next.FindChild("prop_name2").GetComponent <UILabel>().text = prop_name;

        panel.info.FindChild("prop_value").GetComponent <UILabel>().text  = prop_value;
        panel.next.FindChild("prop_value1").GetComponent <UILabel>().text = prop_value;
        panel.next.FindChild("prop_value2").GetComponent <UILabel>().text = prop_value1;

        panel.info.FindChild("descTxt3").gameObject.SetActive(compound_list.Count == 0);
        panel.info.FindChild("descTxt4").gameObject.SetActive(gem != null && gem.level == 9);
    }
Example #2
0
    private void OnClick(GameObject go)
    {
        if (select_gem == null)
        {
            GUIManager.SetPromptInfo(TextManager.GetUIString("UI2066"), null);
            return;
        }
        GemCompound gem = GemCompoundConfig.GetGemCompound(int.Parse(select_gem.itemID));

        if (gem == null)
        {
            return;
        }

        ServerCustom.instance.SendClientMethods(EquipProxy.CLIENT_COMPOUND_GEM, GameConvert.LongConvert(select_gem.uuid));
    }
Example #3
0
    private List <object> AddListGrid(List <Item> list)
    {
        List <object> listObj = new List <object>();

        for (int i = 0; i < list.Count; ++i)
        {
            ItemInfo info = ItemManager.GetItemInfo(list[i].itemID);

            list[i].bagID = 1;
            if (info.tabType == (int)ItemType.Gem && list[i].amount > 2)
            {
                GemCompound compound = GemCompoundConfig.GetGemCompound(int.Parse(list[i].itemID));
                if (compound != null)
                {
                    listObj.Add(list[i]);
                }
            }
        }
        return(listObj);
    }
Example #4
0
 private void OnReadRow(GemCompound row)
 {
     m_data[row.id] = row;
 }