From 86b178f55bd3e7ac48e7705d6605c86c3849899d Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Sun, 1 Sep 2019 21:32:48 +0200 Subject: [PATCH] Fixed definition update not being called Should update definition when inventory is requested and definition is not loaded --- dll/steam_inventory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/steam_inventory.h b/dll/steam_inventory.h index bdde870..acc6319 100644 --- a/dll/steam_inventory.h +++ b/dll/steam_inventory.h @@ -847,9 +847,9 @@ bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventory void RunCallbacks() { - if (call_definition_update) { - read_items_db(); + if (call_definition_update && !definition_update_called) { definition_update_called = true; + read_items_db(); SteamInventoryDefinitionUpdate_t data = {}; callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); @@ -860,6 +860,7 @@ void RunCallbacks() read_inventory_db(); inventory_loaded = true; + call_definition_update = true; call_inventory_update = false; }