mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 21:58:22 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
@@ -191,19 +191,19 @@ public:
|
||||
e.y = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.z = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.heading = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.bind_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.player_choice = static_cast<int32_t>(atoi(row[6]));
|
||||
e.player_class = static_cast<int32_t>(atoi(row[7]));
|
||||
e.player_deity = static_cast<int32_t>(atoi(row[8]));
|
||||
e.player_race = static_cast<int32_t>(atoi(row[9]));
|
||||
e.start_zone = static_cast<int32_t>(atoi(row[10]));
|
||||
e.zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.bind_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.player_choice = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.player_class = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.player_deity = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.player_race = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.start_zone = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.bind_x = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.bind_y = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.bind_z = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.select_rank = row[14] ? static_cast<uint8_t>(strtoul(row[14], nullptr, 10)) : 50;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[16]));
|
||||
e.min_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.max_expansion = row[16] ? static_cast<int8_t>(atoi(row[16])) : -1;
|
||||
e.content_flags = row[17] ? row[17] : "";
|
||||
e.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
@@ -383,19 +383,19 @@ public:
|
||||
e.y = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.z = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.heading = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.bind_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.player_choice = static_cast<int32_t>(atoi(row[6]));
|
||||
e.player_class = static_cast<int32_t>(atoi(row[7]));
|
||||
e.player_deity = static_cast<int32_t>(atoi(row[8]));
|
||||
e.player_race = static_cast<int32_t>(atoi(row[9]));
|
||||
e.start_zone = static_cast<int32_t>(atoi(row[10]));
|
||||
e.zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.bind_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.player_choice = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.player_class = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.player_deity = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.player_race = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.start_zone = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.bind_x = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.bind_y = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.bind_z = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.select_rank = row[14] ? static_cast<uint8_t>(strtoul(row[14], nullptr, 10)) : 50;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[16]));
|
||||
e.min_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.max_expansion = row[16] ? static_cast<int8_t>(atoi(row[16])) : -1;
|
||||
e.content_flags = row[17] ? row[17] : "";
|
||||
e.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
@@ -426,19 +426,19 @@ public:
|
||||
e.y = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.z = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.heading = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.bind_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.player_choice = static_cast<int32_t>(atoi(row[6]));
|
||||
e.player_class = static_cast<int32_t>(atoi(row[7]));
|
||||
e.player_deity = static_cast<int32_t>(atoi(row[8]));
|
||||
e.player_race = static_cast<int32_t>(atoi(row[9]));
|
||||
e.start_zone = static_cast<int32_t>(atoi(row[10]));
|
||||
e.zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.bind_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.player_choice = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.player_class = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.player_deity = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.player_race = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.start_zone = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.bind_x = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.bind_y = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.bind_z = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.select_rank = row[14] ? static_cast<uint8_t>(strtoul(row[14], nullptr, 10)) : 50;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[16]));
|
||||
e.min_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.max_expansion = row[16] ? static_cast<int8_t>(atoi(row[16])) : -1;
|
||||
e.content_flags = row[17] ? row[17] : "";
|
||||
e.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user