fix: SK RynthILT Coalesced Aetheria cap and /clap pairing; nav switches in Settings
RynthILT 0.2.9: the chunk cap applies to Coalesced Aetheria; the aetheria WCIDs are the server's; auto-clap sends /clap only with a colour and its own trinket. RynthAi: the settings payload carries the Nav panel's Breadcrumbs and Route overlay switches.
This commit is contained in:
parent
68a7b2b451
commit
0160e2ac41
9 changed files with 251 additions and 23 deletions
|
|
@ -1109,6 +1109,8 @@ internal sealed partial class LegacyDashboardRenderer
|
|||
NavLabelMode = NavLabelModes.Clamp(s.NavLabelMode),
|
||||
NavGuideLine = s.NavGuideLine,
|
||||
NavResumeNearest = s.NavResumeNearest,
|
||||
TrackBreadcrumbs = s.NavOverlay.TrackBreadcrumbs,
|
||||
ShowRouteOverlay = s.NavOverlay.ShowRouteMarkers,
|
||||
OpenDoors = s.OpenDoors,
|
||||
OpenDoorRange = s.OpenDoorRange,
|
||||
OpenDoorsOnPathOnly = s.OpenDoorsOnPathOnly,
|
||||
|
|
@ -1349,6 +1351,8 @@ internal sealed partial class LegacyDashboardRenderer
|
|||
if (p.NavLabelMode >= 0) s.NavLabelMode = NavLabelModes.Clamp(p.NavLabelMode);
|
||||
if (p.NavGuideLine is bool guideLine) s.NavGuideLine = guideLine;
|
||||
if (p.NavResumeNearest is bool resumeNearest) s.NavResumeNearest = resumeNearest; // absent = unchanged
|
||||
if (p.TrackBreadcrumbs is bool crumbs) s.NavOverlay.TrackBreadcrumbs = crumbs; // absent = unchanged
|
||||
if (p.ShowRouteOverlay is bool routeOverlay) s.NavOverlay.ShowRouteMarkers = routeOverlay;
|
||||
s.OpenDoors = p.OpenDoors;
|
||||
s.OpenDoorRange = p.OpenDoorRange;
|
||||
if (p.OpenDoorsOnPathOnly is bool doorsOnPath) s.OpenDoorsOnPathOnly = doorsOnPath; // absent = unchanged
|
||||
|
|
|
|||
|
|
@ -1106,6 +1106,10 @@ public sealed class SettingsBridgePayload
|
|||
public int NavLabelMode { get; set; } = -1;
|
||||
public bool? NavGuideLine { get; set; }
|
||||
public bool? NavResumeNearest { get; set; }
|
||||
// NavOverlay.TrackBreadcrumbs / ShowRouteMarkers: the Nav panel's "Breadcrumbs" and "Route
|
||||
// overlay" switches, also on Settings > Navigation. Null (an older engine) = unchanged.
|
||||
public bool? TrackBreadcrumbs { get; set; }
|
||||
public bool? ShowRouteOverlay { get; set; }
|
||||
public bool OpenDoors { get; set; }
|
||||
public float OpenDoorRange { get; set; }
|
||||
public bool? OpenDoorsOnPathOnly { get; set; } // absent (an older profile or plugin) = unchanged
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
// Aetheria — "Aetheria"/"Coalesced Aetheria" gems, not equipped, appraised, not flagged
|
||||
// never-chunk (bool 9030), never levelled (ItemTotalXp quad 4 == 0), no kept
|
||||
// C / CD / CDR rating (gear ints 372 / 374 / 375; on by default), and max level
|
||||
// (int 319, up to 10 on ILT) under the configured cap (Coalesced always qualifies).
|
||||
// (int 319, up to 10 on ILT) under the configured cap. Coalesced Aetheria has its
|
||||
// level from loot too, so the cap applies to it (it used to skip the cap and could
|
||||
// chunk a level 10 piece).
|
||||
// Corrupted — "Corrupted" melee/missile weapons with no tinks (171), no imbue (179),
|
||||
// not equipped, not never-chunk, cleave (292) <= 1.
|
||||
// Peace mode only unless ChunkInCombat; waits for the result line (10 s max).
|
||||
|
|
@ -13,8 +15,10 @@
|
|||
// are loot and chunk nothing on ILT: the server answers "done" with no result line. Matching
|
||||
// them by name ending used the Flaming Lugian Hammer on Silentkelpie's 9 Coalesced Aetheria,
|
||||
// every one timed out and was skipped, and the status sat on "nothing eligible" (2026-10-15).
|
||||
// Clap: "/clap all" converts aetheria chunks + trinkets into coins server-side. Needs the
|
||||
// AutoCraftingEnabled stamp; 30 min ± 2 min interval, first attempt ~1 min after enable.
|
||||
// Clap: "/clap all" converts aetheria + trinkets into coins server-side: red (Coalesced level 1-3,
|
||||
// chunks, powder) with Empyrean Trinkets, blue with Falatacot Trinkets. Auto-clap sends it only
|
||||
// when a pair is carried. Needs the AutoCraftingEnabled stamp; 30 min ± 2 min interval, first
|
||||
// attempt ~1 min after enable.
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -90,12 +94,19 @@ internal sealed class IltChunkClap : IIltFeature
|
|||
if (KeptForRatings(G, inv.Int(wo, IltInventory.IntGearCrit), inv.Int(wo, IltInventory.IntGearCritDamage),
|
||||
inv.Int(wo, IltInventory.IntGearCritDamageResist)))
|
||||
return false;
|
||||
return coalesced || inv.Int(wo, IltInventory.IntItemMaxLevel) < ClampUnderLevel(G.ChunkAetheriaUnderLevel);
|
||||
return UnderChunkCap(inv.Int(wo, IltInventory.IntItemMaxLevel), G.ChunkAetheriaUnderLevel);
|
||||
}
|
||||
|
||||
/// <summary>The chunk cap in range: 1 (chunk nothing by level) to one past the ILT maximum (every level).</summary>
|
||||
internal static int ClampUnderLevel(int under) => Math.Clamp(under, 1, IltInventory.AetheriaMaxLevel + 1);
|
||||
|
||||
/// <summary>
|
||||
/// True when an aetheria's max level (int 319) is under the cap. Coalesced Aetheria has its level
|
||||
/// from loot (ACECustom rolls 1-10; level 6+ can carry a rating), so it gets the same cap.
|
||||
/// 0 = no level read: never chunked. Pure: the tests drive it.
|
||||
/// </summary>
|
||||
internal static bool UnderChunkCap(int maxLevel, int under) => maxLevel > 0 && maxLevel < ClampUnderLevel(under);
|
||||
|
||||
/// <summary>
|
||||
/// True when an aetheria's C / CD / CDR rating is one the settings keep (any rating above 0 with
|
||||
/// its keep switch on). Pure: the tests drive it.
|
||||
|
|
@ -175,21 +186,64 @@ internal sealed class IltChunkClap : IIltFeature
|
|||
|
||||
// ── Clap ────────────────────────────────────────────────────────────────
|
||||
|
||||
internal enum ClapPart { None, Red, Blue, Empyrean, Falatacot }
|
||||
|
||||
/// <summary>
|
||||
/// Which side of /clap an item feeds (ACECustom PlayerCommands.HandleClap): red material (Red
|
||||
/// Coalesced Aetheria, chunks, powder) pairs with Ancient Empyrean Trinkets, blue with Ancient
|
||||
/// Falatacot Trinkets. Coalesced counts only unrevealed and at level 1-3; level 0 (not read yet)
|
||||
/// counts, and the server has the last word. With no WCID yet, the chunk and trinket names
|
||||
/// decide. Pure: the tests drive it.
|
||||
/// </summary>
|
||||
internal static ClapPart ClapPartOf(uint wcid, string name, int maxLevel)
|
||||
{
|
||||
bool lowCoalesced = name.Equals("Coalesced Aetheria", StringComparison.OrdinalIgnoreCase) && maxLevel <= 3;
|
||||
switch (wcid)
|
||||
{
|
||||
case IltInventory.WcidRedCoalescedAetheria: return lowCoalesced ? ClapPart.Red : ClapPart.None;
|
||||
case IltInventory.WcidBlueCoalescedAetheria: return lowCoalesced ? ClapPart.Blue : ClapPart.None;
|
||||
case IltInventory.WcidRedAetheriaChunk:
|
||||
case IltInventory.WcidRedAetheriaPowder: return ClapPart.Red;
|
||||
case IltInventory.WcidBlueAetheriaChunk:
|
||||
case IltInventory.WcidBlueAetheriaPowder: return ClapPart.Blue;
|
||||
case IltInventory.WcidEmpyreanTrinket: return ClapPart.Empyrean;
|
||||
case IltInventory.WcidFalatacotTrinket: return ClapPart.Falatacot;
|
||||
case 0: break;
|
||||
default: return ClapPart.None;
|
||||
}
|
||||
if (name.Equals("Red Aetheria Chunk", StringComparison.OrdinalIgnoreCase)) return ClapPart.Red;
|
||||
if (name.Equals("Blue Aetheria Chunk", StringComparison.OrdinalIgnoreCase)) return ClapPart.Blue;
|
||||
if (name.Equals("Ancient Empyrean Trinket", StringComparison.OrdinalIgnoreCase)) return ClapPart.Empyrean;
|
||||
if (name.Equals("Ancient Falatacot Trinket", StringComparison.OrdinalIgnoreCase)) return ClapPart.Falatacot;
|
||||
return ClapPart.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// True when /clap has a pair to work with: red material and an Empyrean Trinket, or blue
|
||||
/// material and a Falatacot Trinket. One side alone gets "You don't have any aetheria materials".
|
||||
/// Pure: the tests drive it.
|
||||
/// </summary>
|
||||
internal static bool CanClap(IEnumerable<ClapPart> parts)
|
||||
{
|
||||
bool red = false, blue = false, empyrean = false, falatacot = false;
|
||||
foreach (var part in parts)
|
||||
{
|
||||
switch (part)
|
||||
{
|
||||
case ClapPart.Red: red = true; break;
|
||||
case ClapPart.Blue: blue = true; break;
|
||||
case ClapPart.Empyrean: empyrean = true; break;
|
||||
case ClapPart.Falatacot: falatacot = true; break;
|
||||
}
|
||||
}
|
||||
return (red && empyrean) || (blue && falatacot);
|
||||
}
|
||||
|
||||
private bool HasClapMaterials()
|
||||
{
|
||||
var inv = _ctx.Inventory;
|
||||
foreach (var wo in inv.Items())
|
||||
{
|
||||
uint w = inv.Wcid(wo);
|
||||
if ((w == IltInventory.WcidRedAetheriaChunk || w == IltInventory.WcidBlueAetheriaChunk)
|
||||
&& inv.Int(wo, IltInventory.IntItemMaxLevel) <= 3)
|
||||
return true;
|
||||
string n = wo.Name;
|
||||
if (n.Equals("Red Aetheria Chunk", StringComparison.OrdinalIgnoreCase) || n.Equals("Blue Aetheria Chunk", StringComparison.OrdinalIgnoreCase)
|
||||
|| n.Equals("Ancient Empyrean Trinket", StringComparison.OrdinalIgnoreCase) || n.Equals("Ancient Falatacot Trinket", StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return CanClap(inv.Items().Where(wo => !inv.IsEquipped(wo))
|
||||
.Select(wo => ClapPartOf(inv.Wcid(wo), wo.Name, inv.Int(wo, IltInventory.IntItemMaxLevel))));
|
||||
}
|
||||
|
||||
/// <summary>Sends "/clap all" through the capture queue (reply stays visible).</summary>
|
||||
|
|
@ -198,7 +252,7 @@ internal sealed class IltChunkClap : IIltFeature
|
|||
RynthLog.Trace(LogCat.IltGear, $"ClapNow(manual={manual})");
|
||||
if (_ctx.Options.IsOff(IltFeature.Clap)) { _clapStatus = "/clap is not available (server or AutoCraftingEnabled stamp)"; return; }
|
||||
if (_ctx.Capture.IsPending("/clap all")) return;
|
||||
if (!manual && !HasClapMaterials()) { _clapStatus = "no aetheria materials carried"; return; }
|
||||
if (!manual && !HasClapMaterials()) { _clapStatus = "no aetheria and trinket pair carried (red + Empyrean, blue + Falatacot)"; return; }
|
||||
_clapStatus = "sending /clap all...";
|
||||
_ctx.Capture.Enqueue(new IltChatRequest
|
||||
{
|
||||
|
|
@ -307,7 +361,7 @@ internal sealed class IltChunkClap : IIltFeature
|
|||
ImGui.SetNextItemWidth(100);
|
||||
if (ImGui.InputInt("Chunk aetheria with max level below", ref under)) G.ChunkAetheriaUnderLevel = ClampUnderLevel(under);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level.");
|
||||
ImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level.\nApplies to Coalesced Aetheria too: it has its level before it is revealed.");
|
||||
bool kc = G.KeepAetheriaWithCrit, kcd = G.KeepAetheriaWithCritDamage, kcdr = G.KeepAetheriaWithCritDamageResist;
|
||||
ImGui.TextUnformatted("Never chunk aetheria with:");
|
||||
ImGui.SameLine();
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public sealed class IltGearState
|
|||
public bool ChunkInCombat;
|
||||
public int ChunkIntervalMs = 2000;
|
||||
/// <summary>
|
||||
/// Only chunk aetheria whose max level is below this (Coalesced always chunks). Infinite Leaftide
|
||||
/// Only chunk aetheria whose max level is below this (Coalesced Aetheria too). Infinite Leaftide
|
||||
/// aetheria goes up to level <see cref="IltInventory.AetheriaMaxLevel"/>, so the cap runs to one past it.
|
||||
/// </summary>
|
||||
public int ChunkAetheriaUnderLevel = 4;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,18 @@ internal sealed class IltInventory
|
|||
public const uint WcidSummonRefillCharm = 78780030;
|
||||
public const uint WcidUniversalMasteryCharm = 78780031;
|
||||
public static readonly uint[] WcidInfiniteCastingStone = { 777700019, 777700055 };
|
||||
public const uint WcidRedAetheriaChunk = 42636;
|
||||
public const uint WcidBlueAetheriaChunk = 42635;
|
||||
// Aetheria (ACECustom Aetheria.cs / PlayerCommands /clap). The Coalesced WCIDs stay the same once
|
||||
// revealed (name "Aetheria", equipment set given), and /clap takes only unrevealed level 1-3 ones.
|
||||
public const uint WcidBlueCoalescedAetheria = 42635;
|
||||
public const uint WcidRedCoalescedAetheria = 42636;
|
||||
public const uint WcidYellowCoalescedAetheria = 42637;
|
||||
public const uint WcidRedAetheriaChunk = 310147;
|
||||
public const uint WcidBlueAetheriaChunk = 310149;
|
||||
public const uint WcidYellowAetheriaChunk = 310150;
|
||||
public const uint WcidRedAetheriaPowder = 42644;
|
||||
public const uint WcidBlueAetheriaPowder = 300019;
|
||||
public const uint WcidEmpyreanTrinket = 34276;
|
||||
public const uint WcidFalatacotTrinket = 34277;
|
||||
|
||||
// ── Property ids used by several features ───────────────────────────────
|
||||
public const uint IntStackSize = 12;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ namespace RynthCore.Plugin.RynthILT;
|
|||
public sealed class RynthILTPlugin : RynthPluginBase
|
||||
{
|
||||
internal static readonly IntPtr NamePointer = Marshal.StringToHGlobalAnsi("RynthILT");
|
||||
// Previous release: 0.2.7.
|
||||
internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.2.8");
|
||||
// Previous release: 0.2.8.
|
||||
internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.2.9");
|
||||
|
||||
/// <summary>
|
||||
/// The settings view's surface. No longer in the sections manifest (the force-server override
|
||||
|
|
|
|||
Loading…
Reference in a new issue