summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 23:54:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 23:54:49 +0000
commit6ed44f7303f11ed2de589fca48b19092c2738409 (patch)
tree7240e16cfb7e7a3b0e0433aab2e0c8c741a5b2bd /src/map/skill.c
parentb48816ba37affa20998a64300af083faa6c70127 (diff)
downloadhercules-6ed44f7303f11ed2de589fca48b19092c2738409.tar.gz
hercules-6ed44f7303f11ed2de589fca48b19092c2738409.tar.bz2
hercules-6ed44f7303f11ed2de589fca48b19092c2738409.tar.xz
hercules-6ed44f7303f11ed2de589fca48b19092c2738409.zip
- skill_clear_unitgroup is now invoked in unit_remove_map only on death if the applicable battle setting is set. It is now also invoked in unit_free.
- Changed setting clear_unit_ondeath to a type 4 (bl-based) which defaults to BL_ALL. - Fixed Absorb spirit sphere not working on mobs, thanks to Vividd. - Cleared the ud->target on pc_stop_attack to prevent attack resuming an other such oddities. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6145 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c50
1 files changed, 17 insertions, 33 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d728a7a9f..a3c1b8813 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1695,8 +1695,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
nullpo_retr(0, dsrc); //dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.
nullpo_retr(0, bl); //Target to be attacked.
-// if(src->prev == NULL || dsrc->prev == NULL || bl->prev == NULL)
-// return 0;
if (src != dsrc) {
//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
if (!status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skillid, 2))
@@ -1707,17 +1705,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
return 0;
}
-
- //uncomment the following to do a check between caster and target. [Skotlex]
- //eg: if you want storm gust to do no damage if the caster runs to another map after invoking the skill.
-// if(src->m != bl->m)
-// return 0;
-
- //Uncomment the following to disable trap-ground skills from hitting when the caster is dead [Skotlex]
- //eg: You cast meteor and then are killed, if you uncomment the following the meteors that fall afterwards cause no damage.
-// if(src != dsrc && status_isdead(src))
-// return 0;
-
if (dsrc->type == BL_PC)
sd = (struct map_session_data *)dsrc;
if (bl->type == BL_PC)
@@ -3923,26 +3910,23 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case MO_ABSORBSPIRITS: // ?’D
i = 0;
- if (dstsd && dstsd->spiritball > 0)
- {
- if (((sd && sd == dstsd) || map_flag_vs(src->m)) && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER))
- { // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
- i = dstsd->spiritball * 7;
- pc_delspiritball(dstsd,dstsd->spiritball,0);
- } else if (dstmd && !(status_get_mode(bl)&MD_BOSS) && rand() % 100 < 20)
- { // check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]
- i = 2 * dstmd->db->lv;
- mob_target(dstmd,src,0);
- }
- if (sd){
- if (i > 0x7FFF)
- i = 0x7FFF;
- if (sd->status.sp + i > sd->status.max_sp)
- i = sd->status.max_sp - sd->status.sp;
- if (i) {
- sd->status.sp += i;
- clif_heal(sd->fd,SP_SP,i);
- }
+ if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER)
+ { // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
+ i = dstsd->spiritball * 7;
+ pc_delspiritball(dstsd,dstsd->spiritball,0);
+ } else if (dstmd && !(status_get_mode(bl)&MD_BOSS) && rand() % 100 < 20)
+ { // check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]
+ i = 2 * dstmd->db->lv;
+ mob_target(dstmd,src,0);
+ }
+ if (sd){
+ if (i > 0x7FFF)
+ i = 0x7FFF;
+ if (sd->status.sp + i > sd->status.max_sp)
+ i = sd->status.max_sp - sd->status.sp;
+ if (i) {
+ sd->status.sp += i;
+ clif_heal(sd->fd,SP_SP,i);
}
}
clif_skill_nodamage(src,bl,skillid,skilllv,0);