mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-02 19:30:25 +00:00
[Feature] Zone Scripting (#4908)
* [Feature] Add Zone Scripting Capabilities * Push * Update zone.cpp * Fix crashes * Lua * Add other events, finish Lua * Add EVENT_ENTER_ZONE * Final * Push * Push * [Feature] Add Zone Scripting Capabilities * Push * Update zone.cpp * Fix crashes * Add EVENT_ENTER_ZONE * Remove duplicates * Update embparser.cpp
This commit is contained in:
@@ -1586,6 +1586,21 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
if (parse->ZoneHasQuestSub(EVENT_LOOT_ZONE)) {
|
||||
const auto &export_string = fmt::format(
|
||||
"{} {} {} {}",
|
||||
inst->GetItem()->ID,
|
||||
inst->GetCharges(),
|
||||
EntityList::RemoveNumbers(corpse_name),
|
||||
GetID()
|
||||
);
|
||||
|
||||
std::vector<std::any> args = {inst, this, c};
|
||||
if (parse->EventZone(EVENT_LOOT_ZONE, zone, export_string, 0, &args) != 0) {
|
||||
prevent_loot = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (inst && PlayerEventLogs::Instance()->IsEventEnabled(PlayerEvent::LOOT_ITEM) && !IsPlayerCorpse()) {
|
||||
auto e = PlayerEvent::LootItemEvent{
|
||||
.item_id = inst->GetItem()->ID,
|
||||
|
||||
Reference in New Issue
Block a user