1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00
This commit is contained in:
Michał W. Urbańczyk 2014-03-01 17:41:29 +00:00
parent 03fbd4e8a7
commit fe4171eb63

View File

@ -1355,9 +1355,10 @@ void CGameState::prepareCrossoverHeroes(std::vector<CGameState::CampaignHeroRepl
int id = art->artType->id;
assert( 8*18 > id );//number of arts that fits into h3m format
bool takeable = travelOptions.artifsKeptByHero[id / 8] & ( 1 << (id%8) );
if(!takeable)
ArtifactLocation(hero, artifactPosition).removeArtifact();
ArtifactLocation al(hero, artifactPosition);
if(!takeable && !al.getSlot()->locked) //don't try removing locked artifacts -> it crashes #1719
al.removeArtifact();
}
}
}