Mercurial > mm7
changeset 2018:4c3e8ec07d12
ChestUI_WritePointedObjectStatusString() fix
author | Ritor1 |
---|---|
date | Mon, 11 Nov 2013 19:05:44 +0600 |
parents | a5a3ad2713b2 |
children | ab7d10b66503 |
files | Chest.cpp UI/UiGame.cpp |
diffstat | 2 files changed, 8 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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()); + } } } }
--- 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 )