示例#1
0
 public CraftMagicItemsBlueprintPatcher(CraftMagicItemsAccessors accessors, bool modEnabled)
 {
     this.accessors = accessors;
     CustomBlueprintBuilder.Initialise(ApplyBlueprintPatch, modEnabled,
                                       "d8e1ebc1062d8cc42abff78783856b0d#CraftMagicItems(Component[1]=CraftMagicItems.WeaponSizeChange#CraftMagicItems,Component[1].SizeCategoryChange=1)",
                                       "d8e1ebc1062d8cc42abff78783856b0d#CraftMagicItems(Component[1]=CraftMagicItems.WeaponBaseSizeChange#CraftMagicItems,Component[1].SizeCategoryChange=1)");
 }
示例#2
0
        public string BuildCustomSpellItemGuid(string originalGuid, int casterLevel, int spellLevel = -1, string spellId = null)
        {
            // Check if GUID is already customised by this mod
            var match = BlueprintRegex.Match(originalGuid);

            if (match.Success && match.Groups["casterLevel"].Success)
            {
                // Remove the existing customisation
                originalGuid = CustomBlueprintBuilder.AssetGuidWithoutMatch(originalGuid, match);
                // Use any values which aren't explicitly overridden
                if (spellLevel == -1 && match.Groups["spellLevelMatch"].Success)
                {
                    spellLevel = int.Parse(match.Groups["spellLevel"].Value);
                }

                if (spellId == null && match.Groups["spellIdMatch"].Success)
                {
                    spellId = match.Groups["spellId"].Value;
                }
            }

            return($"{originalGuid}{BlueprintPrefix}(CL={casterLevel}" +
                   $"{(spellLevel == -1 ? "" : $",SL={spellLevel}")}" +