Compare commits

..

1 Commits

2 changed files with 16 additions and 10 deletions
+7 -4
View File
@@ -1,4 +1,6 @@
#include "Global.h"
#include "ll/api/service/Bedrock.h"
#include "ll/api/utils/ErrorUtils.h"
using namespace ll::hash_utils;
class EventManager {
@@ -26,6 +28,7 @@ public:
bool removeListener(ullong id) {
if (ll::event::EventBus::getInstance().removeListener(mEventIds[id])) {
ll::mod::NativeMod::current()->getLogger().warn("Removed listener with id {}", id);
mEventIds[id] = nullptr;
return true;
}
@@ -296,7 +299,7 @@ void Export_Event_API() {
bool isCancelled
),
(
(Player*)&event.self(),
&event.self(),
magic_enum::enum_name(requestAction.mActionType).data(),
(int)requestAction.mAmount,
magic_enum::enum_name(requestAction.mSrc->mFullContainerName.mName).data(),
@@ -324,7 +327,7 @@ void Export_Event_API() {
int destinationSlot
),
(
(Player*)&event.self(),
&event.self(),
magic_enum::enum_name(requestAction.mActionType).data(),
(int)requestAction.mAmount,
magic_enum::enum_name(requestAction.mSrc->mFullContainerName.mName).data(),
@@ -341,8 +344,8 @@ void Export_Event_API() {
REGISTER_EVENT_LISTEN(
GMLIB::Event::PacketEvent::ContainerClosePacketSendAfterEvent,
(Player * player, int containerId, bool serverInitiatedClose, bool),
(event.getServerNetworkHandler()
._getServerPlayer(event.getNetworkIdentifier(), event.getPacket().mClientSubId),
(ll::service::getServerNetworkHandler()
->_getServerPlayer(event.getNetworkIdentifier(), event.getPacket().mClientSubId),
(int)event.getPacket().mContainerId,
event.getPacket().mServerInitiatedClose,
false),
+9 -6
View File
@@ -7,10 +7,10 @@ if not has_config("vs_runtime") then
set_runtimes("MD")
end
add_requires("levilamina", {configs = {target_type = "server"}})
add_requires("legacyremotecall")
add_requires("gmlib")
add_requires("levibuildscript")
add_requires("levilamina 1.0.0-rc.3", {configs = {target_type = "server"}})
add_requires("legacyremotecall 0.9.0-rc.1")
add_requires("gmlib 0.13.10")
add_requires("levibuildscript 0.3.0")
target("GMLIB-LegacyRemoteCallApi")
add_cxflags(
@@ -19,7 +19,10 @@ target("GMLIB-LegacyRemoteCallApi")
)
add_defines(
"NOMINMAX",
"UNICODE"
"UNICODE",
"_HAS_CXX17",
"_HAS_CXX20",
"_HAS_CXX23"
)
add_files(
"src/**.cpp"
@@ -35,7 +38,7 @@ target("GMLIB-LegacyRemoteCallApi")
add_rules("@levibuildscript/linkrule")
set_exceptions("none")
set_kind("shared")
set_languages("c++23")
set_languages("cxx20")
set_symbols("debug")
after_build(function (target)