[Quest API] Export $item to Client/Bot Equip Events in Perl (#2860)

* [Quest API] Add $item Export to Client/Bot Equip Events

# Notes
- Adds `$item` export to `EVENT_ITEM_EQUIP_CLIENT`, `EVENT_ITEM_UNEQUIP_CLIENT`, `EVENT_ITEM_EQUIP_BOT`, and `EVENT_UNEQUIP_ITEM_BOT`.

* Update bot.cpp

* Update embparser.cpp
This commit is contained in:
Alex King
2023-02-10 23:56:36 -05:00
committed by GitHub
parent a1251bdda8
commit a3bb7e7741
4 changed files with 32 additions and 5 deletions
+10 -2
View File
@@ -5080,7 +5080,11 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
return_iterator.from_bot_slot
);
parse->EventBot(EVENT_UNEQUIP_ITEM_BOT, this, nullptr, export_string , return_iterator.return_item_instance->GetID());
std::vector<std::any> args;
args.emplace_back(return_iterator.return_item_instance);
parse->EventBot(EVENT_UNEQUIP_ITEM_BOT, this, nullptr, export_string , return_iterator.return_item_instance->GetID(), &args);
if (return_instance) {
EQ::SayLinkEngine linker;
linker.SetLinkType(EQ::saylink::SayLinkItemInst);
@@ -5136,7 +5140,11 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
trade_iterator.to_bot_slot
);
parse->EventBot(EVENT_EQUIP_ITEM_BOT, this, nullptr, export_string , trade_iterator.trade_item_instance->GetID());
std::vector<std::any> args;
args.emplace_back(trade_iterator.trade_item_instance);
parse->EventBot(EVENT_EQUIP_ITEM_BOT, this, nullptr, export_string, trade_iterator.trade_item_instance->GetID(), &args);
trade_iterator.trade_item_instance = nullptr; // actual deletion occurs in client delete below