mirror of https://github.com/acidicoala/SmokeAPI
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
727 B
C++
22 lines
727 B
C++
#include <game_mode/virtuals/steam_api_virtuals.hpp>
|
|
#include <steam_impl/steam_user.hpp>
|
|
#include <steam_impl/steam_impl.hpp>
|
|
#include <koalabox/logger.hpp>
|
|
|
|
VIRTUAL(EUserHasLicenseForAppResult) ISteamUser_UserHasLicenseForApp(PARAMS(CSteamID steamID, AppId_t dlcID)) {
|
|
AppId_t app_id = 0;
|
|
try {
|
|
app_id = steam_impl::get_app_id_or_throw();
|
|
} catch (const Exception& e) {
|
|
LOG_ERROR("{} -> Error getting app id: {}", __func__, e.what())
|
|
}
|
|
|
|
return steam_user::UserHasLicenseForApp(
|
|
__func__, app_id, dlcID, [&]() {
|
|
GET_ORIGINAL_HOOKED_FUNCTION(ISteamUser_UserHasLicenseForApp)
|
|
|
|
return ISteamUser_UserHasLicenseForApp_o(ARGS(steamID, dlcID));
|
|
}
|
|
);
|
|
}
|