From ac67090d9fca05acc85a0d3619a57c9fdedb57b4 Mon Sep 17 00:00:00 2001 From: gereon77 Date: Wed, 31 Jan 2024 21:20:15 +0100 Subject: [PATCH] Fix showing 3 vassal back cards only during choosing HCs --- agot-bg-game-server/src/client/HouseRowComponent.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agot-bg-game-server/src/client/HouseRowComponent.tsx b/agot-bg-game-server/src/client/HouseRowComponent.tsx index 18a19fc98..09425af3a 100644 --- a/agot-bg-game-server/src/client/HouseRowComponent.tsx +++ b/agot-bg-game-server/src/client/HouseRowComponent.tsx @@ -37,7 +37,7 @@ import HouseIconComponent from "./game-state-panel/utils/HouseIconComponent"; import ThematicDraftHouseCardsGameState from "../common/ingame-game-state/thematic-draft-house-cards-game-state/ThematicDraftHouseCardsGameState"; import { toast } from "react-toastify"; import getUserLinkOrLabel from "./utils/getIngameUserLinkOrLabel"; -import CombatGameState from "../common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/CombatGameState"; +import ChooseHouseCardGameState from "../common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/choose-house-card-game-state/ChooseHouseCardGameState"; import houseCardsBackImages from "./houseCardsBackImages"; interface HouseRowComponentProps { @@ -349,8 +349,8 @@ export default class HouseRowComponent extends Component } renderPlayerHouseCards(): ReactNode { - const combat = this.ingame.hasChildGameState(CombatGameState) ? this.ingame.getChildGameState(CombatGameState) as CombatGameState : null; - const isCommandingVassalInCombat = combat?.isCommandingVassalInCombat(this.house) ?? false; + const chooseHouseCards = this.ingame.hasChildGameState(ChooseHouseCardGameState) ? this.ingame.getChildGameState(ChooseHouseCardGameState) as ChooseHouseCardGameState : null; + const isCommandingVassalInCombat = chooseHouseCards?.combatGameState.isCommandingVassalInCombat(this.house) ?? false; return isCommandingVassalInCombat ? _.range(0, 3).map(i =>