1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

vcmi: check spell obstacles by type

This commit is contained in:
Konstantin
2023-03-15 00:01:04 +03:00
parent a0de223901
commit 44a625aa6b

View File

@@ -72,7 +72,7 @@ bool RemoveObstacle::canRemove(const CObstacleInstance * obstacle) const
return true;
const auto *spellObstacle = dynamic_cast<const SpellCreatedObstacle *>(obstacle);
if(removeAllSpells && spellObstacle)
if(removeAllSpells && obstacle->obstacleType == CObstacleInstance::SPELL_CREATED)
return true;
if(spellObstacle && !removeSpells.empty())