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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user