summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-02 12:51:05 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-02 12:51:05 +0000
commit4cd7e3cac14b8d8caccd385b806e286bc18a9340 (patch)
tree18ea70fed482017dd3089b660e4a5b838c18cee2 /src
parent9463bf2e1b9afd636b9b7a69b5511817d3c66337 (diff)
downloadhercules-4cd7e3cac14b8d8caccd385b806e286bc18a9340.tar.gz
hercules-4cd7e3cac14b8d8caccd385b806e286bc18a9340.tar.bz2
hercules-4cd7e3cac14b8d8caccd385b806e286bc18a9340.tar.xz
hercules-4cd7e3cac14b8d8caccd385b806e286bc18a9340.zip
* Updated autobonus [Inkfish]
- added documentation for autobonus. - invoke status_calc_pc to complete autobonus execution and this will refresh client display as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13922 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-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;
}
}