Mercurial > mm7
changeset 2118:16e2ed54f269
Merge
author | Ritor1 |
---|---|
date | Mon, 23 Dec 2013 23:39:26 +0600 |
parents | c7bf59066842 (current diff) 18dee3152c52 (diff) |
children | 014c672b6d87 |
files | mm7_4.cpp |
diffstat | 3 files changed, 27 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/NPC.cpp Mon Dec 23 23:38:51 2013 +0600 +++ b/NPC.cpp Mon Dec 23 23:39:26 2013 +0600 @@ -1386,10 +1386,11 @@ if ( uMessageParam == 77 ) { //v16 = pCurrentNPCInfo->uProfession; + __debugbreak(); // probably hirelings found in buildings, not present in MM7, changed "pCurrentNPCInfo->uProfession - 1" to "pCurrentNPCInfo->uProfession", have to check in other versions whether it's ok if (dialogue_show_profession_details) - v17 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].pJoinText; + v17 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].pJoinText; else - v17 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].pBenefits; + v17 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].pBenefits; current_npc_text = v17; v18 = BuildDialogueString(v17, uActiveCharacter - 1, 0, 0, 0, 0); dialogue_show_profession_details = ~dialogue_show_profession_details; @@ -1502,15 +1503,16 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[533], 2);// ""I cannot join you, you're party is full"" goto _return; } - if ( pCurrentNPCInfo->uProfession != 51 ) + if ( pCurrentNPCInfo->uProfession != 51 ) //burglars have no hiring price { - pPrice = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].uHirePrice; + __debugbreak(); // probably hirelings found in buildings, not present in MM7, changed "pCurrentNPCInfo->uProfession - 1" to "pCurrentNPCInfo->uProfession", have to check in other versions whether it's ok + pPrice = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].uHirePrice; if ( pParty->uNumGold < pPrice ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); dialogue_show_profession_details = false; uDialogueType = 13; - current_npc_text = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].pJoinText; + current_npc_text = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].pJoinText; current_npc_text = BuildDialogueString(current_npc_text, uActiveCharacter - 1, 0, 0, 0, 0); if ( uActiveCharacter ) pPlayers[uActiveCharacter]->PlaySound(SPEECH_NotEnoughGold, 0);
--- a/UI/UiGame.cpp Mon Dec 23 23:38:51 2013 +0600 +++ b/UI/UiGame.cpp Mon Dec 23 23:39:26 2013 +0600 @@ -310,20 +310,24 @@ } if (sDialogue_SpeakingActorNPC_ID < 0) v9 = 4; - pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, v9, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; - if (pNPCInfo->Hired()) + pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 3, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; + if (pNPCInfo->Hired() && !pNPCInfo->bHasUsedTheAbility) { - if ( !pNPCInfo->bHasUsedTheAbility ) + if (pNPCInfo->uProfession == 10 || //Healer + pNPCInfo->uProfession == 11 || //Expert Healer + pNPCInfo->uProfession == 12 || //Master Healer + pNPCInfo->uProfession == 33 || //Cook + pNPCInfo->uProfession == 34 || //Chef + pNPCInfo->uProfession == 39 || //Wind Master + pNPCInfo->uProfession == 40 || //Water Master + pNPCInfo->uProfession == 41 || //Gate Master + pNPCInfo->uProfession == 42 || //Chaplain + pNPCInfo->uProfession == 43 || //Piper + pNPCInfo->uProfession == 52 //Fallen Wizard + ) { - if ( pNPCInfo->uProfession >= 10 ) - { - if ( pNPCInfo->uProfession <= 12 || pNPCInfo->uProfession > 32 && (pNPCInfo->uProfession <= 34 - || pNPCInfo->uProfession > 38 && (pNPCInfo->uProfession <= 43 || pNPCInfo->uProfession == 52)) ) - { - pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0); - pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1); - } - } + pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0); + pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1); } }
--- a/mm7_4.cpp Mon Dec 23 23:38:51 2013 +0600 +++ b/mm7_4.cpp Mon Dec 23 23:39:26 2013 +0600 @@ -1445,7 +1445,7 @@ break; case 17://òåêñò íà¸ìíîãî ÍÏÑ { - uint pay_percentage = pNPCStats->pProfessions[npc->uProfession - 1].uHirePrice / 100; + uint pay_percentage = pNPCStats->pProfessions[npc->uProfession].uHirePrice / 100; if ( !pay_percentage ) pay_percentage = 1; sprintf(a1, "%lu", pay_percentage); @@ -2683,9 +2683,9 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[533], 2);// ""I cannot join you, you're party is full"" else { - if ( speakingNPC->uProfession != 51 ) + if ( speakingNPC->uProfession != 51 ) //burglars have no hiring price { - if ( pParty->uNumGold < pNPCStats->pProfessions[speakingNPC->uProfession - 1].uHirePrice ) + if ( pParty->uNumGold < pNPCStats->pProfessions[speakingNPC->uProfession].uHirePrice ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" dialogue_show_profession_details = false; @@ -2697,7 +2697,7 @@ dword_7241C8 = 0; return; } - Party::TakeGold(pNPCStats->pProfessions[speakingNPC->uProfession - 1].uHirePrice); + Party::TakeGold(pNPCStats->pProfessions[speakingNPC->uProfession].uHirePrice); } LOBYTE(speakingNPC->uFlags) |= 0x80u; if ( pParty->pHirelings[0].pName )