mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-02 23:40:26 +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:
@@ -657,6 +657,30 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
}
|
||||
}
|
||||
|
||||
if (parse->ZoneHasQuestSub(EVENT_PLAYER_PICKUP)) {
|
||||
std::vector<std::any> args = { m_inst, sender };
|
||||
|
||||
if (parse->EventZone(EVENT_PLAYER_PICKUP, zone, std::to_string(item->ID), GetID(), &args)) {
|
||||
auto outapp = new EQApplicationPacket(OP_ClickObject, sizeof(ClickObject_Struct));
|
||||
|
||||
memcpy(outapp->pBuffer, click_object, sizeof(ClickObject_Struct));
|
||||
|
||||
auto co = (ClickObject_Struct*) outapp->pBuffer;
|
||||
|
||||
co->drop_id = 0;
|
||||
|
||||
entity_list.QueueClients(nullptr, outapp, false);
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
sender->SetTradeskillObject(nullptr);
|
||||
|
||||
user = nullptr;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Transfer item to client
|
||||
sender->PutItemInInventory(EQ::invslot::slotCursor, *m_inst, false);
|
||||
sender->SendItemPacket(EQ::invslot::slotCursor, m_inst, ItemPacketTrade);
|
||||
|
||||
Reference in New Issue
Block a user