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

@@ -3,6 +3,8 @@
#include "GameMessages.h"
#include "Character.h"
#include "eReplicaComponentType.h"
#include "eTerminateType.h"
#include "ePlayerFlag.h"
//2021-05-03 - max - added script, omitted some parts related to inheritance in lua which we don't need
@@ -22,15 +24,15 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
if (!character) return;
// At this point the player has to be in a faction.
LOT tokenLOT = 0;
if (character->GetPlayerFlag(ePlayerFlags::VENTURE_FACTION)) //venture
if (character->GetPlayerFlag(ePlayerFlag::VENTURE_FACTION)) //venture
tokenLOT = 8321;
else if (character->GetPlayerFlag(ePlayerFlags::ASSEMBLY_FACTION)) //assembly
else if (character->GetPlayerFlag(ePlayerFlag::ASSEMBLY_FACTION)) //assembly
tokenLOT = 8318;
else if (character->GetPlayerFlag(ePlayerFlags::PARADOX_FACTION)) //paradox
else if (character->GetPlayerFlag(ePlayerFlag::PARADOX_FACTION)) //paradox
tokenLOT = 8320;
else if (character->GetPlayerFlag(ePlayerFlags::SENTINEL_FACTION)) //sentinel
else if (character->GetPlayerFlag(ePlayerFlag::SENTINEL_FACTION)) //sentinel
tokenLOT = 8319;
inv->AddItem(tokenLOT, tokensToGive, eLootSourceType::LOOT_SOURCE_NONE);
inv->AddItem(tokenLOT, tokensToGive, eLootSourceType::NONE);
}
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());