// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.Persistence.Initialization.Updates; using System.Runtime.InteropServices; using MUnique.OpenMU.AttributeSystem; using MUnique.OpenMU.DataModel.Configuration; using MUnique.OpenMU.Persistence.Initialization.Skills; using MUnique.OpenMU.PlugIns; /// /// This update sets the right settings for the life swell effect. /// [PlugIn] [Display(Name = PlugInName, Description = PlugInDescription)] [Guid("FD521A61-D5B4-4CF2-B203-6FFF12C80E51")] public class FixLifeSwellEffectUpdatePlugIn : UpdatePlugInBase { /// /// The plug in name. /// internal const string PlugInName = "Fixed life swell effect"; /// /// The plug in description. /// internal const string PlugInDescription = "This update sets the right settings for the life swell effect."; /// public override string Name => PlugInName; /// public override string Description => PlugInDescription; /// public override UpdateVersion Version => UpdateVersion.FixLifeSwellEffect; /// public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id; /// public override bool IsMandatory => true; /// public override DateTime CreatedAt => new(2024, 08, 25, 15, 05, 0, DateTimeKind.Utc); /// protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration) { var effect = gameConfiguration.MagicEffects.FirstOrDefault(m => m.Number == (short)MagicEffectNumber.GreaterFortitude); if (effect is null) { return; } var boost = effect.PowerUpDefinitions.FirstOrDefault()?.Boost; if (boost is null) { return; } foreach (var relatedValue in boost.RelatedValues) { relatedValue.InputOperator = InputOperator.ExponentiateByAttribute; } } }