Exemplo n.º 1
0
        /// <summary>
        /// Generate EffectSettings from classic EffectRecordData.
        /// </summary>
        /// <param name="effectRecordData">Classic effect record data.</param>
        /// <returns>EffectSettings.</returns>
        public EffectSettings ClassicEffectRecordToEffectSettings(SpellRecord.EffectRecordData effectRecordData, bool supportDuration, bool supportChance, bool supportMagnitude)
        {
            EffectSettings effectSettings = BaseEntityEffect.DefaultEffectSettings();

            if (supportDuration)
            {
                effectSettings.DurationBase     = effectRecordData.durationBase;
                effectSettings.DurationPlus     = effectRecordData.durationMod;
                effectSettings.DurationPerLevel = effectRecordData.durationPerLevel;
            }

            if (supportChance)
            {
                effectSettings.ChanceBase     = effectRecordData.chanceBase;
                effectSettings.ChancePlus     = effectRecordData.chanceMod;
                effectSettings.ChancePerLevel = effectRecordData.chancePerLevel;
            }

            if (supportMagnitude)
            {
                effectSettings.MagnitudeBaseMin  = effectRecordData.magnitudeBaseLow;
                effectSettings.MagnitudeBaseMax  = effectRecordData.magnitudeBaseHigh;
                effectSettings.MagnitudePlusMin  = effectRecordData.magnitudeLevelBase;
                effectSettings.MagnitudePlusMax  = effectRecordData.magnitudeLevelHigh;
                effectSettings.MagnitudePerLevel = effectRecordData.magnitudePerLevel;
            }

            return(effectSettings);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public PotionRecipe()
 {
     Settings = BaseEntityEffect.DefaultEffectSettings();
 }