Merge pull request #1680 from DarkflameUniverse/warn

fix: warnings
This commit is contained in:
Aaron Kimbrell 2024-12-15 22:45:52 -06:00 committed by GitHub
commit 53242ad5d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@ class AMFArrayValue;
/** /**
* @brief Sent when a player moves a Behavior A at position B to their inventory. * @brief Sent when a player moves a Behavior A at position B to their inventory.
*/ */
#pragma warning("This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.")
class MoveToInventoryMessage : public BehaviorMessageBase { class MoveToInventoryMessage : public BehaviorMessageBase {
public: public:
MoveToInventoryMessage(const AMFArrayValue& arguments); MoveToInventoryMessage(const AMFArrayValue& arguments);

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) < 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;