This commit is contained in:
@@ -774,7 +774,7 @@ public abstract class Script : IDeepCloneable
|
||||
/// <summary>
|
||||
/// This function allows a script to prevent a Pokémon from being affected by a volatile status condition.
|
||||
/// </summary>
|
||||
public virtual void PreventVolatileAdd(Script script, ref bool preventVolatileAdd)
|
||||
public virtual void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public interface IScriptSet : IEnumerable<ScriptContainer>
|
||||
/// <inheritdoc cref="IScriptSet"/>
|
||||
public class ScriptSet : IScriptSet
|
||||
{
|
||||
private IScriptSource _source;
|
||||
private readonly IScriptSource _source;
|
||||
|
||||
private readonly List<ScriptContainer> _scripts = [];
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ScriptSet : IScriptSet
|
||||
if (!forceAdd)
|
||||
{
|
||||
var preventVolatileAdd = false;
|
||||
_source.RunScriptHook(x => x.PreventVolatileAdd(script, ref preventVolatileAdd));
|
||||
_source.RunScriptHook(x => x.PreventVolatileAdd(_source, script, ref preventVolatileAdd));
|
||||
if (preventVolatileAdd)
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user