mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 14:38:20 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
@@ -183,13 +183,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
return e;
|
||||
@@ -362,13 +362,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@@ -402,13 +402,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
Reference in New Issue
Block a user