Pārlūkot izejas kodu

- Yet again messed with the packet sent during a splash attack, but this time taking into account the packets that eA was using some many revisions ago. Tests are needed to see if Magnum Break/Grimtooth don't spam the skill animation anymore, and to see if GrandCross didn't break it's animation as well.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8877 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 gadi atpakaļ
vecāks
revīzija
962762114b
2 mainītis faili ar 12 papildinājumiem un 19 dzēšanām
  1. 5 0
      Changelog-Trunk.txt
  2. 7 19
      src/map/skill.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ 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/09/26
+	* Yet again messed with the packet sent during a splash attack, but this
+	  time taking into account the packets that eA was using some many revisions
+	  ago. Tests are needed to see if Magnum Break/Grimtooth don't spam the skill
+	  animation anymore, and to see if GrandCross didn't break it's animation as
+	  well. [Skotlex]
 	* Added function skill_dance_switch which handles converting overlapping
 	  song/dances to dissonance/ugly dance. It should make the overlapping area
 	  now behave completely like the mentioned song/dances (taking into account

+ 7 - 19
src/map/skill.c

@@ -1885,13 +1885,14 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
 	//Skill hit type
 	type=(skillid==0)?5:skill_get_hit(skillid);
 
-	if((damage <= 0 || damage < dmg.div_)
-			&& skillid != CH_PALMSTRIKE) //Palm Strike is the only skill that will knockback even if it misses. [Skotlex]
+	if(damage < dmg.div_ 
+		&& skillid != CH_PALMSTRIKE) //Palm Strike is the only skill that will knockback even if it misses. [Skotlex]
 		dmg.blewcount = 0;
 
 	if(skillid == CR_GRANDCROSS||skillid == NPC_GRANDDARKNESS) {
 		if(battle_config.gx_disptype) dsrc = src;
 		if(src == bl) type = 4;
+		else flag|=SD_ANIMATION;
 	}
 
 	if(sd) {
@@ -2033,24 +2034,11 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
 	case SN_SHARPSHOOTING:
 		dmg.dmotion = clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2);
 		break;
-	case CR_GRANDCROSS:
-	case NPC_GRANDDARKNESS:
-		//Only show animation when hitting yourself. [Skotlex]
-		if (src!=bl) {
-			dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
-			break;
-		}
 	default:
-// Aegis sends the same packet for both targetted and splash-targetted enemies,
-// therefore SD_ANIMATION isn't really of any use...
-/*
-		if (flag&SD_ANIMATION) //Disable skill animation.
-			dmg.dmotion = clif_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion,
-				damage, dmg.div_, 8, dmg.damage2);
-		else
-*/
-			dmg.dmotion = clif_skill_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion,
-				damage, dmg.div_, skillid, flag&SD_LEVEL?-1:skilllv, type);
+		//Disabling skill animation doesn't works on multi-hit.
+		dmg.dmotion = clif_skill_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion,
+			damage, dmg.div_, skillid, flag&SD_LEVEL?-1:skilllv, 
+			(flag&SD_ANIMATION && dmg.div_ < 2?5:type));
 		break;
 	}