mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-23 14:33:07 +00:00
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:
@@ -22,9 +22,12 @@
|
|||||||
PropertyEntranceComponent::PropertyEntranceComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
|
PropertyEntranceComponent::PropertyEntranceComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
|
||||||
RegisterMsg(&PropertyEntranceComponent::OnRequestUse);
|
RegisterMsg(&PropertyEntranceComponent::OnRequestUse);
|
||||||
this->propertyQueries = {};
|
this->propertyQueries = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
// The PropertyEntranceComponent row
|
||||||
|
void PropertyEntranceComponent::LoadDataFromTemplate() {
|
||||||
auto table = CDClientManager::GetTable<CDPropertyEntranceComponentTable>();
|
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_MapID = entry.mapID;
|
||||||
this->m_PropertyName = entry.propertyName;
|
this->m_PropertyName = entry.propertyName;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public:
|
|||||||
explicit PropertyEntranceComponent(Entity* parent, const int32_t componentID);
|
explicit PropertyEntranceComponent(Entity* parent, const int32_t componentID);
|
||||||
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_ENTRANCE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_ENTRANCE;
|
||||||
|
|
||||||
|
void LoadDataFromTemplate() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a RequestUse for some other entity, rendering the property browse menu
|
* Handles a RequestUse for some other entity, rendering the property browse menu
|
||||||
* @param entity the entity that triggered the event
|
* @param entity the entity that triggered the event
|
||||||
|
|||||||
Reference in New Issue
Block a user