mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-08 03:34:10 +00:00
cleanup enums to make them more consistent
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "Character.h"
|
||||
#include "PetComponent.h"
|
||||
#include "User.h"
|
||||
#include "eMissionState.h"
|
||||
|
||||
std::vector<LWOOBJID> PetDigServer::treasures{};
|
||||
|
||||
@@ -163,13 +164,13 @@ void PetDigServer::ProgressPetDigMissions(const Entity* owner, const Entity* che
|
||||
if (missionComponent != nullptr) {
|
||||
// Can You Dig It progress
|
||||
const auto digMissionState = missionComponent->GetMissionState(843);
|
||||
if (digMissionState == MissionState::MISSION_STATE_ACTIVE) {
|
||||
if (digMissionState == eMissionState::ACTIVE) {
|
||||
missionComponent->ForceProgress(843, 1216, 1);
|
||||
}
|
||||
|
||||
// Pet Excavator progress
|
||||
const auto excavatorMissionState = missionComponent->GetMissionState(505);
|
||||
if (excavatorMissionState == MissionState::MISSION_STATE_ACTIVE) {
|
||||
if (excavatorMissionState == eMissionState::ACTIVE) {
|
||||
if (chest->HasVar(u"PetDig")) {
|
||||
int32_t playerFlag = 1260 + chest->GetVarAs<int32_t>(u"PetDig");
|
||||
Character* player = owner->GetCharacter();
|
||||
@@ -193,7 +194,7 @@ void PetDigServer::SpawnPet(Entity* self, const Entity* owner, const DigInfo dig
|
||||
// Some treasures require a mission to be active
|
||||
if (digInfo.requiredMission >= 0) {
|
||||
auto* missionComponent = owner->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr && missionComponent->GetMissionState(digInfo.requiredMission) < MissionState::MISSION_STATE_ACTIVE) {
|
||||
if (missionComponent != nullptr && missionComponent->GetMissionState(digInfo.requiredMission) < eMissionState::ACTIVE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user