[Repositories] Fix datetime zero-value save behavior (#3976)

This commit is contained in:
Chris Miles
2024-01-14 00:10:13 -06:00
committed by GitHub
parent e40267b9b8
commit 14509fcc4e
133 changed files with 3647 additions and 3658 deletions
@@ -127,10 +127,10 @@ public:
if (results.RowCount() == 1) {
FactionValues e{};
e.char_id = static_cast<int32_t>(atoi(row[0]));
e.faction_id = static_cast<int32_t>(atoi(row[1]));
e.current_value = static_cast<int16_t>(atoi(row[2]));
e.temp = static_cast<int8_t>(atoi(row[3]));
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
return e;
}
@@ -259,10 +259,10 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
FactionValues e{};
e.char_id = static_cast<int32_t>(atoi(row[0]));
e.faction_id = static_cast<int32_t>(atoi(row[1]));
e.current_value = static_cast<int16_t>(atoi(row[2]));
e.temp = static_cast<int8_t>(atoi(row[3]));
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
all_entries.push_back(e);
}
@@ -287,10 +287,10 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
FactionValues e{};
e.char_id = static_cast<int32_t>(atoi(row[0]));
e.faction_id = static_cast<int32_t>(atoi(row[1]));
e.current_value = static_cast<int16_t>(atoi(row[2]));
e.temp = static_cast<int8_t>(atoi(row[3]));
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
all_entries.push_back(e);
}