mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 07:47:13 +00:00
refactor(component): the rocket launchpad loads its row in LoadDataFromTemplate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,9 +25,13 @@
|
||||
|
||||
RocketLaunchpadControlComponent::RocketLaunchpadControlComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
|
||||
RegisterMsg(&RocketLaunchpadControlComponent::OnRequestUse);
|
||||
}
|
||||
|
||||
// The RocketLaunchpadControlComponent row
|
||||
void RocketLaunchpadControlComponent::LoadDataFromTemplate() {
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT targetZone, defaultZoneID, targetScene, altLandingPrecondition, altLandingSpawnPointName FROM RocketLaunchpadControlComponent WHERE id = ?;");
|
||||
query.bind(1, componentID);
|
||||
query.bind(1, m_ComponentID);
|
||||
|
||||
auto result = query.execQuery();
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ public:
|
||||
RocketLaunchpadControlComponent(Entity* parent, const int32_t componentID);
|
||||
~RocketLaunchpadControlComponent() override;
|
||||
|
||||
void LoadDataFromTemplate() override;
|
||||
|
||||
/**
|
||||
* Launches some entity to another world
|
||||
* @param originator the entity to launch
|
||||
|
||||
Reference in New Issue
Block a user