# HG changeset patch # User Ritor1 # Date 1384175144 -21600 # Node ID 4c3e8ec07d12ea5e1ec000f9bc25429e5eb6f800 # Parent a5a3ad2713b283eb574d40fbdc1e8f4d8bb19abf ChestUI_WritePointedObjectStatusString() fix diff -r a5a3ad2713b2 -r 4c3e8ec07d12 Chest.cpp --- a/Chest.cpp Mon Nov 11 17:37:38 2013 +0600 +++ b/Chest.cpp Mon Nov 11 19:05:44 2013 +0600 @@ -195,31 +195,23 @@ return true; } - //----- (0042038D) -------------------------------------------------------- -void ChestUI_WritePointedObjectStatusString() +void ChestUI_WritePointedObjectStatusString() { - //POINT *v0; // esi@2 int v1; // ecx@2 - //const char *v2; // eax@3 - //POINT v3; // [sp+0h] [bp-10h]@2 POINT cursor; // [sp+8h] [bp-8h]@1 - __debugbreak(); // invalid indexing pMouse->GetCursorPos(&cursor); if ( cursor.y < 350 ) { v1 = pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]]; - if ( v1 ) + if ( v1 != 0 && v1 != -65536 ) { - ItemGen* _w = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C - + 18 * *((short *)&pChests[0].igChestItems[139].uExpireTime - + v1 + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); - - _w = (ItemGen *)(&pChests[(unsigned int)pChestWindow->ptr_1C] -32 - + 18 * *((short *)&pChests[(unsigned int)pChestWindow->ptr_1C].igChestItems[139].uExpireTime + v1 + 3)); - //v2 = _w->GetDisplayName(); - GameUI_SetFooterString(_w->GetDisplayName()); + if ( v1 ) + { + ItemGen* item = &pChests[pChestWindow->par1C].igChestItems[pChests[pChestWindow->par1C].pInventoryIndices[(v1 & 0xFFFF) - 1] - 1]; + GameUI_SetFooterString(item->GetDisplayName()); + } } } } diff -r a5a3ad2713b2 -r 4c3e8ec07d12 UI/UiGame.cpp --- a/UI/UiGame.cpp Mon Nov 11 17:37:38 2013 +0600 +++ b/UI/UiGame.cpp Mon Nov 11 19:05:44 2013 +0600 @@ -1391,7 +1391,7 @@ //окно(область) ящика------------------------------------------- if ( pCurrentScreen == SCREEN_CHEST ) { - //ChestUI_WritePointedObjectStatusString(); нужно исправить + ChestUI_WritePointedObjectStatusString(); if ( pMouse->uPointingObjectID == 0 ) { if ( uLastPointedObjectID != 0 )