mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-13 10:58:07 +00:00
Use field names instead of numbers for CDClient tables (#945)
This commit is contained in:
@@ -21,11 +21,11 @@ CDVendorComponentTable::CDVendorComponentTable(void) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM VendorComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDVendorComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.buyScalar = tableData.getFloatField(1, -1.0f);
|
||||
entry.sellScalar = tableData.getFloatField(2, -1.0f);
|
||||
entry.refreshTimeSeconds = tableData.getFloatField(3, -1.0f);
|
||||
entry.LootMatrixIndex = tableData.getIntField(4, -1);
|
||||
entry.id = tableData.getIntField("id", -1);
|
||||
entry.buyScalar = tableData.getFloatField("buyScalar", -1.0f);
|
||||
entry.sellScalar = tableData.getFloatField("sellScalar", -1.0f);
|
||||
entry.refreshTimeSeconds = tableData.getFloatField("refreshTimeSeconds", -1.0f);
|
||||
entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
@@ -56,3 +56,4 @@ std::vector<CDVendorComponent> CDVendorComponentTable::Query(std::function<bool(
|
||||
std::vector<CDVendorComponent> CDVendorComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user