[Quest API] Add EVENT_LOOT_ZONE to zone_controller (#1608)

* Add EVENT_LOOT_ZONE to zone_controller

* Fix porting event_loot_zone to lua API

* Remove extra spacing and remove forced message to allow for scripted responses.

* Allow all script parsing to fire before sending a failed lootitem, add corpse_id

* Only search for zone_controller once
This commit is contained in:
Natedog2012
2021-10-16 23:19:19 -05:00
committed by GitHub
parent 11c335a015
commit 7823ff5336
7 changed files with 57 additions and 20 deletions
+3 -1
View File
@@ -135,7 +135,8 @@ const char *LuaEvents[_LargestEventID] = {
"event_test_buff",
"event_combine",
"event_consider",
"event_consider_corpse"
"event_consider_corpse",
"event_loot_zone"
};
extern Zone *zone;
@@ -185,6 +186,7 @@ LuaParser::LuaParser() {
NPCArgumentDispatch[EVENT_FEIGN_DEATH] = handle_npc_single_client;
NPCArgumentDispatch[EVENT_ENTER_AREA] = handle_npc_area;
NPCArgumentDispatch[EVENT_LEAVE_AREA] = handle_npc_area;
NPCArgumentDispatch[EVENT_LOOT_ZONE] = handle_npc_loot_zone;
PlayerArgumentDispatch[EVENT_SAY] = handle_player_say;
PlayerArgumentDispatch[EVENT_ENVIRONMENTAL_DAMAGE] = handle_player_environmental_damage;