refactor(component): the property entrance loads its row in LoadDataFromTemplate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 08:06:12 -05:00
parent 87f0e730c8
commit 8ef3e323fe
2 changed files with 6 additions and 1 deletions

View File

@@ -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<CDPropertyEntranceComponentTable>();
const auto& entry = table->GetByID(componentID);
const auto& entry = table->GetByID(m_ComponentID);
this->m_MapID = entry.mapID;
this->m_PropertyName = entry.propertyName;

View File

@@ -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