Breakout rest of the enums from dCommonVars and clean it up (#1061)

* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity

* address feedback

* make player flag types consistent

* fix typo
This commit is contained in:
Aaron Kimbrell
2023-05-02 17:39:21 -05:00
committed by GitHub
parent e8590a5853
commit 6aa90ad5b2
161 changed files with 960 additions and 776 deletions

View File

@@ -5,6 +5,7 @@
#include "eMissionTaskType.h"
#include "eMissionState.h"
#include "eEndBehavior.h"
#include "eStateChangeType.h"
void NtAssemblyTubeServer::OnStartup(Entity* self) {
self->SetProximityRadius(5, "teleport");

View File

@@ -42,5 +42,5 @@ void NtDirtCloudServer::OnSkillEventFired(Entity* self, Entity* caster, const st
self->SetVar(u"CloudOn", false);
self->Smash(self->GetObjectID(), VIOLENT);
self->Smash(self->GetObjectID(), eKillType::VIOLENT);
}

View File

@@ -2,12 +2,13 @@
#include "InventoryComponent.h"
#include "MissionComponent.h"
#include "eMissionState.h"
#include "ePlayerFlag.h"
void NtDukeServer::SetVariables(Entity* self) {
self->SetVar<float_t>(m_SpyProximityVariable, 35.0f);
self->SetVar<SpyData>(m_SpyDataVariable, {
NT_FACTION_SPY_DUKE, 13548, 1319
ePlayerFlag::NT_FACTION_SPY_DUKE, 13548, 1319
});
self->SetVar<std::vector<SpyDialogue>>(m_SpyDialogueTableVariable, {
@@ -31,7 +32,7 @@ void NtDukeServer::OnMissionDialogueOK(Entity* self, Entity* target, int mission
auto lotCount = inventoryComponent->GetLotCount(m_SwordLot);
if ((state == eMissionState::AVAILABLE || state == eMissionState::ACTIVE) && lotCount < 1) {
inventoryComponent->AddItem(m_SwordLot, 1, eLootSourceType::LOOT_SOURCE_NONE);
inventoryComponent->AddItem(m_SwordLot, 1, eLootSourceType::NONE);
} else if (state == eMissionState::READY_TO_COMPLETE) {
inventoryComponent->RemoveItem(m_SwordLot, lotCount);
}

View File

@@ -1,11 +1,12 @@
#include "NtHaelServer.h"
#include "Entity.h"
#include "ePlayerFlag.h"
void NtHaelServer::SetVariables(Entity* self) {
self->SetVar<float_t>(m_SpyProximityVariable, 25.0f);
self->SetVar<SpyData>(m_SpyDataVariable, {
NT_FACTION_SPY_HAEL, 13892, 1321
ePlayerFlag::NT_FACTION_SPY_HAEL, 13892, 1321
});
self->SetVar<std::vector<SpyDialogue>>(m_SpyDialogueTableVariable, {

View File

@@ -2,10 +2,11 @@
#include "GameMessages.h"
#include "Entity.h"
#include "Character.h"
#include "ePlayerFlag.h"
void NTImagimeterVisibility::OnRebuildComplete(Entity* self, Entity* target) {
auto* character = target->GetCharacter();
if (character) character->SetPlayerFlag(ePlayerFlags::NT_PLINTH_REBUILD, true);
if (character) character->SetPlayerFlag(ePlayerFlag::NT_PLINTH_REBUILD, true);
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlinthBuilt", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress());
}

View File

@@ -1,11 +1,12 @@
#include "NtOverbuildServer.h"
#include "EntityManager.h"
#include "ePlayerFlag.h"
void NtOverbuildServer::SetVariables(Entity* self) {
self->SetVar<float_t>(m_SpyProximityVariable, 30.0f);
self->SetVar<SpyData>(m_SpyDataVariable, {
NT_FACTION_SPY_OVERBUILD, 13891, 1320
ePlayerFlag::NT_FACTION_SPY_OVERBUILD, 13891, 1320
});
self->SetVar<std::vector<SpyDialogue>>(m_SpyDialogueTableVariable, {

View File

@@ -4,6 +4,8 @@
#include "EntityManager.h"
#include "Character.h"
#include "eMissionState.h"
#include "eTerminateType.h"
#include "eStateChangeType.h"
void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"bActive", 1, 0, user->GetObjectID(), "", user->GetSystemAddress());

View File

@@ -3,6 +3,7 @@
#include "EntityManager.h"
#include "MissionComponent.h"
#include "eMissionTaskType.h"
#include "eStateChangeType.h"
void NtParadoxTeleServer::OnStartup(Entity* self) {
self->SetProximityRadius(5, "teleport");

View File

@@ -2,6 +2,8 @@
#include "GameMessages.h"
#include "EntityManager.h"
#include "eEndBehavior.h"
#include "eTerminateType.h"
#include "eStateChangeType.h"
void NtVentureCannonServer::OnUse(Entity* self, Entity* user) {
auto* player = user;
@@ -99,7 +101,7 @@ void NtVentureCannonServer::UnlockCannonPlayer(Entity* self, Entity* player) {
self->SetNetworkVar(u"bIsInUse", false);
GameMessages::SendTerminateInteraction(player->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
}
void NtVentureCannonServer::FirePlayer(Entity* self, Entity* player) {