Bläddra i källkod

- Moved back Soul Drain code from mob_dead to skill_counter_additional_effect. Now we are back to where the skill animation does not shows, but you DO get SP T.T' (fixing this is turning out so difficult...)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7253 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 år sedan
förälder
incheckning
04d6132e76
3 ändrade filer med 12 tillägg och 8 borttagningar
  1. 3 0
      Changelog-Trunk.txt
  2. 0 8
      src/map/mob.c
  3. 9 0
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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/19
+	* Moved back Soul Drain code from mob_dead to skill_counter_additional_effect.
+	  Now we are back to where the skill animation does not shows, but you DO
+	  get SP T.T' [Skotlex]
 	* Some cleanups and corrections in battle.c to account for negative
 	  (absorbed) damage. [Skotlex]
 	* Fixed fame-list updating crashing char-sql server when the given char-id

+ 0 - 8
src/map/mob.c

@@ -1715,14 +1715,6 @@ 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]

+ 9 - 0
src/map/skill.c

@@ -1436,6 +1436,15 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 		sc_start(src,SkillStatusChangeTable(skillid),100,skilllv,skill_get_time2(skillid,skilllv));
 		break;
 	}
+
+	if(sd && skillid && attack_type&BF_MAGIC && status_isdead(bl) &&
+	 	skill_get_inf(skillid)!=INF_GROUND_SKILL &&
+		(rate=pc_checkskill(sd,HW_SOULDRAIN))>0
+	){	//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,bl,HW_SOULDRAIN,rate,1);
+		status_heal(src, 0, status_get_lv(bl)*(95+15*rate)/100, 2);
+	}
 	
 	if((sd||dstsd) && skillid != MC_CARTREVOLUTION && attack_type&BF_WEAPON){	/* カードによる追加効果 */
 		int i, type;