Update dGame/dUtilities/Preconditions.cpp

Co-authored-by: jadebenn <jadebenn@users.noreply.github.com>
This commit is contained in:
David Markowitz 2024-12-14 21:14:07 -08:00 committed by GitHub
parent 5ff121612e
commit a8919c8c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,7 +137,7 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat
return inventoryComponent->GetLotCount(value) >= count; return inventoryComponent->GetLotCount(value) >= count;
case PreconditionType::DoesNotHaveItem: case PreconditionType::DoesNotHaveItem:
return inventoryComponent->IsEquipped(value) < static_cast<bool>(count); return inventoryComponent->IsEquipped(value) && count > 0;
case PreconditionType::HasAchievement: case PreconditionType::HasAchievement:
if (missionComponent == nullptr) return false; if (missionComponent == nullptr) return false;
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE; return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;