diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-07 14:52:59 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-07 14:52:59 +0000 |
commit | 7825f436c4b59d2a38a46a208f7d604c7be21dbe (patch) | |
tree | 359c7bbfa3dfd9c6aff8174c2037868c518c3c71 | |
parent | 3129c09e75f844e80f4a3b28f09b7bf3b81cdb0e (diff) | |
download | hercules-7825f436c4b59d2a38a46a208f7d604c7be21dbe.tar.gz hercules-7825f436c4b59d2a38a46a208f7d604c7be21dbe.tar.bz2 hercules-7825f436c4b59d2a38a46a208f7d604c7be21dbe.tar.xz hercules-7825f436c4b59d2a38a46a208f7d604c7be21dbe.zip |
- Moved souldrain code from skill_counter_additional_effect to mob_dead. It should display the skill animation correctly now.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7033 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/mob.c | 8 | ||||
-rw-r--r-- | src/map/skill.c | 14 | ||||
-rw-r--r-- | src/map/skill.h | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index df497b983..e328d0e20 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/07
+ * Moved souldrain code from skill_counter_additional_effect to mob_dead. It
+ should display the skill animation correctly now. [Skotlex]
* Adjusted several sc rate/time reductions as pointed out by Playtester.
[Skotlex]
- Luk now plays a luk/10 reduction role rather than a luk/3 one.
diff --git a/src/map/mob.c b/src/map/mob.c index 574362daa..7ee56773d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1711,6 +1711,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) sp += sd->sp_gain_race[status->race]; sp += sd->sp_gain_race[status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS]; hp += sd->hp_gain_value; + if(sd->ud.skillid && skill_get_type(sd->ud.skillid)==BF_MAGIC && + (temp=pc_checkskill(sd,HW_SOULDRAIN))>0 && + skill_get_inf(sd->ud.skillid)!=INF_GROUND_SKILL + ){ //Soul Drain should only work on targetted spells [Skotlex] + if (pc_issit(sd)) pc_setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex] + clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,temp,1); + sp += md->level*(95+15*temp)/100; + } if (hp||sp) status_heal(src, hp, sp, battle_config.show_hp_sp_gain?2:0); if (sd->mission_mobid == md->class_) { //TK_MISSION [Skotlex] diff --git a/src/map/skill.c b/src/map/skill.c index f6cb70c48..45305ba58 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1448,18 +1448,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * } } - if(sd && bl->type == BL_MOB && status_isdead(bl) && - skillid && skill_get_type(skillid)==BF_MAGIC && - skill_get_inf(skillid)!=INF_GROUND_SKILL && - (rate=pc_checkskill(sd,HW_SOULDRAIN))>0) - { //Soul Drain should only work on targetted spells [Skotlex] - int sp; - if (pc_issit(sd)) pc_setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex] - clif_skill_nodamage(src,bl,HW_SOULDRAIN,rate,1); - sp = (status_get_lv(bl))*(95+15*rate)/100; - status_heal(src, 0, sp, 3); - } - //Trigger counter-spells to retaliate against damage causing skills. [Skotlex] if(dstsd && !status_isdead(bl) && src != bl && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) { @@ -5601,7 +5589,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data ) if (ud->skilltimer == -1) { if(md) md->skillidx = -1; - else ud->skillid = 0; //Non mobs can't clear this one as it is used for skill condition 'afterskill' + else ud->skillid = 0; //mobs can't clear this one as it is used for skill condition 'afterskill' ud->skilllv = ud->skilltarget = 0; } return 1; diff --git a/src/map/skill.h b/src/map/skill.h index 536e4c9fd..9d8714f16 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -136,6 +136,8 @@ int do_final_skill(void); enum { CAST_GROUND, CAST_DAMAGE, CAST_NODAMAGE };
int skill_get_casttype(int id); //[Skotlex]
// スキルデ?タベ?スへのアクセサ
+//
+int skill_get_type( int id );
int skill_get_hit( int id );
int skill_get_inf( int id );
int skill_get_pl( int id );
|