[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
@@ -202,10 +202,8 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
return;
}
char buf[10];
snprintf(buf, 9, "%d", target_zone_id);
buf[9] = '\0';
parse->EventPlayer(EVENT_ZONE, this, buf, 0);
std::string export_string = fmt::format("{}", target_zone_id);
parse->EventPlayer(EVENT_ZONE, this, export_string, 0);
//handle circumvention of zone restrictions
//we need the value when creating the outgoing packet as well.