mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 01:34:07 +00:00
chore: Use string to access SQLite columns (#1535)
* use string to access field name * Update DEVGMCommands.cpp * corrected column name * constexpr array include <array> Revert "constexpr array" This reverts commit 1492e8b1773ed5fbbe767c74466ca263178ecdd4. Revert "include <array>" This reverts commit 2b7a67e89ad673d420f496be97f9bc51fd2d5e59. include <array> constexpr array --------- Co-authored-by: jadebenn <jonahbenn@yahoo.com>
This commit is contained in:
@@ -377,10 +377,10 @@ void Behavior::PlayFx(std::u16string type, const LWOOBJID target, const LWOOBJID
|
||||
return;
|
||||
}
|
||||
|
||||
const auto name = std::string(result.getStringField(0));
|
||||
const auto name = std::string(result.getStringField("effectName"));
|
||||
|
||||
if (type.empty()) {
|
||||
const auto typeResult = result.getStringField(1);
|
||||
const auto typeResult = result.getStringField("effectType");
|
||||
|
||||
type = GeneralUtils::ASCIIToUTF16(typeResult);
|
||||
|
||||
|
@@ -47,11 +47,11 @@ void SwitchMultipleBehavior::Load() {
|
||||
auto result = query.execQuery();
|
||||
|
||||
while (!result.eof()) {
|
||||
const auto behavior_id = static_cast<uint32_t>(result.getFloatField(1));
|
||||
const auto behavior_id = static_cast<uint32_t>(result.getFloatField("behavior"));
|
||||
|
||||
auto* behavior = CreateBehavior(behavior_id);
|
||||
|
||||
auto value = result.getFloatField(2);
|
||||
auto value = result.getFloatField("value");
|
||||
|
||||
this->m_behaviors.emplace_back(value, behavior);
|
||||
|
||||
|
Reference in New Issue
Block a user