Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dschu012 committed Sep 23, 2021
1 parent 7d16f4b commit 656e443
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions D2Ptrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ F2(D2COMMON, ITEMS_GetTransactionCost, int, __stdcall, (Unit* pPlayer, Unit* pIt
F2(D2COMMON, ITEMS_CheckItemTypeId, BOOL, __stdcall, (Unit* pItem, ItemType nItemType), -10731, -10744, 0x229BB0);
F2(D2COMMON, STATLIST_GetUnitStatUnsigned, uint32_t, __stdcall, (const Unit* pUnit, Stat nStatId, uint16_t nLayer), -10520, -10973, 0x225480);
//todo check 1.14d
//F2(D2COMMON, STATLIST_GetUnitStatSigned, int, __stdcall, (Unit* pUnit, Stat nStatId, uint16_t nLayer), -10587, 0x225480);
F2(D2COMMON, DATATBLS_LoadAllTxts, void, __stdcall, (void* pMemPool, int a2, int a3), -10576, -10943, 0x219300);
F2(D2COMMON, UNITS_FreeUnit, void, __stdcall, (Unit* pUnit), -11260, -10124, 0x220300);
//F2(D2COMMON, GetCursorItem, Unit*, __stdcall, (Inventory* pInventory), -10262, 0x0, 0x0);
F2(D2CLIENT, DrawGameUI, void, __stdcall, (), 0x5E650, 0x285C0, 0x96B10);

//110f 0xBA720 looks way more complex that 0x6CC00 113c, need to be checked
Expand Down
9 changes: 3 additions & 6 deletions ItemFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,9 @@ void __stdcall ItemFilter::DrawGroundItemRect(DWORD retAddress, BOOL isHovered,

void __stdcall ItemFilter::DrawInventoryItemRect(Unit* pItem, uint32_t nXStart, uint32_t nYStart, uint32_t nXEnd, uint32_t nYEnd, uint8_t nPaletteIndex, DrawMode eDrawMode) {
//0x08: red, 0xea: blue, 0x76: green.
//Unit* pUnit = D2CLIENT_GetPlayerUnit();
//Unit* pCusror = D2COMMON_GetCursorItem(pUnit->pInventory);
if (nPaletteIndex == 0xEA) {
if (HasActions(pItem)) {
nPaletteIndex = ITEM_ACTIONS[pItem->dwUnitId]->bInvBackgroundPaletteIndexSet ? ITEM_ACTIONS[pItem->dwUnitId]->nInvBackgroundPaletteIndex : nPaletteIndex;
}
if (nPaletteIndex == 0xEA
&& HasActions(pItem)) {
nPaletteIndex = ITEM_ACTIONS[pItem->dwUnitId]->bInvBackgroundPaletteIndexSet ? ITEM_ACTIONS[pItem->dwUnitId]->nInvBackgroundPaletteIndex : nPaletteIndex;
}
//call original
D2GFX_DrawSolidRectEx(nXStart, nYStart, nXEnd, nYEnd, nPaletteIndex, eDrawMode);
Expand Down

0 comments on commit 656e443

Please sign in to comment.