More work on refactor to interfaces
Build / Build (push) Successful in 50s

This commit is contained in:
Deukhoofd committed 2025-06-29 12:03:51 +02:00
1 parent 436d1899e0
commit 1feb27e826
173 files changed
+713 -562

No files matched your search

+5 -3
View File
@@ -889,11 +889,12 @@ public class PokemonImpl : ScriptSource, IPokemon
if (!force)
{
var prevented = false;
this.RunScriptHook(script =>
this.RunScriptHookInterface<IScriptPreventStatBoostChange>(script =>
script.PreventStatBoostChange(this, stat, change, selfInflicted, ref prevented));
if (prevented)
return false;
this.RunScriptHook(script => script.ChangeStatBoostChange(this, stat, selfInflicted, ref change));
this.RunScriptHookInterface<IScriptChangeStatBoostChange>(script =>
script.ChangeStatBoostChange(this, stat, selfInflicted, ref change));
if (change == 0)
return false;
}
@@ -917,7 +918,8 @@ public class PokemonImpl : ScriptSource, IPokemon
}
RecalculateBoostedStats();
this.RunScriptHook(script => script.OnAfterStatBoostChange(this, stat, selfInflicted, change));
this.RunScriptHookInterface<IScriptOnAfterStatBoostChange>(script =>
script.OnAfterStatBoostChange(this, stat, selfInflicted, change));
return true;
}