[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
@@ -2248,7 +2248,11 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
dst_slot_id
);
parse->EventPlayer(EVENT_UNEQUIP_ITEM_CLIENT, this, export_string, dst_inst->GetItem()->ID);
std::vector<std::any> args;
args.emplace_back(dst_inst);
parse->EventPlayer(EVENT_UNEQUIP_ITEM_CLIENT, this, export_string, dst_inst->GetItem()->ID, &args);
}
if(src_inst) {
@@ -2260,7 +2264,11 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
dst_slot_id
);
parse->EventPlayer(EVENT_EQUIP_ITEM_CLIENT, this, export_string, src_inst->GetItem()->ID);
std::vector<std::any> args;
args.emplace_back(src_inst);
parse->EventPlayer(EVENT_EQUIP_ITEM_CLIENT, this, export_string, src_inst->GetItem()->ID, &args);
}
}
}