Implement inventory functions.

Fix CI build.
merge-requests/25/head
Mr_Goldberg 2019-12-04 08:44:14 -05:00
parent 233835c576
commit 949a327b8a
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
2 changed files with 8 additions and 2 deletions

View File

@ -72,6 +72,7 @@ build_windows:
- DLL_FILES="$(ls dll/*.cpp | tr "\n" " ")"; sed "s|dll/\*.cpp|$DLL_FILES|g" -i *.bat
- DLL_FILES="$(ls detours/*.cpp | tr "\n" " ")"; sed "s|detours/\*.cpp|$DLL_FILES|g" -i *.bat
- DLL_FILES="$(ls dll/*.proto | tr "\n" " " | sed "s/.proto/.pb.cc/g")"; sed "s|dll/\*.cc|$DLL_FILES|g" -i *.bat
- DLL_FILES="$(ls steamclient_loader/*.cpp | tr "\n" " ")"; sed "s|steamclient_loader/\*.cpp|$DLL_FILES|g" -i *.bat
- export WINEDEBUG=-all
- wine cmd /c build_win_debug_experimental.bat
- wine cmd /c build_win_release.bat

View File

@ -757,7 +757,10 @@ STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t )
SteamAPICall_t RequestPrices()
{
PRINT_DEBUG("RequestPrices\n");
return 0;
SteamInventoryRequestPricesResult_t data;
data.m_result = k_EResultOK;
memcpy(data.m_rgchCurrency, "USD", 4);
return callback_results->addCallResult(data.k_iCallback, &data, sizeof(data), 0.2);
}
@ -765,6 +768,7 @@ SteamAPICall_t RequestPrices()
uint32 GetNumItemsWithPrices()
{
PRINT_DEBUG("GetNumItemsWithPrices\n");
return 0;
}
bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
@ -773,6 +777,7 @@ bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(
uint32 unArrayLength )
{
PRINT_DEBUG("GetItemsWithPrices\n");
return false;
}
// Returns item definition ids and their prices in the user's local currency.
@ -848,7 +853,7 @@ void RunCallbacks()
//only gets called once
//also gets called when getting items
SteamInventoryDefinitionUpdate_t data = {};
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data), 0.05);
}
call_definition_update = false;