-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/max_item_option_level_drop
- Loading branch information
Showing
14 changed files
with
198 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Persistence/Initialization/Updates/FixWingsDmgRatesUpdatePlugIn075.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// <copyright file="FixWingsDmgRatesUpdatePlugIn075.cs" company="MUnique"> | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace MUnique.OpenMU.Persistence.Initialization.Updates; | ||
|
||
using System.Runtime.InteropServices; | ||
using MUnique.OpenMU.AttributeSystem; | ||
using MUnique.OpenMU.PlugIns; | ||
|
||
/// <summary> | ||
/// This update fixes the wings damage absorption and increase bonus level tables values for a <see cref="CombinedElement"/> (sum) calculation, instead of a compound calculation | ||
/// for version 075. | ||
/// </summary> | ||
[PlugIn(PlugInName, PlugInDescription)] | ||
[Guid("3821267A-9C37-40E5-B023-BAB1A8E4DAB7")] | ||
public class FixWingsDmgRatesUpdatePlugIn075 : FixWingsDmgRatesUpdatePlugInBase | ||
{ | ||
/// <inheritdoc /> | ||
public override string DataInitializationKey => Version075.DataInitialization.Id; | ||
|
||
/// <inheritdoc /> | ||
public override UpdateVersion Version => UpdateVersion.FixWingsDmgRatesPlugIn075; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Persistence/Initialization/Updates/FixWingsDmgRatesUpdatePlugIn095d.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// <copyright file="FixWingsDmgRatesUpdatePlugIn095d.cs" company="MUnique"> | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace MUnique.OpenMU.Persistence.Initialization.Updates; | ||
|
||
using System.Runtime.InteropServices; | ||
using MUnique.OpenMU.AttributeSystem; | ||
using MUnique.OpenMU.PlugIns; | ||
|
||
/// <summary> | ||
/// This update fixes the wings damage absorption and increase bonus level tables values for a <see cref="CombinedElement"/> (sum) calculation, instead of a compound calculation | ||
/// for version 095d. | ||
/// </summary> | ||
[PlugIn(PlugInName, PlugInDescription)] | ||
[Guid("F45FA4D0-B19B-48E2-9592-A37F3B36348A")] | ||
public class FixWingsDmgRatesUpdatePlugIn095D : FixWingsDmgRatesUpdatePlugInBase | ||
{ | ||
/// <inheritdoc /> | ||
public override string DataInitializationKey => Version095d.DataInitialization.Id; | ||
|
||
/// <inheritdoc /> | ||
public override UpdateVersion Version => UpdateVersion.FixWingsDmgRatesPlugIn095d; | ||
} |
59 changes: 59 additions & 0 deletions
59
src/Persistence/Initialization/Updates/FixWingsDmgRatesUpdatePlugInBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// <copyright file="FixWingsDmgRatesUpdatePlugInBase.cs" company="MUnique"> | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace MUnique.OpenMU.Persistence.Initialization.Updates; | ||
|
||
using MUnique.OpenMU.AttributeSystem; | ||
using MUnique.OpenMU.DataModel.Configuration; | ||
|
||
/// <summary> | ||
/// This update fixes the wings damage absorption and increase bonus level tables values for a <see cref="CombinedElement"/> (sum) calculation, instead of a compound calculation. | ||
/// </summary> | ||
public abstract class FixWingsDmgRatesUpdatePlugInBase : UpdatePlugInBase | ||
{ | ||
/// <summary> | ||
/// The plug in name. | ||
/// </summary> | ||
internal const string PlugInName = "Fix Wings Damage Rates"; | ||
|
||
/// <summary> | ||
/// The plug in description. | ||
/// </summary> | ||
internal const string PlugInDescription = "This update fixes the wings damage absorption and increase bonus level tables values."; | ||
|
||
/// <inheritdoc /> | ||
public override string Name => PlugInName; | ||
|
||
/// <inheritdoc /> | ||
public override string Description => PlugInDescription; | ||
|
||
/// <inheritdoc /> | ||
public override bool IsMandatory => true; | ||
|
||
/// <inheritdoc /> | ||
public override DateTime CreatedAt => new(2023, 10, 8, 16, 0, 0, DateTimeKind.Utc); | ||
|
||
/// <inheritdoc /> | ||
protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration) | ||
{ | ||
string dmgAbsorbCommonName = "Wing absorb"; | ||
string dmgIncreaseCommonName = "Damage Increase (1st and 3rd Wings)"; | ||
string dmgIncrease2ndWingsName = "Damage Increase (2nd Wings)"; | ||
|
||
string[] wingDmgTableNames = [dmgAbsorbCommonName, dmgIncrease2ndWingsName, dmgIncreaseCommonName]; | ||
|
||
foreach (var tableName in wingDmgTableNames) | ||
{ | ||
var bonusEntries = gameConfiguration.ItemLevelBonusTables.FirstOrDefault(ilbt => ilbt.Name == tableName)?.BonusPerLevel; | ||
|
||
if (bonusEntries is not null) | ||
{ | ||
foreach (var bonusEntry in bonusEntries) | ||
{ | ||
bonusEntry.AdditionalValue -= 1.0f; | ||
} | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Persistence/Initialization/Updates/FixWingsDmgRatesUpdatePlugInSeason6.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// <copyright file="FixWingsDmgRatesUpdatePlugInSeason6.cs" company="MUnique"> | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace MUnique.OpenMU.Persistence.Initialization.Updates; | ||
|
||
using System.Runtime.InteropServices; | ||
using MUnique.OpenMU.AttributeSystem; | ||
using MUnique.OpenMU.PlugIns; | ||
|
||
/// <summary> | ||
/// This update fixes the wings damage absorption and increase bonus level tables values for a <see cref="CombinedElement"/> (sum) calculation, instead of a compound calculation | ||
/// for season 6. | ||
/// </summary> | ||
[PlugIn(PlugInName, PlugInDescription)] | ||
[Guid("03F49890-CB0E-40B7-A590-174BBA1962F4")] | ||
public class FixWingsDmgRatesUpdatePlugInSeason6 : FixWingsDmgRatesUpdatePlugInBase | ||
{ | ||
/// <inheritdoc /> | ||
public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id; | ||
|
||
/// <inheritdoc /> | ||
public override UpdateVersion Version => UpdateVersion.FixWingsDmgRatesPlugInSeason6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters