mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Implement C_Item.GetItemInfo(itemInfo) in C, returning the full modern tuple instead of the Lua alias to the vanilla global (which only returned 1.12's short set). Sourced entirely from the cached ItemStats_C record plus the class/subclass/inventory-type DBC name lookups item/Info.cpp already does for GetItemInfoInstant — no new duplication. Returns 18 values: itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, sellPrice, classID, subclassID, bindType, expansionID (0), setID (nil if none), isCraftingReagent (false; no such flag in 1.12), itemDescription. itemTexture is the icon path (no fileID system in 1.12). On a cache miss it warms the cache and returns nil, landing on the GET_ITEM_INFO_RECEIVED retry — same async contract as the stock global. Drops the `C_Item.GetItemInfo = GetItemInfo` shim from ItemUtil.lua so the native implementation isn't clobbered at addon load. Verified in-game against Rancher's Trousers (nil setID) and Blackened Defias Boots (setID 161) — all 18 fields correct.