mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Hotfix visitBattleResultsApplied
This commit is contained in:
@@ -860,17 +860,19 @@ void ApplyClientNetPackVisitor::visitBattleResultsApplied(BattleResultsApplied &
|
|||||||
UIHelper::getEagleEyeInfoWindowText(*hero, pack.learnedSpells.spells), UIHelper::getSpellsComponents(pack.learnedSpells.spells), soundBase::soundID(0));
|
UIHelper::getEagleEyeInfoWindowText(*hero, pack.learnedSpells.spells), UIHelper::getSpellsComponents(pack.learnedSpells.spells), soundBase::soundID(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto artSet = GAME->interface()->cb->getArtSet(ArtifactLocation(pack.artifacts.front().dstArtHolder));
|
if(!pack.artifacts.empty())
|
||||||
assert(artSet);
|
|
||||||
std::vector<Component> artComponents;
|
|
||||||
for(const auto & artPack : pack.artifacts)
|
|
||||||
{
|
{
|
||||||
auto packComponents = UIHelper::getArtifactsComponents(*artSet, artPack.artsPack0);
|
const auto artSet = GAME->interface()->cb->getArtSet(ArtifactLocation(pack.artifacts.front().dstArtHolder));
|
||||||
artComponents.insert(artComponents.end(), std::make_move_iterator(packComponents.begin()), std::make_move_iterator(packComponents.end()));
|
assert(artSet);
|
||||||
}
|
std::vector<Component> artComponents;
|
||||||
if(!artComponents.empty())
|
for(const auto & artPack : pack.artifacts)
|
||||||
|
{
|
||||||
|
auto packComponents = UIHelper::getArtifactsComponents(*artSet, artPack.artsPack0);
|
||||||
|
artComponents.insert(artComponents.end(), std::make_move_iterator(packComponents.begin()), std::make_move_iterator(packComponents.end()));
|
||||||
|
}
|
||||||
callInterfaceIfPresent(cl, pack.victor, &CGameInterface::showInfoDialog, EInfoWindowMode::MODAL, UIHelper::getArtifactsInfoWindowText(),
|
callInterfaceIfPresent(cl, pack.victor, &CGameInterface::showInfoDialog, EInfoWindowMode::MODAL, UIHelper::getArtifactsInfoWindowText(),
|
||||||
artComponents, soundBase::soundID(0));
|
artComponents, soundBase::soundID(0));
|
||||||
|
}
|
||||||
|
|
||||||
for(auto & artPack : pack.artifacts)
|
for(auto & artPack : pack.artifacts)
|
||||||
visitBulkMoveArtifacts(artPack);
|
visitBulkMoveArtifacts(artPack);
|
||||||
|
|||||||
Reference in New Issue
Block a user