From 8ef3e323fe6f96e55b4ad24806665cc298b78a8f Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Thu, 1 Oct 2026 08:06:12 -0500 Subject: [PATCH] refactor(component): the property entrance loads its row in LoadDataFromTemplate Co-Authored-By: Claude Opus 5.5 --- dGame/dComponents/PropertyEntranceComponent.cpp | 5 ++++- dGame/dComponents/PropertyEntranceComponent.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dGame/dComponents/PropertyEntranceComponent.cpp b/dGame/dComponents/PropertyEntranceComponent.cpp index 29cccf24b..41f7bc868 100644 --- a/dGame/dComponents/PropertyEntranceComponent.cpp +++ b/dGame/dComponents/PropertyEntranceComponent.cpp @@ -22,9 +22,12 @@ PropertyEntranceComponent::PropertyEntranceComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) { RegisterMsg(&PropertyEntranceComponent::OnRequestUse); this->propertyQueries = {}; +} +// The PropertyEntranceComponent row +void PropertyEntranceComponent::LoadDataFromTemplate() { auto table = CDClientManager::GetTable(); - const auto& entry = table->GetByID(componentID); + const auto& entry = table->GetByID(m_ComponentID); this->m_MapID = entry.mapID; this->m_PropertyName = entry.propertyName; diff --git a/dGame/dComponents/PropertyEntranceComponent.h b/dGame/dComponents/PropertyEntranceComponent.h index 9674f9ed1..286b6fbe9 100644 --- a/dGame/dComponents/PropertyEntranceComponent.h +++ b/dGame/dComponents/PropertyEntranceComponent.h @@ -17,6 +17,8 @@ public: explicit PropertyEntranceComponent(Entity* parent, const int32_t componentID); static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_ENTRANCE; + void LoadDataFromTemplate() override; + /** * Handles a RequestUse for some other entity, rendering the property browse menu * @param entity the entity that triggered the event