feat: SK backlog from test through 2026.11.22.48 (Trade Shop, Oracle, quests, loot, nav)
Squash of test/main-merge-2026-10-25 onto aelrynth main 2026.11.19.1 for the standing sk PR. Includes Trade Shop, Oracle wiki/ILT tracker, quest runs, loot checklist, RynthNav, VTank import. HandWrittenVersion remains 0.5.0-legacy-ui. See Changelog/2026-11-22-sk-backlog-test-merge.md.
This commit is contained in:
parent
660e6b5b1c
commit
dc08e1abba
521 changed files with 47247 additions and 795 deletions
|
|
@ -59,6 +59,14 @@ public sealed partial class RynthAiPlugin
|
|||
private const long ContentsSweepMs = 500; // how often an open corpse's contents are checked for items the cache missed
|
||||
private long _lastContentsSweepAt;
|
||||
private int _lastContentsSweepCorpse;
|
||||
// Before a corpse is finished, one more look at what the client says it holds
|
||||
// (2026-11-14, Silentkelpie missed Necrolytic Extracts: two corpses were finished 130 and 230 ms after they
|
||||
// opened from the cache's items alone; the extract the client had in each was never judged, and the cache later
|
||||
// reported it DELETE-BEFORE-CLASSIFY with no create seen). The last sweep is at least FinalSweepMinMs after the
|
||||
// open, and an item the client lists that can't be read yet holds the finish up to UnreadContentsWaitMs.
|
||||
internal const long FinalSweepMinMs = 200; // the empty-corpse floor: a corpse emptied by jump pickups is no slower
|
||||
internal const long UnreadContentsWaitMs = 2_500;
|
||||
private int _unreadHoldLoggedFor;
|
||||
private const long AppraisalHoldTimeoutMarginMs = 1_000; // stop holding this long before the corpse timeout
|
||||
|
||||
// Wedge detection: when AC's item-action state locks up (server-side, e.g.
|
||||
|
|
@ -1898,9 +1906,11 @@ public sealed partial class RynthAiPlugin
|
|||
// Empty corpse check
|
||||
if (visibleItemCount == 0)
|
||||
{
|
||||
if (openAge >= Math.Max(200, settings.LootEmptyCorpseMs) && !LastPickupSettling(now))
|
||||
if (openAge >= Math.Max(200, settings.LootEmptyCorpseMs) && !LastPickupSettling(now)
|
||||
&& !HoldForContentsNotSeen(corpseId, containedItems, openAge))
|
||||
{
|
||||
LootDiag($"[RynthAi] {LootTag}: no items on 0x{(uint)corpseId:X8} after {openAge}ms; marking complete.");
|
||||
_lootItemsLeftAtFinish = 0;
|
||||
MarkCorpseCompleted(corpseId);
|
||||
}
|
||||
return;
|
||||
|
|
@ -2059,11 +2069,43 @@ public sealed partial class RynthAiPlugin
|
|||
// has played out (closing while it was under way: 2026-10-07).
|
||||
if (pendingDataCount == 0 && !LastPickupSettling(now))
|
||||
{
|
||||
if (HoldForContentsNotSeen(corpseId, containedItems, openAge))
|
||||
return;
|
||||
LootDiag($"[RynthAi] {LootTag}: all {visibleItemCount} items on 0x{(uint)corpseId:X8} evaluated; marking complete.");
|
||||
_lootItemsLeftAtFinish = visibleItemCount; // what is still in it (a chest the player opened stays open for these)
|
||||
MarkCorpseCompleted(corpseId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// True while the corpse mustn't be finished yet: it opened under <see cref="FinalSweepMinMs"/> ago, the client
|
||||
/// lists an item in it the cache hasn't got (now looked up: the next tick judges it), or it lists one that can't
|
||||
/// be read yet (held up to <see cref="UnreadContentsWaitMs"/> after the open).
|
||||
/// </summary>
|
||||
private bool HoldForContentsNotSeen(int corpseId, List<WorldObject> containedItems, long openAge)
|
||||
{
|
||||
if (_objectCache == null) return false;
|
||||
if (openAge < FinalSweepMinMs) return true;
|
||||
List<WorldObject> missed = _objectCache.RescueContainedItems(corpseId, containedItems, out int unread);
|
||||
if (missed.Count > 0)
|
||||
{
|
||||
_lastContentsSweepAt = 0; // the next tick's sweep adds them to what is judged
|
||||
LootDiag($"[RynthAi] Corpse loot: before finishing 0x{(uint)corpseId:X8}, found {missed.Count} item(s) the object cache had missed: " +
|
||||
string.Join(", ", missed.Select(w => $"0x{(uint)w.Id:X8} '{w.Name}' {w.ObjectClass}")) + ".");
|
||||
return true;
|
||||
}
|
||||
if (unread > 0 && openAge < UnreadContentsWaitMs)
|
||||
{
|
||||
if (_unreadHoldLoggedFor != corpseId)
|
||||
{
|
||||
_unreadHoldLoggedFor = corpseId;
|
||||
LootDiag($"[RynthAi] Corpse loot: 0x{(uint)corpseId:X8} holds {unread} item(s) that can't be read yet; waiting up to {UnreadContentsWaitMs} ms after the open before finishing.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// A pickup that merges into a stack already in the pack (a Silver Pea onto the Silver Peas):
|
||||
// the server removes the corpse item (InventoryRemoveObject) and raises the pack stack's size,
|
||||
// so the picked object never shows up in the inventory and the arrival check waited out
|
||||
|
|
@ -3112,6 +3154,7 @@ public sealed partial class RynthAiPlugin
|
|||
WriteItemInfoLine(described.Line, described.ChatType);
|
||||
else if (!string.IsNullOrWhiteSpace(_currentLootItemName))
|
||||
ChatLine($"[RynthAi] Looted [{_currentLootItemActionLabel}] {_currentLootItemName}");
|
||||
NoteQuestItemGot(_currentLootItemName); // a quest run's item step ends on it (RynthAiPlugin.QuestNpc.cs)
|
||||
|
||||
if (_currentLootItemIsSalvage)
|
||||
_salvageManager?.EnqueueItem(unchecked((uint)_currentLootItemId));
|
||||
|
|
@ -3590,6 +3633,15 @@ public sealed partial class RynthAiPlugin
|
|||
ruleLabel = string.Empty;
|
||||
builtIn = string.Empty;
|
||||
|
||||
// The quest loot list (RynthOracle's Run this quest, /ra questloot): a quest item by name, first.
|
||||
if (QuestLootList.Wants(item.Name))
|
||||
{
|
||||
actionLabel = "Keep";
|
||||
ruleLabel = QuestLootList.RuleLabel;
|
||||
builtIn = "Quest loot list (RynthOracle's Run this quest) - /ra questloot remove <name> or clear";
|
||||
return true;
|
||||
}
|
||||
|
||||
// Loot Mode "Rares and needed mana stones only": the loot profile and the other built-in
|
||||
// keeps are not used (ClassifyRaresMode).
|
||||
if (LootModes.IsRares(settings.LootMode))
|
||||
|
|
|
|||
Loading…
Reference in a new issue