Skip to content

Commit

Permalink
Fix double reloading on addStatModifier (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSzabo committed May 31, 2024
1 parent 08f5d27 commit 2269daa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ private <T extends AuraSkillsModifier<V>, V> void addModifier(T modifier, boolea
if (oldModifier.type() == modifier.type() && oldModifier.value() == modifier.value()) {
return;
}
removeModifier(modifier.name(), reload, map, levels);
// Do not reload on remove since that would reset health and other stuff (mainly for 3rd party plugins)
// Reload will happen at the end of this method if it was true either way.
// So here we are just preventing double stat reload.
removeModifier(modifier.name(), false, map, levels);
}
map.put(modifier.name(), modifier);
if (levels != null) {
Expand Down

0 comments on commit 2269daa

Please sign in to comment.