summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a414de4ca..b5e00fe55 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6594,7 +6594,7 @@ BUILDIN_FUNC(bonusautoscript)
script = parse_script(str, "autoscript bonus", 0, 0);
if( !script )
return 1;
- if( !pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, target, script, false) )
+ if( sd->state.autocast || !pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, target, script, false) )
{
script_free_code(script);
return 1;
@@ -6622,7 +6622,7 @@ BUILDIN_FUNC(bonusautoscript2)
script = parse_script(str, "autoscript2 bonus", 0, 0);
if (!script)
return 1;
- if (!pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, target, script, false))
+ if( sd->state.autocast || !pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, target, script, false) )
{
script_free_code(script);
return 1;
@@ -6649,7 +6649,7 @@ BUILDIN_FUNC(bonusautoscript3)
script = parse_script(str, "autoscript3 bonus", 0, 0);
if( !script )
return 1;
- if( !pc_autoscript_add(sd->autoscript3, ARRAYLENGTH(sd->autoscript3), rate, skill, target, script, true) )
+ if( sd->state.autocast || !pc_autoscript_add(sd->autoscript3, ARRAYLENGTH(sd->autoscript3), rate, skill, target, script, true) )
{
script_free_code(script);
return 1;