diff --git a/GWToolboxdll/Modules/PriceCheckerModule.cpp b/GWToolboxdll/Modules/PriceCheckerModule.cpp index 012c64d73..3f0b692c5 100644 --- a/GWToolboxdll/Modules/PriceCheckerModule.cpp +++ b/GWToolboxdll/Modules/PriceCheckerModule.cpp @@ -25,7 +25,6 @@ using nlohmann::json; namespace { - bool fetch_module_prices = true; float high_price_threshold = 1000; std::wstring modified_description; bool fetching_prices; @@ -470,6 +469,7 @@ namespace { { if (!(description_out && *description_out)) return; + const auto item = GW::Items::GetItemById(item_id); if (!item) return; @@ -546,14 +546,12 @@ void PriceCheckerModule::SaveSettings(ToolboxIni* ini) { ToolboxModule::SaveSettings(ini); SAVE_FLOAT(high_price_threshold); - SAVE_BOOL(fetch_module_prices); } void PriceCheckerModule::LoadSettings(ToolboxIni* ini) { ToolboxModule::SaveSettings(ini); LOAD_FLOAT(high_price_threshold); - LOAD_BOOL(fetch_module_prices); } void PriceCheckerModule::RegisterSettingsContent() @@ -566,9 +564,7 @@ void PriceCheckerModule::RegisterSettingsContent() return; } - ImGui::Checkbox("Fetch prices for item components", &fetch_module_prices); - ImGui::ShowHelp("When enabled, the item description will contain information about the components of the item and their respective prices"); - ImGui::SliderFloat("High price threshold", &high_price_threshold, 100, 50000); + ImGui::SliderFloat("Price Checker high price threshold", &high_price_threshold, 100, 50000); }, 0.9f ); diff --git a/GWToolboxdll/Modules/SalvageInfoModule.cpp b/GWToolboxdll/Modules/SalvageInfoModule.cpp index 290dd11b5..8333c0c4b 100644 --- a/GWToolboxdll/Modules/SalvageInfoModule.cpp +++ b/GWToolboxdll/Modules/SalvageInfoModule.cpp @@ -71,9 +71,6 @@ namespace GW { } namespace { - - bool fetch_salvage_info = true; - struct CraftingMaterial { uint32_t model_id; // Used to map to kamadan trade chat GuiUtils::EncString en_name; // Used to map to Guild Wars Wiki @@ -376,9 +373,7 @@ namespace { { GW::Hook::EnterHook(); GetItemDescription_Ret(item_id, flags, quantity, unk, name_out, description_out); - if (fetch_salvage_info && description_out && *description_out) { - AppendSalvageInfoDescription(item_id, description_out); - } + AppendSalvageInfoDescription(item_id, description_out); GW::Hook::LeaveHook(); } @@ -456,28 +451,13 @@ void SalvageInfoModule::Update(const float) void SalvageInfoModule::SaveSettings(ToolboxIni* ini) { ToolboxModule::SaveSettings(ini); - SAVE_BOOL(fetch_salvage_info); } void SalvageInfoModule::LoadSettings(ToolboxIni* ini) { ToolboxModule::SaveSettings(ini); - LOAD_BOOL(fetch_salvage_info); } void SalvageInfoModule::RegisterSettingsContent() { - //ToolboxModule::RegisterSettingsContent(); - ToolboxModule::RegisterSettingsContent( - "Inventory Settings", ICON_FA_BOXES, - [this](const std::string&, const bool is_showing) { - if (!is_showing) { - return; - } - - ImGui::Checkbox("Fetch salvage information for items", &fetch_salvage_info); - ImGui::ShowHelp("When enabled, the item description will contain information about the crafting materials that can be salvaged from the item"); - }, - 0.9f - ); }