RynthSuite as of 2026-09-27 (internal e52ccc8): Damage tab learns only from fightable creatures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
385eeed138
commit
a19ee1904e
2 changed files with 19 additions and 1 deletions
|
|
@ -692,8 +692,11 @@ public class CombatManager : IDisposable
|
|||
|
||||
// Cache name->wcid (once per type) for AOE kill attribution (tier 5): a mob wiped
|
||||
// by an area cast we never directly fought is credited by matching its death message.
|
||||
// Attackable only — this runs before the attackable filter below, so an NPC the
|
||||
// cache misclassifies as a monster could otherwise be credited kills (Damage tab).
|
||||
if (!string.IsNullOrEmpty(wo.Name) && _seenMonsterNameToWcid.Count < 256
|
||||
&& !_seenMonsterNameToWcid.ContainsKey(wo.Name)
|
||||
&& (!_host.HasObjectIsAttackable || _host.ObjectIsAttackable((uint)wo.Id))
|
||||
&& _host.HasGetObjectWcid && _host.TryGetObjectWcid((uint)wo.Id, out uint scanWcid) && scanWcid != 0)
|
||||
_seenMonsterNameToWcid[wo.Name] = scanWcid;
|
||||
|
||||
|
|
|
|||
|
|
@ -1559,10 +1559,25 @@ public sealed partial class RynthAiPlugin : RynthPluginBase
|
|||
// Capture observed creature data into the persistent store. maxHealth>0 means
|
||||
// we just got a successful CreatureProfile (Assess succeeded) — the only time
|
||||
// we have authoritative max vitals + resists.
|
||||
if (targetId != _playerId && maxHealth > 0)
|
||||
if (targetId != _playerId && maxHealth > 0 && IsFightableCreature(targetId))
|
||||
CaptureCreatureSample(targetId, maxHealth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Something you can fight — what the Damage tab and creatures.json should learn from.
|
||||
/// Appraising an NPC, a vendor, another player or your own pet also returns health, and
|
||||
/// each one used to become a Damage-tab row (and a creatures.json entry). The attackable
|
||||
/// check also catches NPCs the object cache classifies as monsters.
|
||||
/// </summary>
|
||||
private bool IsFightableCreature(uint objectId)
|
||||
{
|
||||
WorldObject? obj = _objectCache?[unchecked((int)objectId)];
|
||||
if (obj != null && obj.ObjectClass is AcObjectClass.Npc or AcObjectClass.Vendor
|
||||
or AcObjectClass.Player or AcObjectClass.CombatPet)
|
||||
return false;
|
||||
return !Host.HasObjectIsAttackable || Host.ObjectIsAttackable(objectId);
|
||||
}
|
||||
|
||||
// Exact per-hit damage from the engine (AttackerNotification 0x01B1). This is
|
||||
// the only selection-free source of real damage numbers — combat uses it to
|
||||
// learn per-monster damage and predict kill shots. isAttacker==true = our hit.
|
||||
|
|
|
|||
Loading…
Reference in a new issue