Skip to content

Commit

Permalink
Fix showing 3 vassal back cards only during choosing HCs
Browse files Browse the repository at this point in the history
  • Loading branch information
gereon77 committed Jan 31, 2024
1 parent 7d60035 commit ac67090
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agot-bg-game-server/src/client/HouseRowComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -349,8 +349,8 @@ export default class HouseRowComponent extends Component<HouseRowComponentProps>
}

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 => <Col xs="auto" key={`vassal-combat_back_${this.house.id}_${i}`}>
Expand Down

0 comments on commit ac67090

Please sign in to comment.