[Quest API] Add Client Augment Events to Perl/Lua. (#2735)

* [Quest API] Add Client Augment Events to Perl/Lua.

# Perl
- Add `EVENT_AUGMENT_INSERT_CLIENT`.
- Add `EVENT_AUGMENT_REMOVE_CLIENT`.

# Lua
- Add `event_augment_insert_client`.
- Add `event_augment_remove_client`.

# Notes
- Allows operators to use augment insert and augment remove events outside of an item script.
This commit is contained in:
Alex King
2023-01-14 23:23:48 -05:00
committed by GitHub
parent c41f375129
commit a422484307
8 changed files with 178 additions and 3 deletions
+12
View File
@@ -140,6 +140,18 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
args.assign(1, tobe_auged);
parse->EventItem(EVENT_AUGMENT_INSERT, user, aug, nullptr, "", slot, &args);
args.push_back(aug);
const auto export_string = fmt::format(
"{} {} {} {}",
tobe_auged->GetID(),
-1,
aug->GetID(),
slot
);
parse->EventPlayer(EVENT_AUGMENT_INSERT_CLIENT, user, export_string, 0, &args);
}
item_one_to_push = tobe_auged->Clone();