From 6fd413db8a06d2d5b92e2ad43cc64851384ddb5f Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Tue, 29 Nov 2022 08:07:29 +0100 Subject: [PATCH] Small formatting fixes --- src/client/component/loot.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/client/component/loot.cpp b/src/client/component/loot.cpp index 49cd010f..773b0c93 100644 --- a/src/client/component/loot.cpp +++ b/src/client/component/loot.cpp @@ -2,9 +2,8 @@ #include "loader/component_loader.hpp" #include -#include -#include +#include "scheduler.hpp" #include "game/game.hpp" namespace loot @@ -15,25 +14,28 @@ namespace loot utils::hook::detour liveinventory_getitemquantity_hook; utils::hook::detour liveinventory_areextraslotspurchased_hook; - int loot_getitemquantity_stub(const game::ControllerIndex_t controllerIndex, const game::eModes mode, const int itemId) + int loot_getitemquantity_stub(const game::ControllerIndex_t /*controller_index*/, const game::eModes mode, const int /*item_id*/) { - if (mode == game::eModes::MODE_ZOMBIES) { + if (mode == game::eModes::MODE_ZOMBIES) + { return 999; } + return 1; } - int liveinventory_getitemquantity_stub(const game::ControllerIndex_t controllerIndex, const int itemId) + int liveinventory_getitemquantity_stub(const game::ControllerIndex_t controller_index, const int item_id) { // Item id's for extra CaC slots, CWL camo's and paid specialist outfits - if (itemId == 99003 || itemId >= 99018 && itemId <= 99021 || itemId == 99025 || itemId >= 90047 && itemId <= 90064) { + if (item_id == 99003 || item_id >= 99018 && item_id <= 99021 || item_id == 99025 || item_id >= 90047 && item_id <= 90064) + { return 1; } - return liveinventory_getitemquantity_hook.invoke(controllerIndex, itemId); + return liveinventory_getitemquantity_hook.invoke(controller_index, item_id); } - bool liveinventory_areextraslotspurchased_stub(const game::ControllerIndex_t controllerIndex) + bool liveinventory_areextraslotspurchased_stub(const game::ControllerIndex_t /*controller_index*/) { return true; } @@ -58,5 +60,4 @@ namespace loot }; }; - -REGISTER_COMPONENT(loot::component) \ No newline at end of file +REGISTER_COMPONENT(loot::component)