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,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));
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user