From 1c865fc89040302df52a1588ed2852d1cbd9ca80 Mon Sep 17 00:00:00 2001 From: idhrendur Date: Sat, 19 Jan 2013 09:54:54 -0800 Subject: [PATCH] Juniors in a PU never have vassals --- Data Files/Changelog.txt | 3 ++- Source/EU3World/EU3Country.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Data Files/Changelog.txt b/Data Files/Changelog.txt index 259fead1e..7e276f69f 100644 --- a/Data Files/Changelog.txt +++ b/Data Files/Changelog.txt @@ -305,4 +305,5 @@ Revision Log Message 299 Output the HRE Emperor 300 Rename CK2+ readme file 301 Log when government gets default conversion -302 EU3 vassals never have vassals \ No newline at end of file +302 EU3 vassals never have vassals +303 Juniors in a PU never have vassals \ No newline at end of file diff --git a/Source/EU3World/EU3Country.cpp b/Source/EU3World/EU3Country.cpp index d2632273a..5a4500536 100644 --- a/Source/EU3World/EU3Country.cpp +++ b/Source/EU3World/EU3Country.cpp @@ -1054,6 +1054,20 @@ void EU3Country::determineStartingAgents() vector EU3Country::convertVassals(int initialScore, EU3Diplomacy* diplomacy) { + if (vassals.size() == 0) + { + vector absorbedCountries; + return absorbedCountries; + } + + // Am I a junior in a PU? + if (src->isIndependent() && (src != src->getHolder()->getPrimaryTitle())) + { + log("\t%s is completely absorbing all vassals (junior in PU).\n", src->getTitleString().c_str()); + vector absorbedCountries = eatVassals(); + return absorbedCountries; + } + int score = initialScore; string CA = src->getCA(); if ( CA == "centralization_0")