summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-20 14:11:43 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-20 14:11:43 +0000
commitce070c5d8303a15fec032721e0163bdce4e84c33 (patch)
tree8fe5d38dec3a05af1c2e82571318d76e78d754fe /src/map/script.c
parent3d791e7ca59391cab1fb2054fd97b221fce3bb99 (diff)
downloadhercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.gz
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.bz2
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.tar.xz
hercules-ce070c5d8303a15fec032721e0163bdce4e84c33.zip
* Added skill requirements for the new guild skills
* Allow Emergency Recall to be cast in guild castles * Add 'minimum job level required' for skill_tree reading - Berserk now requires job level 50 * Added Spring Trap to be able to trigger ankle snare traps that aren't activated yet * Added a fix in guild.c by Mellowz * Some rewrites on the pet skill bonuses system * Check whether a monster is still alive before starting a status change git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1142 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index c9f0b8bd5..92ecd8690 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5713,10 +5713,17 @@ int buildin_petskillbonus(struct script_state *st)
duration=conv_num(st,& (st->stack->stack_data[st->start+4]));
timer=conv_num(st,& (st->stack->stack_data[st->start+5]));
- pd->skillbonusduration=-1;
- pd->skillbonustimer=-1;
+ // initialise bonuses
+ pd->skillbonustype=type;
+ pd->skillbonusval=val;
+ pd->skillduration=duration*1000;
+ pd->skilltimer=timer*1000;
- pet_skill_bonus(sd,pd,type,val,duration,timer,0);
+ if (pd->state.skillbonus == -1)
+ pd->state.skillbonus=0; // waiting state
+
+ // wait for timer to start
+ pd->skillbonustimer=add_timer(gettick()+pd->skilltimer,pet_skill_bonus_timer,sd->bl.id,0);
return 0;
}