summaryrefslogtreecommitdiff
path: root/src/map/status.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/status.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/status.c')
-rw-r--r--src/map/status.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 05c6c8baa..7b2edb38d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -571,8 +571,11 @@ int status_calc_pc(struct map_session_data* sd,int first)
if(sd->status.pet_id > 0) {
struct pet_data *pd=sd->pd;
if((pd && battle_config.pet_status_support==1) && (battle_config.pet_equip_required==0 || (battle_config.pet_equip_required && pd->equip > 0))) {
- if(sd->status.pet_id > 0 && sd->petDB && sd->pet.intimate > 0)
- run_script(sd->petDB->script,0,sd->bl.id,0);
+ if(sd->status.pet_id > 0 && sd->petDB && sd->pet.intimate > 0 &&
+ pd->state.skillbonus == 1) {
+ pc_bonus(sd,pd->skillbonustype,pd->skillbonusval);
+// run_script(sd->petDB->script,0,sd->bl.id,0);
+ }
pele = sd->atk_ele;
pdef_ele = sd->def_ele;
sd->atk_ele = sd->def_ele = 0;
@@ -2832,6 +2835,16 @@ int status_get_race2(struct block_list *bl)
else
return 0;
}
+int status_isdead(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->state.state == MS_DEAD;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return pc_isdead((struct map_session_data *)bl);
+ else
+ return 0;
+}
// StatusChangeŚn‚ĚŹŠ“ľ
struct status_change *status_get_sc_data(struct block_list *bl)
@@ -2971,6 +2984,9 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
nullpo_retr(0, bl);
if(bl->type == BL_SKILL)
return 0;
+ if(bl->type == BL_MOB)
+ if (status_isdead(bl)) return 0;
+
nullpo_retr(0, sc_data=status_get_sc_data(bl));
nullpo_retr(0, sc_count=status_get_sc_count(bl));
nullpo_retr(0, option=status_get_option(bl));
@@ -3025,7 +3041,7 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
}
}
}
- else if(bl->type == BL_MOB) {
+ else if(bl->type == BL_MOB) {
}
else {
if(battle_config.error_log)