mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Quest API] (Performance) Check equip or scale item events exist before export and execute (#2898)
* [Quest API] Optional parse equip and scale item events # Notes - Optionally parse `EVENT_SCALE_CALC`, `EVENT_ITEM_ENTER_ZONE`, `EVENT_UNEQUIP_ITEM_BOT`, `EVENT_EQUIP_ITEM_BOT`, `EVENT_EQUIP_ITEM`, `EVENT_UNEQUIP_ITEM`, `EVENT_EQUIP_ITEM_CLIENT`, `EVENT_UNEQUIP_ITEM_CLIENT` * Cleanup
This commit is contained in:
@@ -9405,17 +9405,17 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
|
||||
)
|
||||
);
|
||||
|
||||
const auto export_string = fmt::format(
|
||||
"{} {}",
|
||||
inst->IsStackable() ? inst->GetCharges() : 1,
|
||||
slot_id
|
||||
);
|
||||
if (parse->BotHasQuestSub(EVENT_UNEQUIP_ITEM_BOT)) {
|
||||
const auto& export_string = fmt::format(
|
||||
"{} {}",
|
||||
inst->IsStackable() ? inst->GetCharges() : 1,
|
||||
slot_id
|
||||
);
|
||||
|
||||
std::vector<std::any> args;
|
||||
std::vector<std::any> args = { inst };
|
||||
|
||||
args.emplace_back(inst);
|
||||
|
||||
parse->EventBot(EVENT_UNEQUIP_ITEM_BOT, my_bot, nullptr, export_string, inst->GetID(), &args);
|
||||
parse->EventBot(EVENT_UNEQUIP_ITEM_BOT, my_bot, nullptr, export_string, inst->GetID(), &args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user