mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
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:
@@ -4,6 +4,8 @@
|
||||
#include "Character.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "eTerminateType.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void NsTokenConsoleServer::OnStartup(Entity* self) {
|
||||
|
||||
@@ -16,7 +18,7 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rebuildComponent->GetState() != REBUILD_COMPLETED) {
|
||||
if (rebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,20 +44,18 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
// Player must be in faction to interact with this entity.
|
||||
LOT tokenLOT = 0;
|
||||
|
||||
if (character->GetPlayerFlag(46)) {
|
||||
if (character->GetPlayerFlag(ePlayerFlag::VENTURE_FACTION)) //venture
|
||||
tokenLOT = 8321;
|
||||
} else if (character->GetPlayerFlag(47)) {
|
||||
else if (character->GetPlayerFlag(ePlayerFlag::ASSEMBLY_FACTION)) //assembly
|
||||
tokenLOT = 8318;
|
||||
} else if (character->GetPlayerFlag(48)) {
|
||||
else if (character->GetPlayerFlag(ePlayerFlag::PARADOX_FACTION)) //paradox
|
||||
tokenLOT = 8320;
|
||||
} else if (character->GetPlayerFlag(49)) {
|
||||
else if (character->GetPlayerFlag(ePlayerFlag::SENTINEL_FACTION)) //sentinel
|
||||
tokenLOT = 8319;
|
||||
}
|
||||
|
||||
inventoryComponent->AddItem(tokenLOT, 5, eLootSourceType::LOOT_SOURCE_NONE);
|
||||
inventoryComponent->AddItem(tokenLOT, 5, eLootSourceType::NONE);
|
||||
|
||||
missionComponent->ForceProgressTaskType(863, 1, 1, false);
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
}
|
||||
|
Reference in New Issue
Block a user