feat(maps): add Acheron, Debenter, Uruk, Ferea (maps 83-86)
Same pattern as Arkania: terrain resources Terrain84-87.att, map initializer classes, registration, and update-plugin (v97) that creates each map + spawn gate + /move warp AND assigns it to the game server configuration so it is hosted. Also fix the Arkania update-plugin to assign the game server config (was missing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
<None Remove="Resources\075_Terrain8.att" />
|
||||
<None Remove="Resources\Terrain1.att" />
|
||||
<None Remove="Resources\Terrain83.att" />
|
||||
<None Remove="Resources\Terrain84.att" />
|
||||
<None Remove="Resources\Terrain85.att" />
|
||||
<None Remove="Resources\Terrain86.att" />
|
||||
<None Remove="Resources\Terrain87.att" />
|
||||
<None Remove="Resources\Terrain10_1.att" />
|
||||
<None Remove="Resources\Terrain10_2.att" />
|
||||
<None Remove="Resources\Terrain10_3.att" />
|
||||
@@ -105,6 +109,10 @@
|
||||
<EmbeddedResource Include="Resources\075_Terrain8.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain1.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain83.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain84.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain85.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain86.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain87.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain10_4.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain10_3.att" />
|
||||
<EmbeddedResource Include="Resources\Terrain10_2.att" />
|
||||
|
||||
BIN
src/Persistence/Initialization/Resources/Terrain84.att
Normal file
BIN
src/Persistence/Initialization/Resources/Terrain84.att
Normal file
Binary file not shown.
BIN
src/Persistence/Initialization/Resources/Terrain85.att
Normal file
BIN
src/Persistence/Initialization/Resources/Terrain85.att
Normal file
Binary file not shown.
BIN
src/Persistence/Initialization/Resources/Terrain86.att
Normal file
BIN
src/Persistence/Initialization/Resources/Terrain86.att
Normal file
Binary file not shown.
BIN
src/Persistence/Initialization/Resources/Terrain87.att
Normal file
BIN
src/Persistence/Initialization/Resources/Terrain87.att
Normal file
Binary file not shown.
@@ -41,20 +41,31 @@ public class AddArkaniaMapUpdateSeason6 : UpdatePlugInBase
|
||||
public override DateTime CreatedAt => new(2026, 07, 19, 12, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
// Idempotency guard: skip if Arkania (83) already exists.
|
||||
// Idempotency guard: skip if Arkania (82) already exists.
|
||||
if (gameConfiguration.Maps.Any(m => m.Number == Arkania.Number))
|
||||
{
|
||||
return default;
|
||||
return;
|
||||
}
|
||||
|
||||
var initializer = new Arkania(context, gameConfiguration);
|
||||
initializer.Initialize(); // creates map 83 + loads terrain from Terrain84.att
|
||||
initializer.Initialize(); // creates map 82 + loads terrain from Terrain83.att
|
||||
initializer.SetSafezoneMap();
|
||||
|
||||
var arkania = gameConfiguration.Maps.First(m => m.Number == Arkania.Number);
|
||||
|
||||
// Host the map on every game server configuration (fresh seeds do this
|
||||
// automatically, but existing databases need it added explicitly).
|
||||
var serverConfigs = await context.GetAsync<GameServerConfiguration>().ConfigureAwait(false);
|
||||
foreach (var serverConfig in serverConfigs)
|
||||
{
|
||||
if (serverConfig.Maps.All(m => m.Number != Arkania.Number))
|
||||
{
|
||||
serverConfig.Maps.Add(arkania);
|
||||
}
|
||||
}
|
||||
|
||||
// Spawn gate on a walkable tile (center of the map; attr 0x00, verified walkable).
|
||||
var spawnGate = context.CreateNew<ExitGate>();
|
||||
arkania.ExitGates.Add(spawnGate);
|
||||
@@ -76,7 +87,5 @@ public class AddArkaniaMapUpdateSeason6 : UpdatePlugInBase
|
||||
warp.LevelRequirement = 10;
|
||||
warp.Gate = spawnGate;
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
// <copyright file="AddImportedMapsUpdateSeason6.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.DataModel.Configuration;
|
||||
using MUnique.OpenMU.Persistence.Initialization.VersionSeasonSix.Maps;
|
||||
using MUnique.OpenMU.PlugIns;
|
||||
|
||||
/// <summary>
|
||||
/// Adds the four imported maps Acheron (83), Debenter (84), Uruk (85) and Ferea (86):
|
||||
/// the map definitions with their terrain, a spawn gate and a /move warp each, and
|
||||
/// assigns each to the game server configuration so it is hosted and its spawns run.
|
||||
/// Monsters and NPCs are added afterwards via the admin panel.
|
||||
/// </summary>
|
||||
[PlugIn]
|
||||
[Display(Name = PlugInName, Description = PlugInDescription)]
|
||||
[Guid("3D9C1B72-7C3F-4E8B-AF14-E29D47A8B012")]
|
||||
public class AddImportedMapsUpdateSeason6 : UpdatePlugInBase
|
||||
{
|
||||
internal const string PlugInName = "Add imported maps (Acheron, Debenter, Uruk, Ferea)";
|
||||
internal const string PlugInDescription = "Adds maps 83-86 (Acheron, Debenter, Uruk, Ferea) with terrain, spawn gate and /move warp, hosted by the game server. Monsters/NPCs are added via the admin panel.";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override UpdateVersion Version => UpdateVersion.AddImportedMapsSeason6;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => PlugInName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Description => PlugInDescription;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsMandatory => true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DateTime CreatedAt => new(2026, 07, 19, 15, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
var serverConfigs = (await context.GetAsync<GameServerConfiguration>().ConfigureAwait(false)).ToList();
|
||||
|
||||
AddMap(context, gameConfiguration, serverConfigs, new Acheron(context, gameConfiguration), Acheron.Number, Acheron.Name, 84, 127, 126);
|
||||
AddMap(context, gameConfiguration, serverConfigs, new Debenter(context, gameConfiguration), Debenter.Number, Debenter.Name, 85, 132, 105);
|
||||
AddMap(context, gameConfiguration, serverConfigs, new Uruk(context, gameConfiguration), Uruk.Number, Uruk.Name, 86, 128, 128);
|
||||
AddMap(context, gameConfiguration, serverConfigs, new Ferea(context, gameConfiguration), Ferea.Number, Ferea.Name, 87, 128, 128);
|
||||
}
|
||||
|
||||
private static void AddMap(IContext context, GameConfiguration gameConfiguration, IList<GameServerConfiguration> serverConfigs, IMapInitializer initializer, byte number, string name, short warpIndex, byte x, byte y)
|
||||
{
|
||||
// Idempotency guard: skip if the map already exists.
|
||||
if (gameConfiguration.Maps.Any(m => m.Number == number))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
initializer.Initialize(); // creates the map + loads terrain from Terrain{number+1}.att
|
||||
initializer.SetSafezoneMap();
|
||||
|
||||
var map = gameConfiguration.Maps.First(m => m.Number == number);
|
||||
|
||||
// Spawn gate on a walkable tile.
|
||||
var spawnGate = context.CreateNew<ExitGate>();
|
||||
map.ExitGates.Add(spawnGate);
|
||||
spawnGate.Map = map;
|
||||
spawnGate.X1 = x;
|
||||
spawnGate.Y1 = y;
|
||||
spawnGate.X2 = x;
|
||||
spawnGate.Y2 = y;
|
||||
spawnGate.IsSpawnGate = true;
|
||||
|
||||
// /move warp entry.
|
||||
if (gameConfiguration.WarpList.All(w => w.Name != name))
|
||||
{
|
||||
var warp = context.CreateNew<WarpInfo>();
|
||||
gameConfiguration.WarpList.Add(warp);
|
||||
warp.Index = warpIndex;
|
||||
warp.Name = name;
|
||||
warp.Costs = 5000;
|
||||
warp.LevelRequirement = 10;
|
||||
warp.Gate = spawnGate;
|
||||
}
|
||||
|
||||
// Host the map on every game server configuration (fresh seeds do this
|
||||
// automatically, but existing databases need it added explicitly).
|
||||
foreach (var serverConfig in serverConfigs)
|
||||
{
|
||||
if (serverConfig.Maps.All(m => m.Number != number))
|
||||
{
|
||||
serverConfig.Maps.Add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -489,4 +489,9 @@ public enum UpdateVersion
|
||||
/// The version of the <see cref="AddArkaniaMapUpdateSeason6"/>.
|
||||
/// </summary>
|
||||
AddArkaniaMapSeason6 = 96,
|
||||
|
||||
/// <summary>
|
||||
/// The version of the <see cref="AddImportedMapsUpdateSeason6"/> (Acheron, Debenter, Uruk, Ferea).
|
||||
/// </summary>
|
||||
AddImportedMapsSeason6 = 97,
|
||||
}
|
||||
@@ -101,6 +101,10 @@ public class GameMapsInitializer : GameMapsInitializerBase
|
||||
yield return typeof(FortressOfImperialGuardian3);
|
||||
yield return typeof(FortressOfImperialGuardian4);
|
||||
yield return typeof(Arkania);
|
||||
yield return typeof(Acheron);
|
||||
yield return typeof(Debenter);
|
||||
yield return typeof(Uruk);
|
||||
yield return typeof(Ferea);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// <copyright file="Acheron.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.VersionSeasonSix.Maps;
|
||||
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// The initialization for the Acheron map (imported map). Seeded empty; monster/NPC
|
||||
/// spawns and gates are added via the admin panel.
|
||||
/// </summary>
|
||||
internal class Acheron : BaseMapInitializer
|
||||
{
|
||||
/// <summary>
|
||||
/// The Number of the Map.
|
||||
/// </summary>
|
||||
internal const byte Number = 83;
|
||||
|
||||
/// <summary>
|
||||
/// The Name of the Map.
|
||||
/// </summary>
|
||||
internal const string Name = "Acheron";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Acheron"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public Acheron(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override byte MapNumber => Number;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override string MapName => Name;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// <copyright file="Debenter.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.VersionSeasonSix.Maps;
|
||||
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// The initialization for the Debenter map (imported map). Seeded empty; monster/NPC
|
||||
/// spawns and gates are added via the admin panel.
|
||||
/// </summary>
|
||||
internal class Debenter : BaseMapInitializer
|
||||
{
|
||||
/// <summary>
|
||||
/// The Number of the Map.
|
||||
/// </summary>
|
||||
internal const byte Number = 84;
|
||||
|
||||
/// <summary>
|
||||
/// The Name of the Map.
|
||||
/// </summary>
|
||||
internal const string Name = "Debenter";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Debenter"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public Debenter(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override byte MapNumber => Number;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override string MapName => Name;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// <copyright file="Ferea.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.VersionSeasonSix.Maps;
|
||||
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// The initialization for the Ferea map (imported map). Seeded empty; monster/NPC
|
||||
/// spawns and gates are added via the admin panel.
|
||||
/// </summary>
|
||||
internal class Ferea : BaseMapInitializer
|
||||
{
|
||||
/// <summary>
|
||||
/// The Number of the Map.
|
||||
/// </summary>
|
||||
internal const byte Number = 86;
|
||||
|
||||
/// <summary>
|
||||
/// The Name of the Map.
|
||||
/// </summary>
|
||||
internal const string Name = "Ferea";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Ferea"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public Ferea(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override byte MapNumber => Number;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override string MapName => Name;
|
||||
}
|
||||
40
src/Persistence/Initialization/VersionSeasonSix/Maps/Uruk.cs
Normal file
40
src/Persistence/Initialization/VersionSeasonSix/Maps/Uruk.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// <copyright file="Uruk.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.VersionSeasonSix.Maps;
|
||||
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// The initialization for the Uruk map (imported map). Seeded empty; monster/NPC
|
||||
/// spawns and gates are added via the admin panel.
|
||||
/// </summary>
|
||||
internal class Uruk : BaseMapInitializer
|
||||
{
|
||||
/// <summary>
|
||||
/// The Number of the Map.
|
||||
/// </summary>
|
||||
internal const byte Number = 85;
|
||||
|
||||
/// <summary>
|
||||
/// The Name of the Map.
|
||||
/// </summary>
|
||||
internal const string Name = "Uruk";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Uruk"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public Uruk(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override byte MapNumber => Number;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override string MapName => Name;
|
||||
}
|
||||
Reference in New Issue
Block a user