mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
@@ -213,28 +213,28 @@ public:
|
||||
|
||||
e.taskid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.activityid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.req_activity_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.step = static_cast<int32_t>(atoi(row[3]));
|
||||
e.req_activity_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.step = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.activitytype = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.target_name = row[5] ? row[5] : "";
|
||||
e.goalmethod = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.goalcount = static_cast<int32_t>(atoi(row[7]));
|
||||
e.goalcount = row[7] ? static_cast<int32_t>(atoi(row[7])) : 1;
|
||||
e.description_override = row[8] ? row[8] : "";
|
||||
e.npc_match_list = row[9] ? row[9] : "";
|
||||
e.item_id_list = row[10] ? row[10] : "";
|
||||
e.item_list = row[11] ? row[11] : "";
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dz_switch_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.min_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.min_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.min_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.max_x = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.max_y = row[17] ? strtof(row[17], nullptr) : 0;
|
||||
e.max_z = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.skill_list = row[19] ? row[19] : "";
|
||||
e.spell_list = row[20] ? row[20] : "";
|
||||
e.skill_list = row[19] ? row[19] : "-1";
|
||||
e.spell_list = row[20] ? row[20] : "0";
|
||||
e.zones = row[21] ? row[21] : "";
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[22]));
|
||||
e.optional = static_cast<int8_t>(atoi(row[23]));
|
||||
e.zone_version = row[22] ? static_cast<int32_t>(atoi(row[22])) : -1;
|
||||
e.optional = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e.list_group = row[24] ? static_cast<uint8_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
|
||||
return e;
|
||||
@@ -429,28 +429,28 @@ public:
|
||||
|
||||
e.taskid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.activityid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.req_activity_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.step = static_cast<int32_t>(atoi(row[3]));
|
||||
e.req_activity_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.step = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.activitytype = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.target_name = row[5] ? row[5] : "";
|
||||
e.goalmethod = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.goalcount = static_cast<int32_t>(atoi(row[7]));
|
||||
e.goalcount = row[7] ? static_cast<int32_t>(atoi(row[7])) : 1;
|
||||
e.description_override = row[8] ? row[8] : "";
|
||||
e.npc_match_list = row[9] ? row[9] : "";
|
||||
e.item_id_list = row[10] ? row[10] : "";
|
||||
e.item_list = row[11] ? row[11] : "";
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dz_switch_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.min_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.min_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.min_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.max_x = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.max_y = row[17] ? strtof(row[17], nullptr) : 0;
|
||||
e.max_z = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.skill_list = row[19] ? row[19] : "";
|
||||
e.spell_list = row[20] ? row[20] : "";
|
||||
e.skill_list = row[19] ? row[19] : "-1";
|
||||
e.spell_list = row[20] ? row[20] : "0";
|
||||
e.zones = row[21] ? row[21] : "";
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[22]));
|
||||
e.optional = static_cast<int8_t>(atoi(row[23]));
|
||||
e.zone_version = row[22] ? static_cast<int32_t>(atoi(row[22])) : -1;
|
||||
e.optional = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e.list_group = row[24] ? static_cast<uint8_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@@ -478,28 +478,28 @@ public:
|
||||
|
||||
e.taskid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.activityid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.req_activity_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.step = static_cast<int32_t>(atoi(row[3]));
|
||||
e.req_activity_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.step = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.activitytype = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.target_name = row[5] ? row[5] : "";
|
||||
e.goalmethod = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.goalcount = static_cast<int32_t>(atoi(row[7]));
|
||||
e.goalcount = row[7] ? static_cast<int32_t>(atoi(row[7])) : 1;
|
||||
e.description_override = row[8] ? row[8] : "";
|
||||
e.npc_match_list = row[9] ? row[9] : "";
|
||||
e.item_id_list = row[10] ? row[10] : "";
|
||||
e.item_list = row[11] ? row[11] : "";
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dz_switch_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.min_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.min_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.min_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.max_x = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.max_y = row[17] ? strtof(row[17], nullptr) : 0;
|
||||
e.max_z = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.skill_list = row[19] ? row[19] : "";
|
||||
e.spell_list = row[20] ? row[20] : "";
|
||||
e.skill_list = row[19] ? row[19] : "-1";
|
||||
e.spell_list = row[20] ? row[20] : "0";
|
||||
e.zones = row[21] ? row[21] : "";
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[22]));
|
||||
e.optional = static_cast<int8_t>(atoi(row[23]));
|
||||
e.zone_version = row[22] ? static_cast<int32_t>(atoi(row[22])) : -1;
|
||||
e.optional = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e.list_group = row[24] ? static_cast<uint8_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
Reference in New Issue
Block a user