mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-27 09:06:31 +00:00
Fix: Pets can no longer dig treasure without completing Bella Pepper's "Lost Tags" mission (#1287)
* Added mission check to pet digs * Little formatting change * More formatting clean-up
This commit is contained in:
parent
411dce7457
commit
68e5737b74
@ -29,6 +29,7 @@
|
|||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
#include "eObjectBits.h"
|
#include "eObjectBits.h"
|
||||||
#include "eGameMasterLevel.h"
|
#include "eGameMasterLevel.h"
|
||||||
|
#include "eMissionState.h"
|
||||||
|
|
||||||
std::unordered_map<LOT, PetComponent::PetPuzzleData> PetComponent::buildCache{};
|
std::unordered_map<LOT, PetComponent::PetPuzzleData> PetComponent::buildCache{};
|
||||||
std::unordered_map<LWOOBJID, LWOOBJID> PetComponent::currentActivities{};
|
std::unordered_map<LWOOBJID, LWOOBJID> PetComponent::currentActivities{};
|
||||||
@ -439,9 +440,15 @@ void PetComponent::Update(float deltaTime) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto* missionComponent = owner->GetComponent<MissionComponent>();
|
||||||
|
if (!missionComponent) return;
|
||||||
|
|
||||||
|
// Determine if the "Lost Tags" mission has been completed and digging has been unlocked
|
||||||
|
const bool digUnlocked = missionComponent->GetMissionState(842) == eMissionState::COMPLETE;
|
||||||
|
|
||||||
Entity* closestTresure = PetDigServer::GetClosestTresure(position);
|
Entity* closestTresure = PetDigServer::GetClosestTresure(position);
|
||||||
|
|
||||||
if (closestTresure != nullptr) {
|
if (closestTresure != nullptr && digUnlocked) {
|
||||||
// Skeleton Dragon Pat special case for bone digging
|
// Skeleton Dragon Pat special case for bone digging
|
||||||
if (closestTresure->GetLOT() == 12192 && m_Parent->GetLOT() != 13067) {
|
if (closestTresure->GetLOT() == 12192 && m_Parent->GetLOT() != 13067) {
|
||||||
goto skipTresure;
|
goto skipTresure;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user