mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[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:
+10
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user