[Quest API] Add EVENT_LOOT_ADDED to Perl/Lua (#3739)

* [Quest API] Add EVENT_ADDED_LOOT to Perl/Lua

# Perl
- Add `EVENT_ADDED_LOOT`.
- Exports `$item`, `$item_id`, `$item_name`, `$item_charges`, `$augment_one`, `$augment_two`, `$augment_three`, `$augment_four`, `$augment_five`, and `$augment_six`.

# Lua
- Add `event_added_loot`.
- Exports `e.item`, `e.item_id`, `e.item_name`, `e.item_charges`, `e.augment_one`, `e.augment_two`, `e.augment_three`, `e.augment_four`, `e.augment_five`, and `e.augment_six`.

# Notes
- Allows operators to perform events when loot is added to an NPC, such as removing the loot or keeping track of it.

* Update lua_parser_events.cpp

* Rename event.

* loot_added

* AddItem changese
This commit is contained in:
Alex King
2023-12-16 23:25:09 -05:00
committed by GitHub
parent 9c238cd08d
commit c1b07afae9
8 changed files with 347 additions and 226 deletions
+2 -1
View File
@@ -6609,7 +6609,8 @@ luabind::scope lua_register_events() {
luabind::value("memorize_spell", static_cast<int>(EVENT_MEMORIZE_SPELL)),
luabind::value("unmemorize_spell", static_cast<int>(EVENT_UNMEMORIZE_SPELL)),
luabind::value("scribe_spell", static_cast<int>(EVENT_SCRIBE_SPELL)),
luabind::value("unscribe_spell", static_cast<int>(EVENT_UNSCRIBE_SPELL))
luabind::value("unscribe_spell", static_cast<int>(EVENT_UNSCRIBE_SPELL)),
luabind::value("loot_added", static_cast<int>(EVENT_LOOT_ADDED))
)];
}