mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 22:17:31 +00:00
Fixed mission related preconditions
This commit is contained in:
parent
94b9731a2b
commit
6be65569de
@ -139,21 +139,13 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat
|
|||||||
case PreconditionType::DoesNotHaveItem:
|
case PreconditionType::DoesNotHaveItem:
|
||||||
return inventoryComponent->IsEquipped(value) < count;
|
return inventoryComponent->IsEquipped(value) < count;
|
||||||
case PreconditionType::HasAchievement:
|
case PreconditionType::HasAchievement:
|
||||||
mission = missionComponent->GetMission(value);
|
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
||||||
|
|
||||||
return mission == nullptr || mission->GetMissionState() >= eMissionState::COMPLETE;
|
|
||||||
case PreconditionType::MissionAvailable:
|
case PreconditionType::MissionAvailable:
|
||||||
mission = missionComponent->GetMission(value);
|
return missionComponent->GetMissionState(value) >= eMissionState::AVAILABLE;
|
||||||
|
|
||||||
return mission == nullptr || mission->GetMissionState() >= eMissionState::AVAILABLE;
|
|
||||||
case PreconditionType::OnMission:
|
case PreconditionType::OnMission:
|
||||||
mission = missionComponent->GetMission(value);
|
return missionComponent->GetMissionState(value) >= eMissionState::ACTIVE;
|
||||||
|
|
||||||
return mission == nullptr || mission->GetMissionState() >= eMissionState::ACTIVE;
|
|
||||||
case PreconditionType::MissionComplete:
|
case PreconditionType::MissionComplete:
|
||||||
mission = missionComponent->GetMission(value);
|
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
||||||
|
|
||||||
return mission == nullptr ? false : mission->GetMissionState() >= eMissionState::COMPLETE;
|
|
||||||
case PreconditionType::PetDeployed:
|
case PreconditionType::PetDeployed:
|
||||||
return false; // TODO
|
return false; // TODO
|
||||||
case PreconditionType::HasFlag:
|
case PreconditionType::HasFlag:
|
||||||
|
Loading…
Reference in New Issue
Block a user