Mercurial > mm7
diff mm7_2.cpp @ 651:2bf48d11d742
Training hall UI fixed
author | Nomad |
---|---|
date | Tue, 12 Mar 2013 03:10:35 +0200 |
parents | 14d13880daa9 |
children | 28109e4eee44 9824e2eeee30 |
line wrap: on
line diff
--- a/mm7_2.cpp Mon Mar 11 23:52:33 2013 +0200 +++ b/mm7_2.cpp Tue Mar 12 03:10:35 2013 +0200 @@ -824,9 +824,9 @@ } //----- (004BCACC) -------------------------------------------------------- -void __fastcall DrawLearnSkillDialog(signed int uMessageParam) -{ - unsigned int v1; // edi@1 +void __fastcall OnSelectShopDialogueOption(signed int uMessageParam) +{ + //unsigned int v1; // edi@1 //signed int v2; // ebx@1 //signed int v3; // ecx@2 int v4; // eax@5 @@ -883,7 +883,7 @@ //signed int v55; // [sp+10h] [bp-10h]@1 int v56; // [sp+14h] [bp-Ch]@31 - v1 = 0; + //v1 = 0; //v2 = a1; //v55 = a1; if ( !pDialogueWindow->pNumPresenceButton ) @@ -910,15 +910,15 @@ v4 += v5++ + 1; while ( v5 < pPlayers[uActiveCharacter]->uLevel ); } - if ( pPlayers[uActiveCharacter]->uLevel < (unsigned __int16)word_4F0866[(unsigned int)window_SpeakInHouse->ptr_1C] - && (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4 ) + if (pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - 89] && + (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4) return; } pDialogueWindow->Release(); - pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); - pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" - (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1); - pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1); + pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" + pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); + pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", nullptr); // LABEL_10: //v3 = dword_F8B198; v8 = window_SpeakInHouse; @@ -927,20 +927,20 @@ { v8 = window_SpeakInHouse; if ( (in_current_building_type == BildingType_Stables || in_current_building_type == BildingType_Boats) - && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) + && (*(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) || in_current_building_type != BildingType_Temple || uMessageParam != BildingType_MindGuild ) { //LABEL_9: pDialogueWindow->Release(); - pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); - pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" - (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1); - pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1); + pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" + pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); + pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", nullptr); // LABEL_10: //v3 = dword_F8B198; v8 = window_SpeakInHouse; } - else if ( uActiveCharacter != v1 ) + else if (uActiveCharacter) { if ( !pPlayers[uActiveCharacter]->_4B6FF9() ) return; @@ -973,7 +973,7 @@ { if ( in_current_building_type != BildingType_Tavern ) { - if ( in_current_building_type <= (signed int)v1 ) + if (in_current_building_type <= 0) return; if ( in_current_building_type > BildingType_AlchemistShop ) { @@ -1184,7 +1184,7 @@ word_F8B1A0 = pParty->field_750[v25]; if ( v27 ) { - v1 = 0; + //v1 = 0; v27 = v26 == v13; v29 = (int)pNPCTopics[351].pText; if ( v27 ) @@ -1207,7 +1207,7 @@ pParty->field_750[v25] = v13; pParty->field_75A[v25] = v13; } - v1 = 0; + //v1 = 0; dword_F8B1A4 = pNPCTopics[352].pText; } } @@ -1247,7 +1247,7 @@ *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; ++pMessageQueue_50CBD0->uNumMessages; }*/ - pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, v1, v1); + pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, 0, 0); dialog_menu_id = 104; break; }