mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 05:18:40 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
@@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -258,10 +258,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -286,10 +286,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user