mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 14:37:25 +00:00
Amend preconditions fix
This commit is contained in:
parent
6be65569de
commit
d57c5101f4
@ -139,12 +139,19 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat
|
||||
case PreconditionType::DoesNotHaveItem:
|
||||
return inventoryComponent->IsEquipped(value) < count;
|
||||
case PreconditionType::HasAchievement:
|
||||
if (missionComponent == nullptr) return false;
|
||||
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
||||
case PreconditionType::MissionAvailable:
|
||||
return missionComponent->GetMissionState(value) >= eMissionState::AVAILABLE;
|
||||
if (missionComponent == nullptr) return false;
|
||||
return missionComponent->GetMissionState(value) == eMissionState::AVAILABLE || missionComponent->GetMissionState(value) == eMissionState::COMPLETE_AVAILABLE;
|
||||
case PreconditionType::OnMission:
|
||||
return missionComponent->GetMissionState(value) >= eMissionState::ACTIVE;
|
||||
if (missionComponent == nullptr) return false;
|
||||
return missionComponent->GetMissionState(value) == eMissionState::ACTIVE ||
|
||||
missionComponent->GetMissionState(value) == eMissionState::COMPLETE_ACTIVE ||
|
||||
missionComponent->GetMissionState(value) == eMissionState::READY_TO_COMPLETE ||
|
||||
missionComponent->GetMissionState(value) == eMissionState::COMPLETE_READY_TO_COMPLETE;
|
||||
case PreconditionType::MissionComplete:
|
||||
if (missionComponent == nullptr) return false;
|
||||
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
||||
case PreconditionType::PetDeployed:
|
||||
return false; // TODO
|
||||
|
Loading…
Reference in New Issue
Block a user