mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-20 22:38:08 +00:00
format codebase
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user