mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] (Performance) Check event EVENT_WAYPOINT_ARRIVE or EVENT_WAYPOINT_DEPART exist before export and execute (#2905)
* [Quest API] Optionally parse EVENT_WAYPOINT_ARRIVE and EVENT_WAYPOINT_DEPART
# Notes
- Optionally parse these events instead of always doing so.
* [Quest API] Optionally parse EVENT_WARP
# Notes
- Optionally parse this event instead of always doing so.
* Revert "[Quest API] Optionally parse EVENT_WARP"
This reverts commit d8acb9883d.
This commit is contained in:
+4
-2
@@ -165,10 +165,12 @@ 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
|
||||
std::string export_string = fmt::format("{}", cur_wp);
|
||||
CalculateNewWaypoint();
|
||||
SetAppearance(eaStanding, false);
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, nullptr, export_string, 0);
|
||||
|
||||
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_WAYPOINT_DEPART)) {
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, nullptr, std::to_string(cur_wp), 0);
|
||||
}
|
||||
} // if not currently at a waypoint, we continue on to the one we were headed to before the stop
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user