mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Tasks] Implement Task Goal Match List (#2097)
* [Tasks] Implement Task Goal Match List * Migration * Add npc_type_id to match types for npc kill * Flip str_tolower
This commit is contained in:
@@ -29,6 +29,7 @@ public:
|
||||
std::string spell_list;
|
||||
std::string description_override;
|
||||
int goalid;
|
||||
std::string goal_match_list;
|
||||
int goalmethod;
|
||||
int goalcount;
|
||||
int delivertonpc;
|
||||
@@ -54,6 +55,7 @@ public:
|
||||
"spell_list",
|
||||
"description_override",
|
||||
"goalid",
|
||||
"goal_match_list",
|
||||
"goalmethod",
|
||||
"goalcount",
|
||||
"delivertonpc",
|
||||
@@ -75,6 +77,7 @@ public:
|
||||
"spell_list",
|
||||
"description_override",
|
||||
"goalid",
|
||||
"goal_match_list",
|
||||
"goalmethod",
|
||||
"goalcount",
|
||||
"delivertonpc",
|
||||
@@ -130,6 +133,7 @@ public:
|
||||
entry.spell_list = "0";
|
||||
entry.description_override = "";
|
||||
entry.goalid = 0;
|
||||
entry.goal_match_list = "";
|
||||
entry.goalmethod = 0;
|
||||
entry.goalcount = 1;
|
||||
entry.delivertonpc = 0;
|
||||
@@ -180,11 +184,12 @@ public:
|
||||
entry.spell_list = row[7] ? row[7] : "";
|
||||
entry.description_override = row[8] ? row[8] : "";
|
||||
entry.goalid = atoi(row[9]);
|
||||
entry.goalmethod = atoi(row[10]);
|
||||
entry.goalcount = atoi(row[11]);
|
||||
entry.delivertonpc = atoi(row[12]);
|
||||
entry.zones = row[13] ? row[13] : "";
|
||||
entry.optional = atoi(row[14]);
|
||||
entry.goal_match_list = row[10] ? row[10] : "";
|
||||
entry.goalmethod = atoi(row[11]);
|
||||
entry.goalcount = atoi(row[12]);
|
||||
entry.delivertonpc = atoi(row[13]);
|
||||
entry.zones = row[14] ? row[14] : "";
|
||||
entry.optional = atoi(row[15]);
|
||||
|
||||
return entry;
|
||||
}
|
||||
@@ -228,11 +233,12 @@ public:
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(task_activities_entry.spell_list) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(task_activities_entry.description_override) + "'");
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(task_activities_entry.goalid));
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(task_activities_entry.goalmethod));
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(task_activities_entry.goalcount));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(task_activities_entry.delivertonpc));
|
||||
update_values.push_back(columns[13] + " = '" + EscapeString(task_activities_entry.zones) + "'");
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(task_activities_entry.optional));
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(task_activities_entry.goal_match_list) + "'");
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(task_activities_entry.goalmethod));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(task_activities_entry.goalcount));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(task_activities_entry.delivertonpc));
|
||||
update_values.push_back(columns[14] + " = '" + EscapeString(task_activities_entry.zones) + "'");
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(task_activities_entry.optional));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -264,6 +270,7 @@ public:
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.spell_list) + "'");
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.description_override) + "'");
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalid));
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.goal_match_list) + "'");
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalmethod));
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalcount));
|
||||
insert_values.push_back(std::to_string(task_activities_entry.delivertonpc));
|
||||
@@ -308,6 +315,7 @@ public:
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.spell_list) + "'");
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.description_override) + "'");
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalid));
|
||||
insert_values.push_back("'" + EscapeString(task_activities_entry.goal_match_list) + "'");
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalmethod));
|
||||
insert_values.push_back(std::to_string(task_activities_entry.goalcount));
|
||||
insert_values.push_back(std::to_string(task_activities_entry.delivertonpc));
|
||||
@@ -356,11 +364,12 @@ public:
|
||||
entry.spell_list = row[7] ? row[7] : "";
|
||||
entry.description_override = row[8] ? row[8] : "";
|
||||
entry.goalid = atoi(row[9]);
|
||||
entry.goalmethod = atoi(row[10]);
|
||||
entry.goalcount = atoi(row[11]);
|
||||
entry.delivertonpc = atoi(row[12]);
|
||||
entry.zones = row[13] ? row[13] : "";
|
||||
entry.optional = atoi(row[14]);
|
||||
entry.goal_match_list = row[10] ? row[10] : "";
|
||||
entry.goalmethod = atoi(row[11]);
|
||||
entry.goalcount = atoi(row[12]);
|
||||
entry.delivertonpc = atoi(row[13]);
|
||||
entry.zones = row[14] ? row[14] : "";
|
||||
entry.optional = atoi(row[15]);
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@@ -395,11 +404,12 @@ public:
|
||||
entry.spell_list = row[7] ? row[7] : "";
|
||||
entry.description_override = row[8] ? row[8] : "";
|
||||
entry.goalid = atoi(row[9]);
|
||||
entry.goalmethod = atoi(row[10]);
|
||||
entry.goalcount = atoi(row[11]);
|
||||
entry.delivertonpc = atoi(row[12]);
|
||||
entry.zones = row[13] ? row[13] : "";
|
||||
entry.optional = atoi(row[14]);
|
||||
entry.goal_match_list = row[10] ? row[10] : "";
|
||||
entry.goalmethod = atoi(row[11]);
|
||||
entry.goalcount = atoi(row[12]);
|
||||
entry.delivertonpc = atoi(row[13]);
|
||||
entry.zones = row[14] ? row[14] : "";
|
||||
entry.optional = atoi(row[15]);
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ struct ActivityInformation {
|
||||
int skill_id; // older clients, first id from above
|
||||
int spell_id; // older clients, first id from above
|
||||
int goal_id;
|
||||
std::string goal_match_list;
|
||||
TaskMethodType goal_method;
|
||||
int goal_count;
|
||||
int deliver_to_npc;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9180
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9182
|
||||
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9028
|
||||
|
||||
Reference in New Issue
Block a user