feat(Hook): Added logging to script event handler
This commit is contained in:
parent
6bd6466cbd
commit
939da8769d
@ -1,9 +1,17 @@
|
||||
#include "hooking.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
bool hooks::script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer)
|
||||
{
|
||||
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);
|
||||
|
||||
return g_hooking->m_script_event_hook.get_original<decltype(&script_event_handler)>()(NetEventStruct, CNetGamePlayer);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user