Beispiel #1
0
    public FumoTipUIInfo GetFumoTipUIInfo(int slot)
    {
        int fomoAvaliableNum;
        int currentFomoNum;

        FumoTipUIInfo info = new FumoTipUIInfo();

        fomoAvaliableNum = InventoryManager.Instance.EquipOnDic[slot].GetEnhantSum();
        int           quality  = InventoryManager.Instance.EquipOnDic[slot].GetEnhantQuality();
        List <string> despList = GetToRelpaceFumoListDesp(slot);

        if (!m_data.ContainsKey(slot))
        {
            currentFomoNum = 0;
        }
        else
        {
            currentFomoNum = despList.Count;
        }
        if (fomoAvaliableNum == 0 && currentFomoNum == 0)
        {
            return(null);
        }

        string hasNotActiveStr = LanguageData.GetContent(1355);
        string hasNotEnhantStr = LanguageData.GetContent(1356);
        int    count           = Mathf.Max(fomoAvaliableNum, currentFomoNum);

        info.fomoDesp = new List <string>();
        for (int i = 1; i <= count; i++)
        {
            string temp = string.Empty;
            if (i > currentFomoNum)
            {
                temp = hasNotEnhantStr;
            }
            else if (i > fomoAvaliableNum)
            {
                temp = despList[i - 1] + hasNotActiveStr;
            }
            else
            {
                temp = despList[i - 1];
            }
            info.fomoDesp.Add(MogoUtils.GetStrWithQulityColor(temp, quality));
        }

        info.fumoTitle = LanguageData.GetContent(1354, currentFomoNum, fomoAvaliableNum);
        info.fumoTitle = MogoUtils.GetStrWithQulityColor(info.fumoTitle, quality);
        return(info);
    }