Mercurial > mm7
changeset 1313:ae6c8e1ddef4
fix enter house error
author | Gloval |
---|---|
date | Wed, 26 Jun 2013 21:33:42 +0400 |
parents | ae435824ac4d |
children | 2e3deb510de3 |
files | GUIWindow.cpp NPC.cpp UI/UIHouses.cpp |
diffstat | 3 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Wed Jun 26 00:22:57 2013 +0400 +++ b/GUIWindow.cpp Wed Jun 26 21:33:42 2013 +0400 @@ -1795,7 +1795,7 @@ else { if ( v26 || !dword_591080 ) - v27 = HouseNPCData[v26 +1 - (dword_591080 != 0)]->pName; + v27 = HouseNPCData[v26 +1 - ((dword_591080 != 0)? 1:0)]->pName; else v27 = (char*)p2DEvents[pButton - 1].pProprieterName; v30 = v27;
--- a/NPC.cpp Wed Jun 26 00:22:57 2013 +0400 +++ b/NPC.cpp Wed Jun 26 21:33:42 2013 +0400 @@ -1305,7 +1305,7 @@ //int v25; // [sp-4h] [bp-10h]@49 uDialogueType = uMessageParam + 1; - pCurrentNPCInfo = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 + pCurrentNPCInfo = HouseNPCData[pDialogueNPCCount -((dword_591080 != 0)?1:0 )];//- 1 if ( uMessageParam <= 24 ) { switch ( uMessageParam ) @@ -1640,7 +1640,7 @@ } else { - v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) )];//+ 1 + v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0)?1:0 )];//+ 1 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) { pDialogueWindow->Release();
--- a/UI/UIHouses.cpp Wed Jun 26 00:22:57 2013 +0400 +++ b/UI/UIHouses.cpp Wed Jun 26 21:33:42 2013 +0400 @@ -527,8 +527,7 @@ { if (!(pNPCStats->pNewNPCData[i].uFlags & 0x80)) { - - HouseNPCData[uNumDialogueNPCPortraits+1- (dword_591080 != 0) ? 1 : 0] = &pNPCStats->pNewNPCData[i]; + HouseNPCData[uNumDialogueNPCPortraits+1-((dword_591080 != 0) ? 1 : 0) ] = &pNPCStats->pNewNPCData[i]; npc_id_arr[uNumDialogueNPCPortraits] = pNPCStats->pNewNPCData[i].uPortraitID; ++uNumDialogueNPCPortraits; if ((pNPCStats->pNewNPCData[i].uFlags & 3) != 2)