Add code to complete hidden property mission (#641)

This commit is contained in:
David Markowitz 2022-07-13 09:10:02 -07:00 committed by GitHub
parent ccb9f7c499
commit 9ba297dd2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,11 +169,10 @@ void BasePropertyServer::BaseZonePropertyRented(Entity* self, Entity* player) co
EntityManager::Instance()->DestructEntity(plaque);
}
if (self->GetVar<int32_t>(brickLinkMissionIDFlag) != 0) {
auto plaques = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(PropertyPlaqueGroup));
for (auto* plaque : plaques) {
EntityManager::Instance()->DestructEntity(plaque);
}
auto brickLinkMissionID = self->GetVar<uint32_t>(brickLinkMissionIDFlag);
if (brickLinkMissionID != 0) {
auto missionComponent = player->GetComponent<MissionComponent>();
if (missionComponent) missionComponent->CompleteMission(brickLinkMissionID, true);
}
ActivateSpawner(self->GetVar<std::string>(PropObjsSpawner));