[Quest API] Further char array cleanup. (#1634)

- Cleans up the rest of the char arrays used when exporting to events.
- Converts all events to use a similar variable name for export `export_string`.
- Needless calls to .c_str() removed.
This commit is contained in:
Kinglykrab
2021-10-24 17:06:22 -04:00
committed by GitHub
parent 624d11de4e
commit c98f3cfb4c
12 changed files with 107 additions and 99 deletions
+2 -4
View File
@@ -97,10 +97,8 @@ void Client::SendTaskActivityComplete(
void Client::SendTaskFailed(int task_id, int task_index, TaskType task_type)
{
// 0x54eb
char buf[24];
snprintf(buf, 23, "%d", task_id);
buf[23] = '\0';
parse->EventPlayer(EVENT_TASK_FAIL, this, buf, 0);
std::string export_string = fmt::format("{}", task_id);
parse->EventPlayer(EVENT_TASK_FAIL, this, export_string, 0);
TaskActivityComplete_Struct *task_activity_complete;