Esempio n. 1
0
        public static string GetSetDisplayName(ItemDrop.ItemData item, bool isMundane)
        {
            if (isMundane)
            {
                var textInfo = new CultureInfo("en-US", false).TextInfo;
                return(textInfo.ToTitleCase(item.m_shared.m_setName));
            }

            var setInfo = item.GetLegendarySetInfo();

            if (setInfo != null)
            {
                return(Localization.instance.Localize(setInfo.Name));
            }
            else
            {
                return($"<unknown set:{item.GetSetID()}>");
            }
        }
Esempio n. 2
0
 public static LegendarySetInfo GetLegendarySetInfo(this ItemDrop.ItemData itemData)
 {
     UniqueLegendaryHelper.TryGetLegendarySetInfo(itemData.GetSetID(), out var setInfo);
     return(setInfo);
 }
Esempio n. 3
0
 public static bool IsSetItem(this ItemDrop.ItemData itemData)
 {
     return(!string.IsNullOrEmpty(itemData.GetSetID()));
 }
Esempio n. 4
0
 public static bool IsPartOfSet(this ItemDrop.ItemData itemData, string setName)
 {
     return(itemData.GetSetID() == setName);
 }