[Quest API] Add EVENT_DESTROY_ITEM_CLIENT to Perl/Lua. (#2871)

* [Quest API] Add EVENT_DESTROY_ITEM_CLIENT to Perl/Lua.

- Add `EVENT_DESTROY_ITEM_CLIENT`, exports `$item_id`, `$item_name`, `$quantity`, and `$item`.

- Add `event_destroy_item_client`, exports `e.item_id`, `e.item_name`, `e.quantity`, and `e.item`.

- Allows operators to use player scripts for item destroys.

* Update lua_parser_events.h

* Update inventory.cpp
This commit is contained in:
Alex King
2023-02-13 00:58:27 -05:00
committed by GitHub
parent 24de1d948a
commit d4afc78982
7 changed files with 83 additions and 6 deletions
+2 -1
View File
@@ -4750,7 +4750,8 @@ luabind::scope lua_register_events() {
luabind::value("damage_given", static_cast<int>(EVENT_DAMAGE_GIVEN)),
luabind::value("damage_taken", static_cast<int>(EVENT_DAMAGE_TAKEN)),
luabind::value("item_click_client", static_cast<int>(EVENT_ITEM_CLICK_CLIENT)),
luabind::value("item_click_cast_client", static_cast<int>(EVENT_ITEM_CLICK_CAST_CLIENT))
luabind::value("item_click_cast_client", static_cast<int>(EVENT_ITEM_CLICK_CAST_CLIENT)),
luabind::value("destroy_item_client", static_cast<int>(EVENT_DESTROY_ITEM_CLIENT))
)];
}