Intercept 0x9c packet before it gets sent to the D2Client functions that handle item creation
Build ItemInfo from the packet bitstream (all packet actions)
Run loot filter rules using ItemInfo (if packet action == 0 or 3)
If a match was found and the name was empty, then block the packet (i.e. don't pass it along to the client)
New mechanism:
Intercept 0x9c packet at the point where the item gets created (only for packet action 0 and 3)
Send the packet along to the client so the unit gets created
Get unit and build UnitItemInfo
Run loot filter rules using UnitItemInfo
If a match is found and the name is empty, add the nodraw flag to the item (UNITFLAGEX_INVISIBLE)
There's a lot of code that can be removed now too, but I'll save that for a separate PR (ParseItem & ProcessStat in ItemMover, all of the EvaluateInternalFromPacket functions in ItemDisplay, etc.)
(public patch notes)
New Features and improvements:
Hidden gold will now automatically be picked up
Bug Fixes:
Fixed a bug with PRICE that would cause the condition to incorrectly return false in certain cases
Previous mechanism to completely hide items:
ItemInfo
from the packet bitstream (all packet actions)ItemInfo
(if packet action == 0 or 3)New mechanism:
UnitItemInfo
UnitItemInfo
nodraw
flag to the item (UNITFLAGEX_INVISIBLE
)There's a lot of code that can be removed now too, but I'll save that for a separate PR (
ParseItem
&ProcessStat
in ItemMover, all of theEvaluateInternalFromPacket
functions in ItemDisplay, etc.)(public patch notes) New Features and improvements:
Bug Fixes: