public static uint GetRandomSuffixFactor(ItemTemplate template) { ItemSuffixCategory suffixCategory = GetSuffixCategory(template); if (suffixCategory >= ItemSuffixCategory.None) { return(0); } ItemLevelInfo levelInfo = ItemMgr.GetLevelInfo(template.Level); if (levelInfo != null) { switch (template.Quality) { case ItemQuality.Uncommon: return(levelInfo.UncommonPoints[(uint)suffixCategory]); case ItemQuality.Rare: return(levelInfo.RarePoints[(uint)suffixCategory]); case ItemQuality.Epic: case ItemQuality.Legendary: case ItemQuality.Artifact: return(levelInfo.EpicPoints[(uint)suffixCategory]); } } return(0); }