[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
+2 -3
View File
@@ -138,11 +138,10 @@ void NPC::ResumeWandering()
if (m_CurrentWayPoint.x == GetX() && m_CurrentWayPoint.y == GetY())
{ // are we we at a waypoint? if so, trigger event and start to next
char temp[100];
itoa(cur_wp, temp, 10); //do this before updating to next waypoint
std::string buf = fmt::format("{}", cur_wp);
CalculateNewWaypoint();
SetAppearance(eaStanding, false);
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, nullptr, temp, 0);
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, nullptr, buf.c_str(), 0);
} // if not currently at a waypoint, we continue on to the one we were headed to before the stop
}
else