format codebase

This commit is contained in:
aronwk-aaron
2022-07-28 08:39:57 -05:00
parent 4f7aa11067
commit 19e77a38d8
881 changed files with 34700 additions and 38689 deletions

View File

@@ -6,43 +6,34 @@
#include "MissionComponent.h"
#include "Item.h"
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
{
auto* character = target->GetCharacter();
auto* missionComponent = target->GetComponent<MissionComponent>();
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) {
auto* character = target->GetCharacter();
auto* missionComponent = target->GetComponent<MissionComponent>();
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
const auto state = missionComponent->GetMissionState(320);
if (missionID == 768 && missionState == MissionState::MISSION_STATE_AVAILABLE)
{
if (!character->GetPlayerFlag(71))
{
// TODO: Cinematic "MissionCam"
}
}
else if (missionID == 768 && missionState >= MissionState::MISSION_STATE_READY_TO_COMPLETE)
{
const auto state = missionComponent->GetMissionState(320);
if (missionID == 768 && missionState == MissionState::MISSION_STATE_AVAILABLE) {
if (!character->GetPlayerFlag(71)) {
// TODO: Cinematic "MissionCam"
}
} else if (missionID == 768 && missionState >= MissionState::MISSION_STATE_READY_TO_COMPLETE) {
//remove the inventory items
for (int item : gearSets)
{
for (int item : gearSets) {
auto* id = inventoryComponent->FindItemByLot(item);
if (id)
{
if (id) {
inventoryComponent->UnEquipItem(id);
inventoryComponent->RemoveItem(id->GetLot(), id->GetCount());
}
}
}
else if (
(missionID == 320 && state == MissionState::MISSION_STATE_AVAILABLE) /*||
(state == MissionState::MISSION_STATE_COMPLETE && missionID == 891 && missionState == MissionState::MISSION_STATE_READY_TO_COMPLETE)*/
)
{
//GameMessages::SendNotifyClientObject(EntityManager::Instance()->GetZoneControlEntity()->GetObjectID(), u"GuardChat", target->GetObjectID(), 0, target->GetObjectID(), "", target->GetSystemAddress());
} else if (
(missionID == 320 && state == MissionState::MISSION_STATE_AVAILABLE) /*||
(state == MissionState::MISSION_STATE_COMPLETE && missionID == 891 && missionState == MissionState::MISSION_STATE_READY_TO_COMPLETE)*/
) {
//GameMessages::SendNotifyClientObject(EntityManager::Instance()->GetZoneControlEntity()->GetObjectID(), u"GuardChat", target->GetObjectID(), 0, target->GetObjectID(), "", target->GetSystemAddress());
target->GetCharacter()->SetPlayerFlag(113, true);
target->GetCharacter()->SetPlayerFlag(113, true);
EntityManager::Instance()->GetZoneControlEntity()->AddTimer("GuardFlyAway", 1.0f);
}
EntityManager::Instance()->GetZoneControlEntity()->AddTimer("GuardFlyAway", 1.0f);
}
}