From ed64c82a2f4949546e5f152e2bdd1fbf495ef200 Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Wed, 27 Jul 2022 09:53:38 -0400 Subject: [PATCH] [Quest API] Allow scripts to prevent door click (#2327) Returning non-zero from EVENT_CLICK_DOOR will prevent the default handler. This should have been implemented when expeditions were put in to allow scripts to prevent zoning out of vxed and tipt without flags. Some upcoming changes may need this to allow scripts to prevent automatic dz entry. --- zone/client_packet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index a259ff6e0..1dc709002 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4238,10 +4238,10 @@ void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app) std::string export_string = fmt::format("{}", cd->doorid); std::vector args; args.push_back(currentdoor); - parse->EventPlayer(EVENT_CLICK_DOOR, this, export_string, 0, &args); - - currentdoor->HandleClick(this, 0); - return; + if (parse->EventPlayer(EVENT_CLICK_DOOR, this, export_string, 0, &args) == 0) + { + currentdoor->HandleClick(this, 0); + } } void Client::Handle_OP_ClickObject(const EQApplicationPacket *app)