Use field names instead of numbers for CDClient tables (#945)

This commit is contained in:
David Markowitz
2023-01-07 01:48:59 -08:00
committed by GitHub
parent a580e3a2f5
commit 8920cd1063
39 changed files with 488 additions and 450 deletions

View File

@@ -21,9 +21,9 @@ CDItemSetSkillsTable::CDItemSetSkillsTable(void) {
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemSetSkills");
while (!tableData.eof()) {
CDItemSetSkills entry;
entry.SkillSetID = tableData.getIntField(0, -1);
entry.SkillID = tableData.getIntField(1, -1);
entry.SkillCastType = tableData.getIntField(2, -1);
entry.SkillSetID = tableData.getIntField("SkillSetID", -1);
entry.SkillID = tableData.getIntField("SkillID", -1);
entry.SkillCastType = tableData.getIntField("SkillCastType", -1);
this->entries.push_back(entry);
tableData.nextRow();
@@ -65,3 +65,4 @@ std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(unsigned int Ski
return toReturn;
}