On a Martysama 5.8 client this doesn't work. Code compiles, there are no system errors both on client and server. I added logs to see if any items are getting marked as "Unusable" and they are but there is no visual effect at all.
0518 23:37:04932 :: [DEBUG] SetUsableSlotOnTopWnd called for slot 1
0518 23:37:04932 :: [DEBUG] SetUnusableSlotOnTopWnd called for slot 2
0518 23:37:04932 :: [DEBUG] SetUsableSlotOnTopWnd called for slot 3
0518 23:37:04932 :: [DEBUG] SetUsableSlotOnTopWnd called for slot 4
0518 23:37:04932 :: [DEBUG] SetUnusableSlotOnTopWnd called for slot 5
#ifdef WJ_ENABLE_TRADABLE_ICON
void CSlotWindow::SetCanMouseEventSlot(DWORD dwIndex)
{
TSlot* pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
{
sys_err("[DEBUG] SetCanMouseEventSlot(%u) failed: invalid slot pointer\n", dwIndex);
return;
}
sys_err("[DEBUG] SetCanMouseEventSlot called for slot %u\n", dwIndex);
REMOVE_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
}
void CSlotWindow::SetCantMouseEventSlot(DWORD dwIndex)
{
TSlot* pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
{
sys_err("[DEBUG] SetCantMouseEventSlot(%u) failed: invalid slot pointer\n", dwIndex);
return;
}
sys_err("[DEBUG] SetCantMouseEventSlot called for slot %u\n", dwIndex);
SET_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
}
void CSlotWindow::SetUsableSlotOnTopWnd(DWORD dwIndex)
{
TSlot* pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
{
sys_err("[DEBUG] SetUsableSlotOnTopWnd(%u) failed: invalid slot pointer\n", dwIndex);
return;
}
sys_err("[DEBUG] SetUsableSlotOnTopWnd called for slot %u\n", dwIndex);
REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
}
void CSlotWindow::SetUnusableSlotOnTopWnd(DWORD dwIndex)
{
TSlot* pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
{
sys_err("[DEBUG] SetUnusableSlotOnTopWnd(%u) failed: invalid slot pointer\n", dwIndex);
return;
}
sys_err("[DEBUG] SetUnusableSlotOnTopWnd called for slot %u\n", dwIndex);
SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
}
#endif