summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2014-12-26 20:13:14 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2014-12-26 20:13:14 +0800
commit6205a2c3de94df7e5177a25b735fd5f2c0e56e98 (patch)
tree4bc14da48779785775562bd2dea470c37793493e /src/map/skill.c
parent6dd08befa6064a652d0d98e7cb85f0e353992dd5 (diff)
downloadhercules-6205a2c3de94df7e5177a25b735fd5f2c0e56e98.tar.gz
hercules-6205a2c3de94df7e5177a25b735fd5f2c0e56e98.tar.bz2
hercules-6205a2c3de94df7e5177a25b735fd5f2c0e56e98.tar.xz
hercules-6205a2c3de94df7e5177a25b735fd5f2c0e56e98.zip
Follow up@6dd08befa6064a652d0d98e7cb85f0e353992dd5
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 098dc5d69..e70625866 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6041,18 +6041,22 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case MO_ABSORBSPIRITS:
{
int sp = 0;
- if (dstsd && dstsd->spiritball
- && (sd == dstsd || map_flag_vs(src->m) || (sd->duel_group && sd->duel_group == dstsd->duel_group))
- && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION)
- ) {
+ if ( dstsd && dstsd->spiritball
+ && (sd == dstsd || map_flag_vs(src->m) || (sd->duel_group && sd->duel_group == dstsd->duel_group))
+ && ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION)
+ ) {
// split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
sp = dstsd->spiritball * 7;
- RESET_SPIRITS(dstsd);
- } else if (dstmd && !(tstatus->mode&MD_BOSS) && rnd() % 100 < 20) {
+ pc->delspiritball(dstsd, dstsd->spiritball, 0);
+ } else if ( dstmd && !(tstatus->mode&MD_BOSS) && rnd() % 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]
sp = 2 * dstmd->level;
mob->target(dstmd,src,0);
}
+ if ( dstsd ) {
+ for ( int i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
+ pc->del_charm(dstsd, dstsd->spiritcharm[i], i);
+ }
if (sp) status->heal(src, 0, sp, 3);
clif->skill_nodamage(src,bl,skill_id,skill_lv,sp?1:0);
}
@@ -8914,9 +8918,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER )
{
sp = dstsd->spiritball; //1%sp per spiritball.
- RESET_SPIRITS(dstsd);
+ pc->delspiritball(dstsd, dstsd->spiritball, 0);
status_percent_heal(src, 0, sp);
}
+ if ( dstsd ) {
+ for ( int i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
+ pc->del_charm(dstsd, dstsd->spiritcharm[i], i);
+ }
clif->skill_nodamage(src, bl, skill_id, skill_lv, sp ? 1:0);
} else {
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);