summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-12-02 10:30:10 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-12-02 10:30:10 +0000
commit4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9 (patch)
tree3bb5818ac995b3853d9f0cd46de07542eddc2c4e /src/map/pc.h
parentaefb12e53cbeed61558283309a5f8e2f31963fdb (diff)
downloadhercules-4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9.tar.gz
hercules-4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9.tar.bz2
hercules-4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9.tar.xz
hercules-4afe95f6ad237ebddbc913f9e02dd1bbd4fb28b9.zip
* 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
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h6
1 files changed, 2 insertions, 4 deletions
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);