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

@@ -4,6 +4,7 @@
#include "Character.h"
#include "EntityManager.h"
#include "eReplicaComponentType.h"
#include "ePlayerFlag.h"
void AgCagedBricksServer::OnUse(Entity* self, Entity* user) {
//Tell the client to spawn the baby spiderling:
@@ -17,7 +18,7 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) {
if (!character) return;
character->SetPlayerFlag(74, true);
character->SetPlayerFlag(ePlayerFlag::CAGED_SPIDER, true);
//Remove the maelstrom cube:
auto inv = static_cast<InventoryComponent*>(user->GetComponent(eReplicaComponentType::INVENTORY));

View File

@@ -18,7 +18,7 @@ void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss
missionState == eMissionState::AVAILABLE ||
missionState == eMissionState::COMPLETE_AVAILABLE) {
if (inventoryComponent->GetLotCount(14378) == 0) {
inventoryComponent->AddItem(14378, 1, eLootSourceType::LOOT_SOURCE_NONE);
inventoryComponent->AddItem(14378, 1, eLootSourceType::NONE);
}
} else if (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) {
inventoryComponent->RemoveItem(14378, 1);

View File

@@ -10,7 +10,7 @@ void NpcPirateServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss
// Add or remove the lucky shovel based on whether the mission was completed or started
if ((missionState == eMissionState::AVAILABLE || missionState == eMissionState::COMPLETE_AVAILABLE)
&& luckyShovel == nullptr) {
inventory->AddItem(14591, 1, eLootSourceType::LOOT_SOURCE_NONE);
inventory->AddItem(14591, 1, eLootSourceType::NONE);
} else if (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) {
inventory->RemoveItem(14591, 1);
}

View File

@@ -19,7 +19,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio
// For the daily we add the maelstrom vacuum if the player doesn't have it yet
if (missionID == 1883 && (missionState == eMissionState::AVAILABLE || missionState == eMissionState::COMPLETE_AVAILABLE)
&& maelstromVacuum == nullptr) {
inventory->AddItem(maelstromVacuumLot, 1, eLootSourceType::LOOT_SOURCE_NONE);
inventory->AddItem(maelstromVacuumLot, 1, eLootSourceType::NONE);
} else if (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) {
inventory->RemoveItem(maelstromVacuumLot, 1);
}

View File

@@ -4,6 +4,7 @@
#include "eMissionState.h"
#include "Character.h"
#include "eReplicaComponentType.h"
#include "ePlayerFlag.h"
/*
--------------------------------------------------------------
@@ -36,6 +37,6 @@ void RemoveRentalGear::OnMissionDialogueOK(Entity* self, Entity* target, int mis
//reset the equipment flag
auto character = target->GetCharacter();
if (character) character->SetPlayerFlag(equipFlag, false);
if (character) character->SetPlayerFlag(ePlayerFlag::EQUPPED_TRIAL_FACTION_GEAR, false);
}
}

View File

@@ -7,6 +7,5 @@ class RemoveRentalGear : public CppScripts::Script {
private:
int defaultMission = 768; //mission to remove gearSets on completion
std::vector<int> gearSets = { 14359,14321,14353,14315 }; //inventory items to remove
int equipFlag = 126; //Set upon wearing trial faction armor for the first time in a session
};