Snapshot for release 2026.10.19.1 (internal f0bdcf8)
This commit is contained in:
parent
5419838250
commit
39de36d3af
131 changed files with 11266 additions and 520 deletions
|
|
@ -197,7 +197,8 @@ internal static class ActionPacer
|
|||
_gapEnd = 0;
|
||||
_gapLen = 0;
|
||||
_errorAnswers.Clear();
|
||||
_staleDrops = _latchExpiries = _burstHolds = 0;
|
||||
_staleDrops = _latchExpiries = _burstHolds = _emergencyThroughLatch = 0;
|
||||
_healWaitAt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -381,8 +382,10 @@ internal static class ActionPacer
|
|||
bool animationGate = true, bool settleGate = true, bool attackRepeat = false)
|
||||
{
|
||||
if (!Enabled) { why = ""; return true; }
|
||||
if (ServerBusyHolds(host, who, attackRepeat, out why, healStart: heal != HealNeed.None)) return false;
|
||||
if (settleGate && MoveAudit.SettleHolds(host, out why))
|
||||
if (ServerBusyHolds(host, who, attackRepeat, out why, heal)) return false;
|
||||
// An emergency heal does not wait for the movement settle (150-600 ms): at Emergency Heal At
|
||||
// the heal comes first; it still obeys the in-flight rules below (OutstandingAllows, GestureHolds).
|
||||
if (settleGate && heal != HealNeed.Emergency && MoveAudit.SettleHolds(host, out why))
|
||||
{
|
||||
bool log;
|
||||
lock (Gate) { _settleHolds++; log = _settleLogged.Add(who); }
|
||||
|
|
@ -662,7 +665,11 @@ internal static class ActionPacer
|
|||
private static long _lastFrameMs; // the last NoteFrame (gap detection; 0 = never)
|
||||
private static long _gapEnd, _gapLen; // the frame that ended the last gap, and its length (0 = none)
|
||||
private static readonly Queue<long> _errorAnswers = new(); // times of error UseDones (burst limiter)
|
||||
private static long _staleDrops, _latchExpiries, _burstHolds;
|
||||
private static long _staleDrops, _latchExpiries, _burstHolds, _emergencyThroughLatch;
|
||||
private static long _healWaitAt; // when a plain heal was last held by the 'too busy' latch (0 = none)
|
||||
/// <summary>A heal held by the latch this recently keeps the latch's probe slot from starts that are no heal.</summary>
|
||||
public const long HealWaitFreshMs = 500;
|
||||
public static long EmergencyThroughLatch => _emergencyThroughLatch;
|
||||
public static long StaleDrops => _staleDrops;
|
||||
public static long LatchExpiries => _latchExpiries;
|
||||
public static long BurstHolds => _burstHolds;
|
||||
|
|
@ -711,6 +718,16 @@ internal static class ActionPacer
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The macro was switched on. The host gives no time for a UseDone, only its count, so a UseDone that
|
||||
/// came while nothing was checking (the macro off) cannot be told from a new one; the next check takes
|
||||
/// the current count as its baseline instead, so a stale 0x1D read at the start latches nothing.
|
||||
/// </summary>
|
||||
public static void NoteMacroStart()
|
||||
{
|
||||
lock (Gate) _lastSeenSeq = int.MinValue;
|
||||
}
|
||||
|
||||
/// <summary>Reads the last UseDone: a 0x1D starts or feeds the latch, any other answer clears it.</summary>
|
||||
private static void ObserveUseDone(RynthCoreHost host, long now, out string? line)
|
||||
{
|
||||
|
|
@ -745,9 +762,10 @@ internal static class ActionPacer
|
|||
/// a hung cast) or the character is in the air after a breaker jump. Runs the held-cast turn and
|
||||
/// the stuck-cast breaker. Called by MayStart.
|
||||
/// </summary>
|
||||
private static bool ServerBusyHolds(RynthCoreHost host, string who, bool attackRepeat, out string why, bool healStart = false)
|
||||
private static bool ServerBusyHolds(RynthCoreHost host, string who, bool attackRepeat, out string why, HealNeed heal = HealNeed.None)
|
||||
{
|
||||
why = "";
|
||||
bool healStart = heal != HealNeed.None;
|
||||
long now = NowMs();
|
||||
long gapEnd, gapLen;
|
||||
lock (Gate) { gapEnd = _gapEnd; gapLen = _gapLen; }
|
||||
|
|
@ -789,7 +807,12 @@ internal static class ActionPacer
|
|||
// A forced break with no cast of ours open (stage for nothing): once on the ground, it is
|
||||
// over. Left set it would block the latch expiry and the probe for good.
|
||||
else if (_stageFor == null && _stage != BreakStage.None && _jumpAt == 0) { _stage = BreakStage.None; _stageAt = 0; }
|
||||
if (!attackRepeat && stuck == null && _busySince != 0 && _stage == BreakStage.None
|
||||
// A plain heal held by the latch (an emergency heal is never held by it): the probe slot is its.
|
||||
// While one waited a moment ago, a start that is no heal does not take the slot (a door or corpse
|
||||
// use would send first every time and the heal would see the next slot, up to BusyProbeMaxMs later).
|
||||
if (heal == HealNeed.Heal && _busySince != 0) _healWaitAt = now;
|
||||
bool healWaiting = heal != HealNeed.Heal && _healWaitAt != 0 && now - _healWaitAt < HealWaitFreshMs;
|
||||
if (!attackRepeat && stuck == null && _busySince != 0 && _stage == BreakStage.None && !healWaiting
|
||||
&& now - Math.Max(_busySince, _lastProbeAt) >= Math.Min(BusyProbeMs << Math.Min(_probes, 8), BusyProbeMaxMs))
|
||||
{
|
||||
probe = true;
|
||||
|
|
@ -825,6 +848,16 @@ internal static class ActionPacer
|
|||
lock (Gate) latched = _busySince != 0 || _hung != null;
|
||||
// Our cast still inside CastMaxMs with no 0x1D: OutstandingAllows holds it (heal rules included).
|
||||
if (!latched) return false;
|
||||
// At Emergency Heal At the heal is not held by the latch, whatever set it (any refused use or
|
||||
// pickup): a refusal of the heal costs a chat line, a held heal can cost the character. The jump
|
||||
// wait (AirborneHolds, above) and the in-flight rules (MayStart) still apply.
|
||||
if (heal == HealNeed.Emergency)
|
||||
{
|
||||
bool logEm;
|
||||
lock (Gate) { _emergencyThroughLatch++; logEm = _busyLogged.Add(who + "/emergency"); }
|
||||
if (logEm) Log(host, $"[Pace] {who}: the emergency heal goes ahead of the server's 'too busy' answer");
|
||||
return false;
|
||||
}
|
||||
if (probe)
|
||||
{
|
||||
Log(host, $"[Pace] {who}: one try (#{_probes}) after the server's 'too busy' answer; no cast of ours is open");
|
||||
|
|
|
|||
29
Plugins/Shared/PetCaptureLines.cs
Normal file
29
Plugins/Shared/PetCaptureLines.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// PetCaptureLines.cs - The chat lines that mean an ACECustom siphon-lens capture worked.
|
||||
//
|
||||
// One list for both plugins (linked source): RynthAi's Pets tab reads them to time its auto-capture
|
||||
// (success -> short cooldown), and RynthILT's Vaulted Dungeons keeper counts a capture as a kill for
|
||||
// its "Kill Client" timer (a hunter who captures instead of killing is not idle). They are the
|
||||
// MonsterCapture success replies the Pets tab already matched; nothing new is guessed here.
|
||||
using System;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
internal static class PetCaptureLines
|
||||
{
|
||||
/// <summary>Substrings of the success replies (matched case-insensitively).</summary>
|
||||
private static readonly string[] Success =
|
||||
{
|
||||
"successfully siphoned the essence",
|
||||
"The echo resonates perfectly",
|
||||
"The essence is captured",
|
||||
};
|
||||
|
||||
/// <summary>True when <paramref name="text"/> is a capture-success reply.</summary>
|
||||
public static bool IsSuccess(string? text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text)) return false;
|
||||
foreach (string part in Success)
|
||||
if (text.IndexOf(part, StringComparison.OrdinalIgnoreCase) >= 0) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -166,4 +166,19 @@ public unsafe struct RynthAiHubApiV1
|
|||
/// cap); 0 before login. RynthTracker shows RynthAi's session through this and SessionStats. Any thread.
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<SessionStatsMoreV1*, int> SessionStatsMore;
|
||||
|
||||
// ── Appended 2026-10-18 (check with Has before calling) ─────────────────
|
||||
|
||||
/// <summary>
|
||||
/// The byte offset of <see cref="VaultedDungeonsEnabled"/> (for <see cref="Has"/>): right after
|
||||
/// SessionStatsMore.
|
||||
/// </summary>
|
||||
public static int VaultedDungeonsEnabledOffset => (int)BaseStructSize + sizeof(nint);
|
||||
|
||||
/// <summary>
|
||||
/// VaultedDungeonsEnabled(): 1 when RynthAi's "Vaulted Dungeons" setting (Settings > Navigation) is
|
||||
/// on. That setting is the master switch of RynthILT's Vaulted Dungeons keeper and lives only in
|
||||
/// RynthAi; 0 (off) is also the answer before login and after shutdown. Any thread.
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<int> VaultedDungeonsEnabled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public static class RynthIltHub
|
|||
public const string FeatureQuests = "quests";
|
||||
public const string FeaturePetRefill = "pet_refill";
|
||||
public const string FeatureUniversalMastery = "universal_mastery";
|
||||
/// <summary>ACECustom siphon lenses (monster capture into a pet essence).</summary>
|
||||
public const string FeatureMonsterCapture = "monster_capture";
|
||||
public const string FeatureRequireComps = "require_spell_comps";
|
||||
/// <summary>Pet breeding (the Pets tab's Breeding sub-tab is hidden while the server reports it off).</summary>
|
||||
public const string FeaturePetBreeding = "pet_breeding";
|
||||
|
|
|
|||
Loading…
Reference in a new issue