mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
Fixed #1719.
This commit is contained in:
parent
03fbd4e8a7
commit
fe4171eb63
@ -1356,8 +1356,9 @@ void CGameState::prepareCrossoverHeroes(std::vector<CGameState::CampaignHeroRepl
|
|||||||
assert( 8*18 > id );//number of arts that fits into h3m format
|
assert( 8*18 > id );//number of arts that fits into h3m format
|
||||||
bool takeable = travelOptions.artifsKeptByHero[id / 8] & ( 1 << (id%8) );
|
bool takeable = travelOptions.artifsKeptByHero[id / 8] & ( 1 << (id%8) );
|
||||||
|
|
||||||
if(!takeable)
|
ArtifactLocation al(hero, artifactPosition);
|
||||||
ArtifactLocation(hero, artifactPosition).removeArtifact();
|
if(!takeable && !al.getSlot()->locked) //don't try removing locked artifacts -> it crashes #1719
|
||||||
|
al.removeArtifact();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user