refactor: single CompactInfo lookup when LastMoved clears the reset stamp

Going through the DecayResetTime property re-ran LookupCompactInfo and the
default check on every set; core code accesses the field directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-08-22 12:42:54 -07:00
parent bf8d1274cb
commit 8067a7d0aa
No known key found for this signature in database
GPG key ID: 7D81DF26D9A5D94A

View file

@ -345,11 +345,12 @@ public partial class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropert
_lastMoved = value; _lastMoved = value;
// A move at or past the reset stamp supersedes it; drop it so the CompactInfo can collapse. // A move at or past the reset stamp supersedes it; drop it so the CompactInfo can collapse.
var reset = DecayResetTime; var info = LookupCompactInfo();
if (reset != default && reset <= value) if (info != null && info.m_DecayReset != default && info.m_DecayReset <= value)
{ {
DecayResetTime = default; info.m_DecayReset = default;
VerifyCompactInfo();
} }
} }
} }