# Tier item colours + slot tints (staged 2026-09-29, Trevor test only)

dinput8.dll md5 13dad7192485229032630ebd8f1f591c, built from client_dll/hjclient.c (previous source:
hjclient.c.bak-tiertint; previous DLL 61f13e4f = name colours only: dinput8.dll.bak-tiertint here and in client_dll/).
Contains everything 61f13e4f had (clickmem, ratio, bots, advloot, name colours, ...) plus the slot tints and the new
Legendary colour. verify_sites.py against patch_files/eqgame.exe (md5 e5ea76b0): 25 hooks + 6 byte patches + 1 call
site, 0 problems.

## Colours
- Normal items: stock (green/white name line, white tooltip, no slot tint).
- Enchanted (tier 1, id 300000-599999; names " (Enchanted)" on test, " +1" on prod): light blue 0xFF4DA6FF.
  THJ used 0xFF007BFF; ours is kept because THJ's is dark on the navy tooltip box (0xC8000080).
- Legendary (tier 2, id 600000-899999; names " (Legendary)" on test, " +2" on prod): orange 0xFFFF8000 = THJ's exact
  value (their dinput8 10025200 writes it from 10139FF0 into the game's name-colour instruction). Was gold 0xFFFFD700.

## Where
1. Item display window name line (hook 0x6A9540), by item id. An item you cannot use keeps the stock red/purple.
2. Item hover tooltips (call-site retarget 0x867BD0), by item NAME ending (the tooltip has no item id).
3. Advanced Loot rows (/advloot), by item id.
4. NEW: item SLOTS. Hook 0x69A080 = CInvSlotWnd::Draw, the draw of every item slot: inventory (all worn slots incl.
   Power Source), bag windows, bank / shared bank, and also any other window made of item slots (loot corpse, trade,
   merchant/bazaar slots, tribute...). After the stock draw, a slot holding a tier item gets a 2 px frame in the tier
   colour plus a faint wash (alpha 0x30) of the same colour over the slot. By item id (read from the slot).
   A selected (yellow-framed) slot keeps its yellow outer line; our inner line is still drawn.
   Empty and normal-item slots are untouched. No allocation or logging per frame. THJ has no equivalent.
Not done: chat item links (stock), hotbar buttons holding an item (not item slots).

## Kill switch
/tiercolor off | /tiercolor on | /tiercolor (toggle). Session only (ON at every game start). Slots and tooltips follow
at once, the item window on re-open; loot rows keep the colour they were added with.

## Test (Trevor)
Restart the game. hjclient.log must show "hook InvSlotTierTint @0069a080 ok", "25/25 hooks installed",
"6/6 byte patches applied", "1/1 call sites retargeted".
- Inspect a normal, an Enchanted and a Legendary item: name line stock / blue / orange; hover tooltips the same.
- Open inventory: Legendary worn items (Vixeun on the test world) have an orange frame; Enchanted blue; others none.
- Open bags and the bank: same.
- Move a tier item to another slot: the frame moves with it.
- /tiercolor off: frames and colours gone; /tiercolor on: back.
- If tooltips colour but slots/name line do not, that item's id is not in 300000-899999 (tooltips go by name,
  the rest by id); report the item id.

## Promote (after Trevor is happy)
cd ~/heroes_journey_workspace/patcher
cp patch_files/dinput8.dll staged_tiercolor/prod_dinput8.dll.bak   # keep the prod DLL OUTSIDE patch_files (the manifest scans it)
cp staged_tiercolor/dinput8.dll patch_files/dinput8.dll.new && mv patch_files/dinput8.dll.new patch_files/dinput8.dll
python3 generate_manifest.py   # rewrites patch_manifest.json (SHA-256 + size)
Then mark the RE-note rows (0x6A9540, 0x867BD0, 0x69A080) "prod". Rollback: dinput8.dll.bak-tiertint (61f13e4f).
