mirror of
https://github.com/silviu20092/mod-reforging
synced 2025-11-29 16:38:15 +08:00
Don't try to apply item mods when config values were not changed - impacts .reload config command
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user