RynthCore as of 2026-10-05 evening (internal 0a2043e): release 2026.10.5.20 - own dat reader, plugin manifests, UI/login hooks with Loot Editor drag-and-drop, server-message stream (API v78), raise attributes and skills (API v79), nameplate sizing and overlay opacity, engine reload held while a plugin is fighting, StatusAgent character sheet, world map and travel for DrakRemote

This commit is contained in:
Tom Bohar 2026-10-05 14:59:43 -04:00
commit 913a2a00b6
110 changed files with 12560 additions and 1151 deletions

View file

@ -6,7 +6,25 @@ namespace RynthCore.PluginCore;
public abstract class RynthPluginBase
{
public virtual uint MinimumApiVersion => RynthCoreHost.BaselineApiVersion;
/// <summary>
/// The oldest engine API the plugin starts on (RynthPluginRuntime refuses older ones). Defaults to
/// the plugin's manifest minimum (RynthPluginMinEngineApi in its csproj, compiled in as
/// [assembly: RynthPluginManifest]) so the plugin's own check and the engine's/launcher's manifest
/// check agree; without a manifest, the SDK baseline.
/// </summary>
public virtual uint MinimumApiVersion => ManifestMinimum(GetType()) ?? RynthCoreHost.BaselineApiVersion;
private static uint? ManifestMinimum(Type pluginType)
{
try
{
return System.Reflection.CustomAttributeExtensions.GetCustomAttribute<RynthPluginManifestAttribute>(pluginType.Assembly)?.MinEngineApi;
}
catch
{
return null;
}
}
protected RynthCoreApiNative Api { get; private set; }
protected RynthCoreHost Host { get; private set; }
@ -68,4 +86,21 @@ public abstract class RynthPluginBase
public virtual void OnKillNotification(string? deathMessage) { }
public virtual void OnEnchantmentAdded(uint spellId, double durationSeconds) { }
public virtual void OnEnchantmentRemoved(uint enchantmentId) { }
// v77 (RynthCoreHost.HasUiHooks): the client's screens and AC's own tooltips and drag/drop.
// The plugin's exports call these through RynthPluginRuntime; an older engine never calls them.
/// <summary>The client changed screens (<see cref="RynthScreenMode"/>): e.g. World to CharacterSelect at logout.</summary>
public virtual void OnScreenChanged(int oldMode, int newMode) { }
/// <summary>The client is shutting down and about to tear its UI down. Last chance to read AC
/// state; no ticks or events follow (Shutdown still does).</summary>
public virtual void OnClientCleanup() { }
/// <summary>AC shows a tooltip for an item (objectId) or a spell icon (spellId); both 0 for any other element.</summary>
public virtual void OnTooltipShow(uint objectId, uint spellId) { }
/// <summary>The tooltip from <see cref="OnTooltipShow"/> is gone.</summary>
public virtual void OnTooltipHide() { }
/// <summary>The player started dragging an item (objectId, its icon) or a spell (spellId) in AC's UI.</summary>
public virtual void OnDragStart(uint objectId, uint spellId, uint iconId) { }
/// <summary>AC took a dropped item or spell; targetElementId is the AC UI element it landed on.</summary>
public virtual void OnItemDropped(uint objectId, uint spellId, uint targetElementId) { }
}