From 7a0e3d80190f6e6db7ffd67559b0dd81e7aaee98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=B2=90=E5=91=80?= <163636894+zimuya4153@users.noreply.github.com> Date: Sun, 21 Jul 2024 18:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHandleRequestAction=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/EventAPI-JS.d.ts | 2 +- src/EventAPI.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/EventAPI-JS.d.ts b/lib/EventAPI-JS.d.ts index 735e00e..3fe4da5 100644 --- a/lib/EventAPI-JS.d.ts +++ b/lib/EventAPI-JS.d.ts @@ -234,4 +234,4 @@ declare class Event { containerId: number ) => void ): boolean; -} +} \ No newline at end of file diff --git a/src/EventAPI.cpp b/src/EventAPI.cpp index 6f7d2f2..a0bbbaf 100644 --- a/src/EventAPI.cpp +++ b/src/EventAPI.cpp @@ -266,7 +266,7 @@ void Export_Event_API() { } case doHash("HandleRequestAction"): { auto Call = RemoteCall::importAs< - bool(Player * player, std::string const& actionType, std::string const& ContainerNetId, int slot)>( + bool(Player * player, std::string const& actionType, int ContainerNetId, int slot)>( eventName, eventId ); @@ -278,7 +278,7 @@ void Export_Event_API() { result = Call( &ev.self(), magic_enum::enum_name(requestAction->mActionType).data(), - magic_enum::enum_name(requestAction->getSrc().mOpenContainerNetId).data(), + (int)requestAction->getSrc().mOpenContainerNetId, requestAction->getSrc().mSlot ); } catch (...) {}