[Quest API] Convert all char arrays to strings. (#1612)

* [Quest API] Convert all char arrays to strings.
Also change multiple loops for zone controller to one loop.

* Remove 'this' keyword'
This commit is contained in:
Kinglykrab
2021-10-20 15:59:28 -04:00
committed by GitHub
parent efab0c4b6b
commit edf298685e
7 changed files with 41 additions and 63 deletions
+3 -4
View File
@@ -11164,14 +11164,13 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app)
break;
}
char buf[16];
sprintf(buf, "%d", popup_response->popupid);
std::string buf = fmt::format("{}", popup_response->popupid);
parse->EventPlayer(EVENT_POPUP_RESPONSE, this, buf, 0);
parse->EventPlayer(EVENT_POPUP_RESPONSE, this, buf.c_str(), 0);
Mob *Target = GetTarget();
if (Target && Target->IsNPC()) {
parse->EventNPC(EVENT_POPUP_RESPONSE, Target->CastToNPC(), this, buf, 0);
parse->EventNPC(EVENT_POPUP_RESPONSE, Target->CastToNPC(), this, buf.c_str(), 0);
}
}