mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-27 23:12:51 -05:00
Refactored DLC unlocking logic
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
|
||||
using namespace smoke_api;
|
||||
|
||||
VIRTUAL(bool) IClientAppManager_IsAppDlcInstalled(
|
||||
PARAMS( // NOLINT(misc-unused-parameters)
|
||||
AppId_t app_id,
|
||||
AppId_t dlc_id
|
||||
)
|
||||
) {
|
||||
return steam_apps::IsDlcUnlocked(__func__, app_id, dlc_id);
|
||||
VIRTUAL(bool) IClientAppManager_IsAppDlcInstalled(PARAMS(AppId_t app_id, AppId_t dlc_id)) {
|
||||
return steam_apps::IsDlcUnlocked(__func__, app_id, dlc_id, [&]() {
|
||||
GET_ORIGINAL_VIRTUAL_FUNCTION(IClientAppManager_IsAppDlcInstalled)
|
||||
|
||||
return IClientAppManager_IsAppDlcInstalled_o(ARGS(app_id, dlc_id));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
using namespace smoke_api;
|
||||
|
||||
VIRTUAL(bool) IClientUser_BIsSubscribedApp(PARAMS(AppId_t app_id)) { // NOLINT(misc-unused-parameters)
|
||||
return steam_apps::IsDlcUnlocked(__func__, 0, app_id);
|
||||
VIRTUAL(bool) IClientUser_BIsSubscribedApp(PARAMS(AppId_t app_id)) {
|
||||
return steam_apps::IsDlcUnlocked(__func__, 0, app_id, [&]() {
|
||||
GET_ORIGINAL_VIRTUAL_FUNCTION(IClientUser_BIsSubscribedApp)
|
||||
|
||||
return IClientUser_BIsSubscribedApp_o(ARGS(app_id));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user