fix(items): reuse shared 3rd Wing Options + level tables for Poison wings (avoid Guid collision)
This commit is contained in:
@@ -20,7 +20,7 @@ using MUnique.OpenMU.PlugIns;
|
|||||||
public class AddPoisonWingsUpdateSeason6 : UpdatePlugInBase
|
public class AddPoisonWingsUpdateSeason6 : UpdatePlugInBase
|
||||||
{
|
{
|
||||||
internal const string PlugInName = "Add Poison Wing & Poison Cape (12/240, 12/241)";
|
internal const string PlugInName = "Add Poison Wing & Poison Cape (12/240, 12/241)";
|
||||||
internal const string PlugInDescription = "Adds Poison Wing (12/240, Dark Knight) and Poison Cape (12/241, Dark Lord + Rage Fighter) as basic wings.";
|
internal const string PlugInDescription = "Adds Poison Wing (12/240, Dark Knight) and Poison Cape (12/241, Dark Lord + Rage Fighter) as high-tier wings (defense, 3rd Wing Options, damage increase, fast flight).";
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override UpdateVersion Version => UpdateVersion.AddPoisonWingsSeason6;
|
public override UpdateVersion Version => UpdateVersion.AddPoisonWingsSeason6;
|
||||||
|
|||||||
@@ -112,19 +112,20 @@ public class Wings : WingsInitializerBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void CreatePoisonWings()
|
public void CreatePoisonWings()
|
||||||
{
|
{
|
||||||
// Ensure the level-bonus tables exist (Initialize() sets them for the fresh-seed
|
// High-tier imported wings. Reuse the EXISTING shared "3rd Wing Options" option set and
|
||||||
// path; the update-plugin path calls this method standalone).
|
// level-bonus tables (they already exist in the database) by fetching them from the
|
||||||
this._defenseBonusByLevelTable ??= this.CreateBonusDefensePerLevel();
|
// configuration instead of re-creating them - re-creating uses fixed Guids and would
|
||||||
this._damageIncreaseByLevelTable ??= this.CreateDamageIncreaseBonusPerLevelFirstAndThirdWings();
|
// collide when this runs as an update on an existing database.
|
||||||
var poisonWingOptions = this.CreateThirdClassWingOptions();
|
var wingOptions = this.GameConfiguration.ItemOptions.First(o => o.Name == "3rd Wing Options");
|
||||||
|
var damageTable = this.GameConfiguration.ItemLevelBonusTables.First(t => t.Name == "Damage Increase (1st and 3rd Wings)");
|
||||||
|
this._defenseBonusByLevelTable ??= this.GameConfiguration.ItemLevelBonusTables.First(t => t.Name == "Defense Bonus (1st and 2nd Wings)");
|
||||||
|
|
||||||
// High-tier imported wings: strong base defense + defense-per-level, wing options
|
// Poison Wing (12/240, Dark Knight): defense 65 + defense-per-level, 3rd Wing Options,
|
||||||
// (HP recover / physical damage / defense increase), damage increase and fast flight.
|
// damage increase, HP-recover / phys-damage / defense wing options, fast flight.
|
||||||
// Poison Wing (12/240, Dark Knight).
|
this.CreateWing(240, 5, 3, "Poison Wing", 150, 65, 220, 100, 0, 1, 0, 0, 0, 0, 0, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 42, 42, damageTable, wingOptions, movementSpeed: MovementSpeedConstants.FastWingMovementSpeed);
|
||||||
this.CreateWing(240, 5, 3, "Poison Wing", 150, 65, 220, 100, 0, 1, 0, 0, 0, 0, 0, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 42, 42, this._damageIncreaseByLevelTable, poisonWingOptions, movementSpeed: MovementSpeedConstants.FastWingMovementSpeed);
|
|
||||||
|
|
||||||
// Poison Cape (12/241, Dark Lord + Rage Fighter).
|
// Poison Cape (12/241, Dark Lord + Rage Fighter): defense 60, same rich options.
|
||||||
this.CreateWing(241, 5, 3, "Poison Cape", 150, 60, 220, 100, 0, 0, 0, 0, 1, 0, 1, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 42, 42, this._damageIncreaseByLevelTable, poisonWingOptions, movementSpeed: MovementSpeedConstants.FastWingMovementSpeed);
|
this.CreateWing(241, 5, 3, "Poison Cape", 150, 60, 220, 100, 0, 0, 0, 0, 1, 0, 1, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 42, 42, damageTable, wingOptions, movementSpeed: MovementSpeedConstants.FastWingMovementSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateFeather()
|
private void CreateFeather()
|
||||||
|
|||||||
Reference in New Issue
Block a user