From 099a16815875472d2dde1cdd054d66dcd7e463ff Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Thu, 31 Jul 2025 21:52:48 +0300 Subject: [PATCH] Fix crash on AI capturing artifacts in battle while covered by FoW --- client/NetPacksClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/NetPacksClient.cpp b/client/NetPacksClient.cpp index 4a8547a8d..29a8558f9 100644 --- a/client/NetPacksClient.cpp +++ b/client/NetPacksClient.cpp @@ -828,7 +828,7 @@ void ApplyClientNetPackVisitor::visitBattleResultsApplied(BattleResultsApplied & { if(!pack.learnedSpells.spells.empty()) { - const auto hero = GAME->interface()->cb->getHero(pack.learnedSpells.hid); + const auto * hero = cl.gameInfo().getHero(pack.learnedSpells.hid); assert(hero); callInterfaceIfPresent(cl, pack.victor, &CGameInterface::showInfoDialog, EInfoWindowMode::MODAL, UIHelper::getEagleEyeInfoWindowText(*hero, pack.learnedSpells.spells), UIHelper::getSpellsComponents(pack.learnedSpells.spells), soundBase::soundID(0)); @@ -836,7 +836,7 @@ void ApplyClientNetPackVisitor::visitBattleResultsApplied(BattleResultsApplied & if(!pack.movingArtifacts.empty()) { - const auto artSet = GAME->interface()->cb->getArtSet(ArtifactLocation(pack.movingArtifacts.front().dstArtHolder)); + const auto * artSet = cl.gameState().getArtSet(ArtifactLocation(pack.movingArtifacts.front().dstArtHolder)); assert(artSet); std::vector artComponents; for(const auto & artPack : pack.movingArtifacts)