summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-28 17:58:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-28 17:58:56 +0000
commitbfb4c510052f56c0af3f7fbca417ce23d0fd2203 (patch)
treec1c0f5ec941a9dfb09b9d20293c822082b124475 /src/map/skill.c
parentff2af609b86f5c35007fc30d0ef69214bd76bc12 (diff)
downloadhercules-bfb4c510052f56c0af3f7fbca417ce23d0fd2203.tar.gz
hercules-bfb4c510052f56c0af3f7fbca417ce23d0fd2203.tar.bz2
hercules-bfb4c510052f56c0af3f7fbca417ce23d0fd2203.tar.xz
hercules-bfb4c510052f56c0af3f7fbca417ce23d0fd2203.zip
- Added functions status_revive, pc_revive and mob_revive to handle revival (it doesn't handles player respawning, though)
- Corrected alive, raisemap, raiseall to use these functions. - Updated resurrection/mob-kaizel to use status_revive - Added SC_BLADESTOP to the skill enum at the beginning of status.c (fixes Bladestop causing an unknown status change message) - Fixed MSS_DEAD state skills not triggering. - Corrected some compilation warnings on the merc.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6807 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 7a53cf63c..af0fef4b5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3254,7 +3254,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
status_zap(src, sstatus->hp-1, sstatus->sp-1);
break;
- } else if (dstsd && pc_isdead(dstsd) && flag&1) { //Revive
+ } else if (status_isdead(bl) && flag&1) { //Revive
skill_area_temp[0]++; //Count it in, then fall-through to the Resurrection code.
skilllv = 3; //Resurrection level 3 is used
} else //Invalid target, skip resurrection.
@@ -3266,40 +3266,39 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_fail(sd,skillid,0,0);
break;
}
- if(dstsd && pc_isdead(dstsd)) {
- int per = 0;
- if (map[bl->m].flag.pvp && dstsd->pvp_point < 0)
+ if (!status_isdead(bl))
+ break;
+ {
+ int per = 0, sper = 0;
+ if (map[bl->m].flag.pvp && dstsd && dstsd->pvp_point < 0)
break;
- clif_skill_nodamage(src,bl,ALL_RESURRECTION,skilllv,1); //Both Redemption and Res show this skill-animation.
switch(skilllv){
case 1: per=10; break;
case 2: per=30; break;
case 3: per=50; break;
case 4: per=80; break;
}
- tstatus->hp = 1;
- if (dstsd->special_state.restart_full_recover)
- status_percent_heal(bl, 100, 100);
- else
- status_percent_heal(bl, per, 0);
- pc_setstand(dstsd);
- if(battle_config.pc_invincible_time > 0)
- pc_setinvincibletimer(dstsd, battle_config.pc_invincible_time);
- clif_resurrection(bl, 1);
- if(sd && battle_config.resurrection_exp > 0) {
- int exp = 0,jexp = 0;
- int lv = dstsd->status.base_level - sd->status.base_level, jlv = dstsd->status.job_level - sd->status.job_level;
- if(lv > 0) {
- exp = (int)((double)dstsd->status.base_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
- if (exp < 1) exp = 1;
- }
- if(jlv > 0) {
- jexp = (int)((double)dstsd->status.job_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
- if (jexp < 1) jexp = 1;
+ if(dstsd && dstsd->special_state.restart_full_recover)
+ per = sper = 100;
+ if (status_revive(bl, per, sper))
+ {
+ clif_skill_nodamage(src,bl,ALL_RESURRECTION,skilllv,1); //Both Redemption and Res show this skill-animation.
+ if(sd && dstsd && battle_config.resurrection_exp > 0)
+ {
+ int exp = 0,jexp = 0;
+ int lv = dstsd->status.base_level - sd->status.base_level, jlv = dstsd->status.job_level - sd->status.job_level;
+ if(lv > 0) {
+ exp = (int)((double)dstsd->status.base_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
+ if (exp < 1) exp = 1;
+ }
+ if(jlv > 0) {
+ jexp = (int)((double)dstsd->status.job_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
+ if (jexp < 1) jexp = 1;
+ }
+ if(exp > 0 || jexp > 0)
+ pc_gainexp (sd, exp, jexp);
}
- if(exp > 0 || jexp > 0)
- pc_gainexp (sd, exp, jexp);
}
}
break;