mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 13:38:21 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
@@ -147,13 +147,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
@@ -298,13 +298,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
@@ -331,13 +331,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user