コード例 #1
0
        private string?folderPathForItemType(ItemTypeEnum type)
        {
            //handle exceptions first
            if (type == ItemTypeEnum.IronHideAmulet)
            {
                return(Path.Combine(BasePathToItemImages, "Items", "Amulets"));
            }

            var basePath = type.isInPatch1() ? Patch1PathToItemImages : BasePathToItemImages;

            if (type.isArtifact())
            {
                return(Path.Combine(basePath, "Items"));
            }
            if (type.isArmor())
            {
                return(Path.Combine(basePath, "Equipment", "Armor"));
            }
            if (type.isMeleeWeapon())
            {
                return(Path.Combine(basePath, "Equipment", "MeleeWeapons"));
            }
            if (type.isRangedWeapon())
            {
                return(Path.Combine(basePath, "Equipment", "RangedWeapons"));
            }

            return(null);
        }