Don't try to apply item mods when config values were not changed - impacts .reload config command

This commit is contained in:
silviu20092
2025-04-03 23:38:32 +03:00
parent 576191c9b7
commit ce454a37ca

View File

@@ -17,14 +17,15 @@ public:
void OnAfterConfigLoad(bool reload) override
{
if (reload)
bool reforgeEnableChanged = reload && sItemReforge->GetEnabled() != sConfigMgr->GetOption<bool>("Reforging.Enable", true);
if (reforgeEnableChanged)
sItemReforge->HandleReload(false);
sItemReforge->SetEnabled(sConfigMgr->GetOption<bool>("Reforging.Enable", true));
sItemReforge->SetReforgeableStats(sConfigMgr->GetOption<std::string>("Reforging.ReforgeableStats", ItemReforge::DefaultReforgeableStats));
sItemReforge->SetPercentage(sConfigMgr->GetOption<float>("Reforging.Percentage", ItemReforge::PERCENTAGE_DEFAULT));
if (reload)
if (reforgeEnableChanged)
sItemReforge->HandleReload(true);
}