Exemple #1
0
    protected override void SetupFromSplitJsonString(string[] splitJsonString)
    {
        name               = splitJsonString[0];
        notes              = CreateStringFromSafeJson(splitJsonString[1]);
        m_Books            = EnumSetting.Load(splitJsonString[2]);
        m_CharacterClasses = EnumSetting.Load(splitJsonString[3]);
        m_ShopSizes        = EnumSetting.Load(splitJsonString[4]);
        m_SettlementSizes  = EnumSetting.Load(splitJsonString[5]);
        m_Rarities         = EnumSetting.Load(splitJsonString[6]);
        m_Allowances       = EnumSetting.Load(splitJsonString[7]);
        m_UsesAutomaticBonusProgressionRules = Wrapper <bool> .CreateFromJsonString(splitJsonString[8]);

        m_UsesMinimumCasterLevelForSpellContainerItems = Wrapper <bool> .CreateFromJsonString(splitJsonString[9]);

        m_CasterTypesPerCharacterClass             = SaveableSelectedEnumPerEnum.Load(splitJsonString[10]);
        m_WeightingPerRarity                       = WeightingPerRarity.Load(splitJsonString[11]);
        m_RestockSettingsPerSettlementSize         = RestockSettingsPerSettlementSize.Load(splitJsonString[12]);
        m_AvailabilityPerShopSizePerStockType      = AvailabilityPerStockTypePerShopSize.Load(splitJsonString[13]);
        m_RestockFrequencyModifiersPerShopSize     = RestockFrequencyModifiersPerShopSize.Load(splitJsonString[14]);
        m_ReadyCashPerShopSize                     = ReadyCashPerShopSize.Load(splitJsonString[15]);
        m_RarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[16]);
        m_BudgetRangePerPowerLevelPerStockType     = FloatRangePerPowerLevelPerStockType.Load(splitJsonString[17]);
        m_ArmourCollection               = ArmourCollection.Load(splitJsonString[18]);
        m_SpellCollection                = SpellCollection.Load(splitJsonString[19]);
        m_WeaponCollection               = WeaponCollection.Load(splitJsonString[20]);
        m_RingCollection                 = RingCollection.Load(splitJsonString[21]);
        m_RodCollection                  = RodCollection.Load(splitJsonString[22]);
        m_StaffCollection                = StaffCollection.Load(splitJsonString[23]);
        m_WondrousCollection             = WondrousCollection.Load(splitJsonString[24]);
        m_ArmourQualityCollection        = ArmourQualityCollection.Load(splitJsonString[25]);
        m_WeaponQualityCollection        = WeaponQualityCollection.Load(splitJsonString[26]);
        m_WeaponQualityConstraintsMatrix = WeaponQualityConstraintsMatrix.Load(splitJsonString[27]);
        m_ArmourQualityConstraintsMatrix = ArmourQualityConstraintsMatrix.Load(splitJsonString[28]);

        settlements = new Settlement[splitJsonString.Length - 29];
        for (int i = 0; i < settlements.Length; i++)
        {
            settlements[i] = Settlement.CreateFromJsonString(splitJsonString[i + 29]);
        }

        current = this;
    }
    protected override void SetupFromSplitJsonString(string[] splitJsonString)
    {
        name                 = splitJsonString[0];
        spellContainers      = EnumSetting.Load(splitJsonString[1]);
        allowances           = EnumSetting.Load(splitJsonString[2]);
        rarities             = EnumSetting.Load(splitJsonString[3]);
        characterClasses     = EnumSetting.Load(splitJsonString[4]);
        characterCasterTypes = SaveableSelectedEnumPerEnum.Load(splitJsonString[5]);
        books                = EnumSetting.Load(splitJsonString[6]);
        rarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[7]);
        spellCollectionFilter = SpellCollectionFilter.CreateFromJsonString(splitJsonString[8]);

        spells = new Spell[splitJsonString.Length - 9];
        for (int i = 0; i < spells.Length; i++)
        {
            spells[i] = Spell.CreateFromJsonString(splitJsonString[i + 9]);
        }

        spellCollectionFilter.ApplyFilter(this);
    }