mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-26 22:42:51 -05:00
Implemented ISteamGameServer
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "smoke_api.hpp"
|
||||
#include "smoke_api/interfaces/steam_apps.hpp"
|
||||
#include "steam_api/steam_interface.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "smoke_api.hpp"
|
||||
#include "steam_api/steam_client.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
|
||||
21
src/steam_api/virtuals/isteamgameserver.cpp
Normal file
21
src/steam_api/virtuals/isteamgameserver.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "smoke_api/interfaces/steam_user.hpp"
|
||||
#include "steam_api/steam_interface.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamGameServer_UserHasLicenseForApp(
|
||||
PARAMS(const CSteamID steamID, const AppId_t dlc_id)
|
||||
) {
|
||||
try {
|
||||
return smoke_api::steam_user::UserHasLicenseForApp(
|
||||
__func__,
|
||||
steam_interface::get_app_id(),
|
||||
dlc_id,
|
||||
HOOKED_CALL_CLOSURE(ISteamGameServer_UserHasLicenseForApp, ARGS(steamID, dlc_id))
|
||||
);
|
||||
} catch(const std::exception& e) {
|
||||
LOG_ERROR("{} -> Error: {}", __func__, e.what());
|
||||
return k_EUserHasLicenseResultDoesNotHaveLicense;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "smoke_api.hpp"
|
||||
#include "smoke_api/interfaces/steam_inventory.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
@@ -130,7 +129,7 @@ VIRTUAL(bool) ISteamInventory_GetItemDefinitionIDs(
|
||||
}
|
||||
|
||||
VIRTUAL(bool) ISteamInventory_CheckResultSteamID(
|
||||
PARAMS(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected)
|
||||
PARAMS(const SteamInventoryResult_t resultHandle, CSteamID steamIDExpected)
|
||||
) {
|
||||
return smoke_api::steam_inventory::CheckResultSteamID(
|
||||
__func__,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "smoke_api.hpp"
|
||||
#include "smoke_api/interfaces/steam_user.hpp"
|
||||
#include "steam_api/steam_interface.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
@@ -33,3 +33,8 @@ VIRTUAL(bool) ISteamInventory_CheckResultSteamID(PARAMS(SteamInventoryResult_t,
|
||||
|
||||
// ISteamUser
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamUser_UserHasLicenseForApp(PARAMS(CSteamID, AppId_t));
|
||||
|
||||
// ISteamGameServer
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamGameServer_UserHasLicenseForApp(
|
||||
PARAMS(CSteamID, AppId_t)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user