[Quest API] Cleanup Proximity Events (#2697)

* [Quest API] Cleanup Proximity Events

# Perl
- Add `$area_id` export to EVENT_ENTER_AREA.
- Add `$area_type` export to EVENT_ENTER_AREA.
- Add `$area_id` export to EVENT_LEAVE_AREA.
- Add `$area_type` export to EVENT_LEAVE_AREA.

# Notes
- This is so Spire will parse these events properly.

* Update entity.cpp

* Update entity.cpp

* Update entity.cpp

* Update entity.cpp
This commit is contained in:
Alex King
2023-01-01 19:07:14 -05:00
committed by GitHub
parent 039d4f09e3
commit 3e4231c662
2 changed files with 44 additions and 8 deletions
+9
View File
@@ -2004,6 +2004,15 @@ void PerlembParser::ExportEventVariables(
break;
}
case EVENT_ENTER_AREA:
case EVENT_LEAVE_AREA: {
if (extra_pointers && extra_pointers->size() >= 2) {
ExportVar(package_name.c_str(), "area_id", *std::any_cast<int*>(extra_pointers->at(0)));
ExportVar(package_name.c_str(), "area_type", *std::any_cast<int*>(extra_pointers->at(1)));
}
break;
}
default: {
break;
}