mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[Quest API] Add Lua handlers for zone controller events (#2514)
This cleans up some of the NPC::Death event dispatch code. Adds handlers for EVENT_SPAWN_ZONE and EVENT_DEATH_ZONE used by zone controller and fixes the death handler exports which were incorrect.
This commit is contained in:
@@ -3764,3 +3764,18 @@ int NPC::GetRolledItemCount(uint32 item_id)
|
||||
|
||||
return rolled_count;
|
||||
}
|
||||
|
||||
int NPC::DispatchZoneControllerEvent(QuestEventID evt, Mob* init,
|
||||
const std::string& data, uint32 extra, std::vector<std::any>* pointers)
|
||||
{
|
||||
int ret = 0;
|
||||
if (RuleB(Zone, UseZoneController) && GetNPCTypeID() != ZONE_CONTROLLER_NPC_ID)
|
||||
{
|
||||
auto controller = entity_list.GetNPCByNPCTypeID(ZONE_CONTROLLER_NPC_ID);
|
||||
if (controller)
|
||||
{
|
||||
ret = parse->EventNPC(evt, controller, init, data, extra, pointers);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user