1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Fix broken bonuses due to calling PutArtifact before NewArtifact

This commit is contained in:
Ivan Savenko
2023-05-09 16:48:52 +03:00
parent cb8201876b
commit 79982c4ad4
2 changed files with 22 additions and 9 deletions

View File

@@ -1793,6 +1793,9 @@ void BulkSmartRebalanceStacks::applyGs(CGameState * gs)
void PutArtifact::applyGs(CGameState *gs)
{
assert(art->canBePutAt(al));
// Ensure that artifact has been correctly added via NewArtifact pack
assert(vstd::contains(gs->map->artInstances, art));
assert(!art->getParentNodes().empty());
art->putAt(al);
//al.hero->putArtifact(al.slot, art);
}