[1.13d]UpdateClientItemStat
Posted: Fri Jan 25, 2019 8:35 am
with 1.13d, D2COMMON 0x5A0B0 to modify item stat.
The stat has been changed, but no text change. But drop the item, and pick it up, then the stat is changed.
According to https://d2mods.info/forum/viewtopic.php ... 7&p=487017
I have called the function , but nothing happens. Those stackable potions works, but not perfect.
EDIT:Fix Code.
The stat has been changed, but no text change. But drop the item, and pick it up, then the stat is changed.
According to https://d2mods.info/forum/viewtopic.php ... 7&p=487017
Code: Select all
ASMPTR(D2GAME, UpdateClientItemStat_I, 0xDCCC0)
__declspec (naked) void __fastcall UpdateClientItemStat_Stub(DWORD ptClient, UnitAny* ptItem, BOOL bSetStat, short nStat, int nValue)
{
_asm
{
push[esp + 0x0C] //nValue
push[esp + 0x0C] //nStat
push[esp + 0x0C] //bool
push ecx //pItem
mov eax, edx //pClient
call UpdateClientItemStat_I
retn 0x0C
}
}
D2COMMON_SetUnitStat(pItem, D2CStat::STATS_QUANTITY, 10, 0);
UpdateClientItemStat_Stub(ptUnit->ptPlayerData->ptClient, pItem, TRUE, D2CStat::STATS_QUANTITY, 10);
EDIT:Fix Code.