mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-13 02:48:19 +00:00
Use field names instead of numbers for CDClient tables (#945)
This commit is contained in:
@@ -21,16 +21,16 @@ CDRebuildComponentTable::CDRebuildComponentTable(void) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM RebuildComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDRebuildComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.reset_time = tableData.getFloatField(1, -1.0f);
|
||||
entry.complete_time = tableData.getFloatField(2, -1.0f);
|
||||
entry.take_imagination = tableData.getIntField(3, -1);
|
||||
entry.interruptible = tableData.getIntField(4, -1) == 1 ? true : false;
|
||||
entry.self_activator = tableData.getIntField(5, -1) == 1 ? true : false;
|
||||
entry.custom_modules = tableData.getStringField(6, "");
|
||||
entry.activityID = tableData.getIntField(7, -1);
|
||||
entry.post_imagination_cost = tableData.getIntField(8, -1);
|
||||
entry.time_before_smash = tableData.getFloatField(9, -1.0f);
|
||||
entry.id = tableData.getIntField("id", -1);
|
||||
entry.reset_time = tableData.getFloatField("reset_time", -1.0f);
|
||||
entry.complete_time = tableData.getFloatField("complete_time", -1.0f);
|
||||
entry.take_imagination = tableData.getIntField("take_imagination", -1);
|
||||
entry.interruptible = tableData.getIntField("interruptible", -1) == 1 ? true : false;
|
||||
entry.self_activator = tableData.getIntField("self_activator", -1) == 1 ? true : false;
|
||||
entry.custom_modules = tableData.getStringField("custom_modules", "");
|
||||
entry.activityID = tableData.getIntField("activityID", -1);
|
||||
entry.post_imagination_cost = tableData.getIntField("post_imagination_cost", -1);
|
||||
entry.time_before_smash = tableData.getFloatField("time_before_smash", -1.0f);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
@@ -61,3 +61,4 @@ std::vector<CDRebuildComponent> CDRebuildComponentTable::Query(std::function<boo
|
||||
std::vector<CDRebuildComponent> CDRebuildComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user