From 102a4e40c2c3dc7a1359e3d8326dd64ecdc1a012 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Mon, 15 Apr 2024 00:53:08 +0300 Subject: [PATCH] Solved some problems with resigning - we have others, specifically - TradeOffer's constructor assumes Unciv.Current.gameInfo... That'll eb a hassle to deal with... --- core/src/com/unciv/logic/battle/Battle.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 886d633a72..9627b10062 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -244,7 +244,7 @@ object Battle { // CS friendship from killing barbarians if (defeatedUnit.getCivInfo().isBarbarian() && !defeatedUnit.isCivilian() && civUnit.getCivInfo().isMajorCiv()) { - for (cityState in UncivGame.Current.gameInfo!!.getAliveCityStates()) { + for (cityState in defeatedUnit.getCivInfo().gameInfo.getAliveCityStates()) { if (civUnit.getCivInfo().knows(cityState) && defeatedUnit.unit.threatensCiv(cityState)) { cityState.cityStateFunctions.threateningBarbarianKilledBy(civUnit.getCivInfo()) } @@ -252,7 +252,7 @@ object Battle { } // CS war with major pseudo-quest - for (cityState in UncivGame.Current.gameInfo!!.getAliveCityStates()) { + for (cityState in defeatedUnit.getCivInfo().gameInfo.getAliveCityStates()) { cityState.questManager.militaryUnitKilledBy(civUnit.getCivInfo(), defeatedUnit.getCivInfo()) } }