From 4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Wed, 2 Dec 2009 10:30:10 +0000 Subject: * Autobonus code cleanups. - removed the 'script_parsed' flag to fix the issues with combo items. - introduced a global cache for autobonus scripts so that we don't have to parse scripts everytime invoking status_calc_bl. - fixed such script commands as 'getrefine()' not working inside autobonus scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14180 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index ab26721fd..7a6afd78c 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -70,8 +70,7 @@ struct s_add_drop { struct s_autobonus { short rate,atk_type; unsigned int duration; - struct script_code *bonus_script; - struct script_code *other_script; + char *bonus_script, *other_script; int active; unsigned short pos; }; @@ -130,7 +129,6 @@ struct map_session_data { unsigned int bg_id; unsigned skillonskill : 1; unsigned short user_font; - unsigned short script_parsed; //flag to indicate if the script of an autobonus is parsed. [Inkfish] unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish] } state; struct { @@ -585,7 +583,7 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, int pc_updateweightstatus(struct map_session_data *sd); -int pc_addautobonus(struct s_autobonus *bonus,char max,struct script_code *script,short rate,unsigned int dur,short atk_type,struct script_code *other_script,unsigned short pos,bool onskill); +int pc_addautobonus(struct s_autobonus *bonus,char max,const char *script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned short pos,bool onskill); int pc_exeautobonus(struct map_session_data* sd,struct s_autobonus *bonus); int pc_endautobonus(int tid, unsigned int tick, int id, intptr data); int pc_delautobonus(struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore); -- cgit v1.2.3-60-g2f50