I just wanted to ask, are these Pointers correct for PD2 1.13c?
FUNCPTR(D2CLIENT, LeftClickItem, void __stdcall, (UnitAny pPlayer, Inventory pInventory, int x, int y, DWORD dwClickType, InventoryLayout* pLayout, DWORD Location), 0x96AA0, 0x9AFF0) // 1.12
I'm trying to use D2CLIENT_LeftClickItem to click on an item in my Inventory, but keep getting an error INT_DIVIDEBY_ZERO crash.
When I printed the values, it looks like SlotPixelHeight is returning zero? Here are the values returned from printing:
SlotPixelWidth = 46
SlotPixelHeight = 0
Not sure what I'm doing wrong, would appreciate any help.
This how I am using the command: (coordX and coordY are both zero to try and click the very first item in the top left of inventory)
////////////////////////////////////////////////////////////
UnitAny pUnit = D2CLIENT_GetPlayerUnit();
InventoryLayout pLayout = (InventoryLayout)p_D2CLIENT_InventoryLayout;
Inventory pPlayerInventory = pUnit->pInventory;
int x = pLayout->Left + coordX pLayout->SlotPixelWidth + 10;
int y = pLayout->Top + coordY pLayout->SlotPixelHeight + 10;
Hello :)
I just wanted to ask, are these Pointers correct for PD2 1.13c? FUNCPTR(D2CLIENT, LeftClickItem, void __stdcall, (UnitAny pPlayer, Inventory pInventory, int x, int y, DWORD dwClickType, InventoryLayout* pLayout, DWORD Location), 0x96AA0, 0x9AFF0) // 1.12
VARPTR(D2CLIENT, InventoryLayout, InventoryLayout*, 0x10B3E0, 0x1016F0)
I'm trying to use D2CLIENT_LeftClickItem to click on an item in my Inventory, but keep getting an error INT_DIVIDEBY_ZERO crash. When I printed the values, it looks like SlotPixelHeight is returning zero? Here are the values returned from printing: SlotPixelWidth = 46 SlotPixelHeight = 0
Not sure what I'm doing wrong, would appreciate any help. This how I am using the command: (coordX and coordY are both zero to try and click the very first item in the top left of inventory) //////////////////////////////////////////////////////////// UnitAny pUnit = D2CLIENT_GetPlayerUnit(); InventoryLayout pLayout = (InventoryLayout)p_D2CLIENT_InventoryLayout; Inventory pPlayerInventory = pUnit->pInventory;
int x = pLayout->Left + coordX pLayout->SlotPixelWidth + 10; int y = pLayout->Top + coordY pLayout->SlotPixelHeight + 10;
D2CLIENT_LeftClickItem(pUnit, pPlayerInventory, x, y, nClickType, pLayout, 0); /////////////////////////////////////////////////////////////
I just want to be able to LeftClickItem in my Inventory. Would really appreciate any help :)
Thanks heaps