2020-12-27 19:10:01 +01:00
|
|
|
#include "hooking.hpp"
|
2020-12-28 01:32:22 +01:00
|
|
|
#include "natives.hpp"
|
2020-12-27 19:10:01 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
bool hooks::script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer)
|
|
|
|
{
|
2020-12-28 01:32:22 +01:00
|
|
|
auto args = reinterpret_cast<std::int64_t*>(NetEventStruct + 0x70);
|
|
|
|
Player SenderID = *reinterpret_cast<std::int8_t*>(CNetGamePlayer + 0x2D);
|
|
|
|
|
|
|
|
const auto ScriptEventHash = args[0];
|
|
|
|
|
|
|
|
LOG(INFO) << "Received Script Event " << ScriptEventHash << " from Player " << PLAYER::GET_PLAYER_NAME(SenderID);
|
|
|
|
|
2020-12-27 19:10:01 +01:00
|
|
|
return g_hooking->m_script_event_hook.get_original<decltype(&script_event_handler)>()(NetEventStruct, CNetGamePlayer);
|
|
|
|
}
|
|
|
|
}
|