diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-28 08:23:53 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-28 08:23:53 +0000 |
commit | ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96 (patch) | |
tree | 85408fbe3187a3e4a3450b8db88d33374573c39c /src/map/pc.h | |
parent | a6a08b1c5d2a955cbd586d5d3c7f777e69c215ff (diff) | |
download | hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.gz hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.bz2 hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.xz hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.zip |
* Implemented script command "autobonus". [Inkfish]
- "autobonus" is similar to "bonusautoscript", however it has a timer of its own.
- Updated itemdb changing items bonus using "bonusautoscript + sc_start" mode to "autobonus + bonus" mode.
- Remove bonusautoscript and status changes that was needed by bonusautoscript and is no longer in use.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13915 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index 3d09ebcbe..90e055c17 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -67,9 +67,13 @@ struct s_add_drop { int race, rate; }; -struct s_autoscript { - unsigned short rate, flag, target; - struct script_code *script; +struct s_autobonus { + short rate,atk_type; + unsigned int duration; + struct script_code *bonus_script; + struct script_code *other_script; + int active; + unsigned short pos; }; struct map_session_data { @@ -126,6 +130,7 @@ struct map_session_data { unsigned int bg_id; unsigned skillonskill : 1; unsigned short user_font; + unsigned short autobonus; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; @@ -243,7 +248,7 @@ struct map_session_data { } itemhealrate[MAX_PC_BONUS]; // zeroed structures end here // manually zeroed structures start here. - struct s_autoscript autoscript[MAX_PC_BONUS], autoscript2[MAX_PC_BONUS], autoscript3[MAX_PC_BONUS]; //Auto script on attack, when attacked, on skill usage + struct s_autobonus autobonus[MAX_PC_BONUS], autobonus2[MAX_PC_BONUS], autobonus3[MAX_PC_BONUS]; //Auto script on attack, when attacked, on skill usage // manually zeroed structures end here. // zeroed vars start here. int arrow_atk,arrow_ele,arrow_cri,arrow_hit; @@ -571,8 +576,10 @@ 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_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script, bool onskill); -void pc_autoscript_clear(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_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); int pc_bonus(struct map_session_data*,int,int); int pc_bonus2(struct map_session_data *sd,int,int,int); |