Fix AutoDestroy:Plants not working if enabled alone

This commit is contained in:
Joaquin 2022-08-05 05:20:13 -06:00
parent c933f0bfd1
commit 92cc932852

View File

@ -26,7 +26,7 @@ namespace cheat::feature
const FeatureGUIInfo& AutoDestroy::GetGUIInfo() const
{
static const FeatureGUIInfo info { "Auto Destroy Objects", "World", true };
static const FeatureGUIInfo info{ "Auto Destroy Objects", "World", true };
return info;
}
@ -89,9 +89,8 @@ namespace cheat::feature
(autoDestroy.f_DestroyDoodads && (game::filters::combined::Doodads.IsValid(manager.entity(entity)) || game::filters::chest::SBramble.IsValid(manager.entity(entity)))) ||
(autoDestroy.f_DestroyShields && !game::filters::combined::MonsterBosses.IsValid(manager.entity(entity)) && (
game::filters::combined::MonsterShielded.IsValid(manager.entity(entity)) || // For shields attached to monsters, e.g. abyss mage shields.
game::filters::combined::MonsterEquips.IsValid(manager.entity(entity)) || // For shields/weapons equipped by monsters, e.g. rock shield.
game::filters::combined::MonsterEquips.IsValid(manager.entity(entity)))) || // For shields/weapons equipped by monsters, e.g. rock shield.
(autoDestroy.f_DestroyPlants && game::filters::combined::PlantDestroy.IsValid(manager.entity(entity))) // For plants e.g dandelion seeds.
))
)
)
{