mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 07:47:13 +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) {
|
||||
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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user