feat(tvt): rename the Lorencia event NPC to "TvT Guard"
Some checks failed
.NET Core / build (push) Has been cancelled

The NPC (560) that opens the TvT registration stands in Lorencia and was seeded as
"TvT Event Gorevlisi". Renaming the seed only helps fresh databases, so update 106
renames it on existing ones too - that name is what the admin panel lists.

The name players see over its head comes from the client's own table
(Data\Local\<lang>\Npcname(<lang>).txt), not from this designation, and is changed
there separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Acentech Dev
2026-08-09 02:23:02 +03:00
parent 797e17b666
commit ede52f4176
4 changed files with 69 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ public class AddHeykelSavasiEventUpdateSeason6 : UpdatePlugInBase
var npc = context.CreateNew<MonsterDefinition>(); var npc = context.CreateNew<MonsterDefinition>();
gameConfiguration.Monsters.Add(npc); gameConfiguration.Monsters.Add(npc);
npc.Number = 560; npc.Number = 560;
npc.Designation = "TvT Event Gorevlisi"; npc.Designation = "TvT Guard";
npc.NpcWindow = NpcWindow.Undefined; npc.NpcWindow = NpcWindow.Undefined;
npc.ObjectKind = NpcObjectKind.PassiveNpc; npc.ObjectKind = NpcObjectKind.PassiveNpc;
npc.SetGuid(npc.Number); npc.SetGuid(npc.Number);

View File

@@ -0,0 +1,62 @@
// <copyright file="RenameTvTEventNpcUpdatePlugIn.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.PlugIns;
/// <summary>
/// Renames the TvT event NPC (560) which stands in Lorencia. The name is what players see over its
/// head and what the admin panel lists, so it has to change on existing databases too - the seed
/// only covers new ones.
/// </summary>
[PlugIn]
[Display(Name = PlugInName, Description = PlugInDescription)]
[Guid("7B1C5E42-9A08-4D6E-9F31-2C4A5D6E7F80")]
public class RenameTvTEventNpcUpdatePlugIn : UpdatePlugInBase
{
/// <summary>
/// The plug-in name.
/// </summary>
internal const string PlugInName = "Rename the TvT event NPC";
/// <summary>
/// The plug-in description.
/// </summary>
internal const string PlugInDescription = "This update renames the TvT event NPC (560) in Lorencia to 'TvT Guard'.";
/// <summary>The monster number of the TvT event NPC in Lorencia.</summary>
private const short TvTEventNpcNumber = 560;
/// <inheritdoc />
public override string Name => PlugInName;
/// <inheritdoc />
public override string Description => PlugInDescription;
/// <inheritdoc />
public override UpdateVersion Version => UpdateVersion.RenameTvTEventNpc;
/// <inheritdoc />
public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id;
/// <inheritdoc />
public override bool IsMandatory => false;
/// <inheritdoc />
public override DateTime CreatedAt => new(2026, 08, 09, 0, 0, 0, DateTimeKind.Utc);
/// <inheritdoc />
protected override ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
{
if (gameConfiguration.Monsters.FirstOrDefault(m => m.Number == TvTEventNpcNumber) is { } npc)
{
npc.Designation = "TvT Guard";
}
return ValueTask.CompletedTask;
}
}

View File

@@ -539,4 +539,9 @@ public enum UpdateVersion
/// bookkeeping is keyed on this value, so a collision would skip or re-run updates on live databases. /// bookkeeping is keyed on this value, so a collision would skip or re-run updates on live databases.
/// </remarks> /// </remarks>
AddCastleSiegeData = 105, AddCastleSiegeData = 105,
/// <summary>
/// The version of the <see cref="RenameTvTEventNpcUpdatePlugIn"/>.
/// </summary>
RenameTvTEventNpc = 106,
} }

View File

@@ -816,7 +816,7 @@ internal partial class NpcInitialization : Version095d.NpcInitialization
{ {
var def = this.Context.CreateNew<MonsterDefinition>(); var def = this.Context.CreateNew<MonsterDefinition>();
def.Number = 560; def.Number = 560;
def.Designation = "TvT Event Gorevlisi"; def.Designation = "TvT Guard";
def.NpcWindow = NpcWindow.Undefined; // routed via IPlayerTalkToNpcPlugIn in a later task def.NpcWindow = NpcWindow.Undefined; // routed via IPlayerTalkToNpcPlugIn in a later task
def.ObjectKind = NpcObjectKind.PassiveNpc; def.ObjectKind = NpcObjectKind.PassiveNpc;
this.GameConfiguration.Monsters.Add(def); this.GameConfiguration.Monsters.Add(def);