Update dGame/dComponents/PropertyManagementComponent.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Aaron Kimbrell
2026-04-05 03:31:36 -05:00
committed by GitHub
parent 453624494c
commit 6ad65fcfca

View File

@@ -131,12 +131,22 @@ PropertyManagementComponent::PropertyManagementComponent(Entity* parent, const i
// Load daily reputation contributions and subscribe to position updates
m_CurrentDate = GeneralUtils::GetCurrentUTCDate();
LoadDailyContributions();
Entity::OnPlayerPositionUpdate += [this](Entity* player, const PositionUpdate& update) {
OnPlayerPositionUpdateHandler(player, update);
Entity::OnPlayerPositionUpdate += [](Entity* player, const PositionUpdate& update) {
auto* propertyManagementComponent = PropertyManagementComponent::instance;
if (propertyManagementComponent == nullptr) {
return;
}
propertyManagementComponent->OnPlayerPositionUpdateHandler(player, update);
};
}
}
PropertyManagementComponent::~PropertyManagementComponent() {
if (instance == this) {
instance = nullptr;
}
}
LWOOBJID PropertyManagementComponent::GetOwnerId() const {
return owner;
}