1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CasualtiesAfterBattle: dont remove catapult artifact. Fix 2346 issue

This commit is contained in:
ArseniyShestakov 2015-12-10 13:31:03 +03:00
parent d900e9bec2
commit 5aadc1ed6f
2 changed files with 2 additions and 2 deletions

View File

@ -1054,7 +1054,6 @@ void VCAI::pickBestArtifacts(const CGHeroInstance * h, const CGHeroInstance * ot
if(location.slot == ArtifactPosition::MACH4) // don't attempt to move catapult
continue;
//FIXME: why do we really attempt to move catapults between heroes in first case?
auto s = location.getSlot();
if (!s || s->locked) //we can't move locks

View File

@ -5846,7 +5846,8 @@ CasualtiesAfterBattle::CasualtiesAfterBattle(const CArmedInstance *army, BattleI
if (!st->count && !st->base) //we can imagine stacks of war mahcines that are not spawned by artifacts?
{
auto warMachine = VLC->arth->creatureToMachineID(st->type->idNumber);
if (warMachine != ArtifactID::NONE)
//catapult artifact remain even if "creature" killed in siege
if(warMachine != ArtifactID::NONE && warMachine != ArtifactID::CATAPULT)
{
auto hero = dynamic_cast<const CGHeroInstance*> (army);
if (hero)