From 06123089bbe98ea3b7116002b6455e20543c8b08 Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 10 Jan 2014 16:27:21 +0000 Subject: [PATCH] Bugfixes (by anv) - Fixed Dimitri's recruitment, - Fixed proper morale gains/losses git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6748 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Quests.cpp | 9 +++++---- Strategic/Quests.h | 3 +++ Tactical/Morale.cpp | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Strategic/Quests.cpp b/Strategic/Quests.cpp index 71bc6e25..8c19e79f 100644 --- a/Strategic/Quests.cpp +++ b/Strategic/Quests.cpp @@ -1074,7 +1074,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID ) || ( gubQuest[QUEST_FOOD_ROUTE] == QUESTDONE && gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 4 ) ) && IsTownUnderCompleteControlByPlayer( OMERTA ) ); // silversurfer: this is the highest requirement and therefore we will automatically enable recruitment of Miguel if ( gubFact[usFact] ) - SetFactTrue(40); // Miguel will now be willing to join and so will the other RPC + SetFactTrue(FACT_MIGUEL_AND_ALL_REBELS_CAN_BE_RECRUITED); // Miguel will now be willing to join and so will the other RPC #endif break; @@ -1304,9 +1304,10 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID ) gubFact[usFact] = !BoxerExists(); break; - case 245: // Can dimitri be recruited? should be true if already true, OR if Miguel has been recruited already OR is available for recruitment - gubFact[usFact] = ( gubFact[usFact] || FindSoldierByProfileID( MIGUEL, TRUE ) || gubFact[40] ); -/* + case FACT_DIMITRI_CAN_BE_RECRUITED: // Can dimitri be recruited? should be true if already true, OR if Miguel has been recruited already OR is available for recruitment + gubFact[usFact] = ( gubFact[usFact] || FindSoldierByProfileID( MIGUEL, TRUE ) || gubFact[FACT_MIGUEL_AND_ALL_REBELS_CAN_BE_RECRUITED] ); + break; +/* case FACT_: gubFact[usFact] = ; break; diff --git a/Strategic/Quests.h b/Strategic/Quests.h index e2ab4339..f9f0443c 100644 --- a/Strategic/Quests.h +++ b/Strategic/Quests.h @@ -245,6 +245,7 @@ enum Facts FACT_PABLO_PUNISHED_BY_PLAYER,// 37 FACT_PABLO_RETURNED_GOODS = 39, + FACT_MIGUEL_AND_ALL_REBELS_CAN_BE_RECRUITED,// 40 FACT_PABLOS_BRIBED = 41, FACT_ESCORTING_SKYRIDER,// 42 @@ -437,6 +438,8 @@ enum Facts FACT_PLAYER_OWNS_3_TOWNS_INCLUDING_OMERTA,// 243 FACT_PLAYER_OWNS_4_TOWNS_INCLUDING_OMERTA,// 244 + FACT_DIMITRI_CAN_BE_RECRUITED,// 245 + FACT_MALE_SPEAKING_FEMALE_PRESENT = 248, FACT_HICKS_MARRIED_PLAYER_MERC,// 249 FACT_MUSEUM_OPEN,// 250 diff --git a/Tactical/Morale.cpp b/Tactical/Morale.cpp index 8cb312cb..fcca08da 100644 --- a/Tactical/Morale.cpp +++ b/Tactical/Morale.cpp @@ -417,7 +417,7 @@ void UpdateSoldierMorale( SOLDIERTYPE * pSoldier, INT8 bMoraleEvent ) }//hayden ubType = gbMoraleEvent[bMoraleEvent].ubType; - bMoraleMod = gReputationSettings.bValues[bMoraleEvent];//gbMoraleEvent[bMoraleEvent].bChange; + bMoraleMod = gMoraleSettings.bValues[bMoraleEvent];//gbMoraleEvent[bMoraleEvent].bChange; pProfile = &(gMercProfiles[ pSoldier->ubProfile ]);