diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-07 15:29:24 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-07 15:29:24 +0000 |
commit | 752030de0bf089cb360cd8ccffeb7db278e2504c (patch) | |
tree | 8d1a85d9ad7b7a8b4f4bdc109e1046da7143b75d /src/map/script.c | |
parent | 5ced9134785c9c5c540eb484c893fe17a4a5bf3f (diff) | |
download | hercules-752030de0bf089cb360cd8ccffeb7db278e2504c.tar.gz hercules-752030de0bf089cb360cd8ccffeb7db278e2504c.tar.bz2 hercules-752030de0bf089cb360cd8ccffeb7db278e2504c.tar.xz hercules-752030de0bf089cb360cd8ccffeb7db278e2504c.zip |
Added a flag to indicate if the script of an autobonus was parsed for the sake of resource saving.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14129 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 135b200b0..70b049fd1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6436,7 +6436,7 @@ BUILDIN_FUNC(successrefitem) log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]); sd->status.inventory[i].refine++; - pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below + pc_unequipitem(sd,i,2|4); // status calc will happen in pc_equipitem() below clif_refine(sd->fd,0,i,sd->status.inventory[i].refine); clif_delitem(sd,i,1); @@ -6638,6 +6638,8 @@ BUILDIN_FUNC(autobonus) return 0; if( sd->state.autobonus&sd->status.inventory[current_equip_item_index].equip ) return 0; + if( sd->state.script_parsed&sd->status.inventory[current_equip_item_index].equip ) + return 0; bonus_script = parse_script(script_getstr(st,2), "autobonus bonus", 0, 0); rate = script_getnum(st,3); @@ -6678,6 +6680,8 @@ BUILDIN_FUNC(autobonus2) return 0; if( sd->state.autobonus&sd->status.inventory[current_equip_item_index].equip ) return 0; + if( sd->state.script_parsed&sd->status.inventory[current_equip_item_index].equip ) + return 0; bonus_script = parse_script(script_getstr(st,2), "autobonus bonus", 0, 0); rate = script_getnum(st,3); @@ -6717,6 +6721,8 @@ BUILDIN_FUNC(autobonus3) return 0; if( sd->state.autobonus&sd->status.inventory[current_equip_item_index].equip ) return 0; + if( sd->state.script_parsed&sd->status.inventory[current_equip_item_index].equip ) + return 0; bonus_script = parse_script(script_getstr(st,2), "autobonus bonus", 0, 0); rate = script_getnum(st,3); |