TmpMenu/BigBaseV2/src/hooks/network_player_mgr_shutdown.cpp
Yimura a2f459fad9 feat(Logging): Added settings to toggle them (#126)
* feat(Settings): Added notification settings
2022-03-21 18:10:18 +01:00

17 lines
630 B
C++

#include "hooking.hpp"
#include "services/player_service.hpp"
namespace big
{
void hooks::network_player_mgr_shutdown(CNetworkPlayerMgr* _this)
{
g_player_service->do_cleanup();
if (g->notifications.network_player_mgr_shutdown.log)
LOG(INFO) << "CNetworkPlayerMgr#shutdown got called, we're probably leaving our session.";
if (g->notifications.network_player_mgr_shutdown.notify)
g_notification_service->push("Network Player Manager", "Leaving session and cleaning up player data.");
return g_hooking->m_network_player_mgr_shutdown_hook.get_original<decltype(&hooks::network_player_mgr_shutdown)>()(_this);
}
}