2021-12-05 17:54:36 +00:00
|
|
|
#include "GfJailkeepMission.h"
|
|
|
|
#include "MissionComponent.h"
|
|
|
|
#include "Character.h"
|
2023-01-22 23:38:47 +00:00
|
|
|
#include "eMissionState.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2023-01-22 23:38:47 +00:00
|
|
|
void GfJailkeepMission::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
2021-12-05 17:54:36 +00:00
|
|
|
auto* missionComponent = target->GetComponent<MissionComponent>();
|
|
|
|
if (missionComponent == nullptr)
|
|
|
|
return;
|
|
|
|
|
2023-01-22 23:38:47 +00:00
|
|
|
if (missionID == 385 && missionState == eMissionState::AVAILABLE) {
|
2021-12-05 17:54:36 +00:00
|
|
|
missionComponent->AcceptMission(386, true);
|
|
|
|
missionComponent->AcceptMission(387, true);
|
|
|
|
missionComponent->AcceptMission(388, true);
|
|
|
|
missionComponent->AcceptMission(390, true);
|
2023-01-22 23:38:47 +00:00
|
|
|
} else if (missionID == 385 && missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) {
|
2021-12-05 17:54:36 +00:00
|
|
|
auto* character = target->GetCharacter();
|
|
|
|
if (character != nullptr && character->GetPlayerFlag(68)) {
|
|
|
|
missionComponent->AcceptMission(701);
|
|
|
|
missionComponent->AcceptMission(702);
|
|
|
|
missionComponent->AcceptMission(703);
|
|
|
|
missionComponent->AcceptMission(704);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void GfJailkeepMission::OnUse(Entity* self, Entity* user) {
|
|
|
|
auto* missionComponent = user->GetComponent<MissionComponent>();
|
|
|
|
if (missionComponent == nullptr)
|
|
|
|
return;
|
|
|
|
|
2023-01-22 23:38:47 +00:00
|
|
|
if (missionComponent->GetMissionState(385) == eMissionState::ACTIVE) {
|
2021-12-05 17:54:36 +00:00
|
|
|
missionComponent->AcceptMission(386, true);
|
|
|
|
missionComponent->AcceptMission(387, true);
|
|
|
|
missionComponent->AcceptMission(388, true);
|
|
|
|
missionComponent->AcceptMission(390, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|