Does anyone know what the parameters are to UseItem? The first one seems to be a pointer, but I have no idea to what. When I use a conjured water, the pointer points to 0x001EFAA8, when I use a "Tough Hunk of Bread" it points to 0x001EFAA0.
The assembly of the functions which call UseItem are very confusing to me. I can't figure out ultimately where the value comes from. My best guess is it may be a pointer to the client cache db or something.
The second parameter seems to always be NULL, and ecx points to the object structure.
Any insights?
Also, to temporarily bypass this issue I thought I would use Lua_DoString("UseItemByName(...."), but that crashes WoW. Are the Blizzard-ui-only restrictions enforced on calls to Lua_DoString?