summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c7
-rw-r--r--src/map/skill.c6
2 files changed, 5 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 7b9a0dd4e..6c2bffeb8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1655,13 +1655,16 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
nullpo_retr(0, sd);
nullpo_retr(0, autobonus);
- if( autobonus->bonus_script )
- run_script(autobonus->bonus_script,0,sd->bl.id,0);
if( autobonus->other_script )
+ {
+ sd->state.autocast = 1;
run_script(autobonus->other_script,0,sd->bl.id,0);
+ sd->state.autocast = 0;
+ }
autobonus->active = add_timer(gettick()+autobonus->duration, pc_endautobonus, sd->bl.id, (intptr)autobonus);
sd->state.autobonus |= autobonus->pos;
+ status_calc_pc(sd,0);
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 6c6bb0cf0..637253834 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1056,9 +1056,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
sd->autobonus[i].atk_type&attack_type&BF_RANGEMASK &&
sd->autobonus[i].atk_type&attack_type&BF_SKILLMASK))
continue; // one or more trigger conditions were not fulfilled
- sd->state.autocast = 1;
pc_exeautobonus(sd,&sd->autobonus[i]);
- sd->state.autocast = 0;
}
}
@@ -1140,9 +1138,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
continue;
if( sd->autobonus3[i].atk_type != skillid )
continue;
- sd->state.autocast = 1;
pc_exeautobonus(sd,&sd->autobonus3[i]);
- sd->state.autocast = 0;
}
}
@@ -1333,9 +1329,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
dstsd->autobonus2[i].atk_type&attack_type&BF_RANGEMASK &&
dstsd->autobonus2[i].atk_type&attack_type&BF_SKILLMASK))
continue; // one or more trigger conditions were not fulfilled
- dstsd->state.autocast = 1;
pc_exeautobonus(dstsd,&dstsd->autobonus2[i]);
- dstsd->state.autocast = 0;
}
}