From 9ba297dd2e2a6814646fa755ebaac780d60f6a0e Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:10:02 -0700 Subject: [PATCH] Add code to complete hidden property mission (#641) --- dScripts/BasePropertyServer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dScripts/BasePropertyServer.cpp b/dScripts/BasePropertyServer.cpp index e7a95844..ce36caa9 100644 --- a/dScripts/BasePropertyServer.cpp +++ b/dScripts/BasePropertyServer.cpp @@ -169,11 +169,10 @@ void BasePropertyServer::BaseZonePropertyRented(Entity* self, Entity* player) co EntityManager::Instance()->DestructEntity(plaque); } - if (self->GetVar(brickLinkMissionIDFlag) != 0) { - auto plaques = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(PropertyPlaqueGroup)); - for (auto* plaque : plaques) { - EntityManager::Instance()->DestructEntity(plaque); - } + auto brickLinkMissionID = self->GetVar(brickLinkMissionIDFlag); + if (brickLinkMissionID != 0) { + auto missionComponent = player->GetComponent(); + if (missionComponent) missionComponent->CompleteMission(brickLinkMissionID, true); } ActivateSpawner(self->GetVar(PropObjsSpawner));