[Quest API] Add EVENT_CONSIDER to Perl and Lua. (#1531)

* [Quest API] Add EVENT_CONSIDER to Perl and Lua.
- Exports $entity_id in Perl.
- Exports e.entity_id in Lua.

Allows you to perform events on consider for server operators.

* Missing comma.

* Formatting.

* Add return capability to EVENT_CONSIDER and EVENT_CONSIDER_CORPSE so operators can break out of consider functions.
This commit is contained in:
Kinglykrab
2021-09-13 15:30:17 -04:00
committed by GitHub
parent 9589bf6bf8
commit 6e76f89ca2
7 changed files with 30 additions and 2 deletions
+2
View File
@@ -133,6 +133,7 @@ const char *LuaEvents[_LargestEventID] = {
"event_bot_command",
"event_warp",
"event_test_buff",
"event_consider",
"event_consider_corpse"
};
@@ -221,6 +222,7 @@ LuaParser::LuaParser() {
PlayerArgumentDispatch[EVENT_COMBINE_VALIDATE] = handle_player_combine_validate;
PlayerArgumentDispatch[EVENT_BOT_COMMAND] = handle_player_bot_command;
PlayerArgumentDispatch[EVENT_WARP] = handle_player_warp;
PlayerArgumentDispatch[EVENT_CONSIDER] = handle_player_consider;
PlayerArgumentDispatch[EVENT_CONSIDER_CORPSE] = handle_player_consider_corpse;
ItemArgumentDispatch[EVENT_ITEM_CLICK] = handle_item_click;