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