feat(engine): serve IconOverlay/IconUnderlay DID properties from the PWD
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
eb52a6afc0
commit
0943058ab0
4 changed files with 56 additions and 10 deletions
|
|
@ -2044,10 +2044,9 @@ internal static class ClientObjectHooks
|
|||
/// network-populated, so this works on UNequipped items with no qualities pointer
|
||||
/// and no appraisal — no main-thread native call (the weenie ptr is served from
|
||||
/// the off-thread double-buffered snapshot when not on AC's main thread).
|
||||
/// Supported stype: Icon=8 (PWD._iconID at +16). Layout per the _type reader
|
||||
/// above: WeenieDesc(4) + _name(4) + _plural_name(4) + _wcid(4) = 16 → _iconID.
|
||||
/// (Generic switch so _iconOverlayID(+20) / _iconUnderlayID(+24) can extend it
|
||||
/// later without a new bridge.)
|
||||
/// Supported stypes: Icon=8, IconOverlay=50, IconUnderlay=52. Layout per the _type
|
||||
/// reader above: WeenieDesc(4) + _name(4) + _plural_name(4) + _wcid(4) = 16 → _iconID,
|
||||
/// then _iconOverlayID(+20) and _iconUnderlayID(+24).
|
||||
/// </summary>
|
||||
public static bool TryGetObjectDataIdProperty(uint objectId, uint stype, out uint dataId)
|
||||
{
|
||||
|
|
@ -2055,8 +2054,10 @@ internal static class ClientObjectHooks
|
|||
|
||||
int pwdFieldOffset = stype switch
|
||||
{
|
||||
8 => 16, // PropertyDataId.Icon → _iconID
|
||||
_ => -1,
|
||||
8 => 16, // PropertyDataId.Icon → _iconID
|
||||
50 => 20, // PropertyDataId.IconOverlay → _iconOverlayID
|
||||
52 => 24, // PropertyDataId.IconUnderlay → _iconUnderlayID
|
||||
_ => -1,
|
||||
};
|
||||
if (pwdFieldOffset < 0)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue