فهرست منبع

Fixed bugreport:686 and bugreport:3603 where kaite magic reflected/reflecting damage (i.e. Reflect Shield) is directed to the Paladin (Devotion) instead of the player devoted. Per official standards, the player devoted should receive the damage in those instances.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16676 54d463be-8e91-2dee-dedb-b68131a5f0ec
cookiecrumbs 12 سال پیش
والد
کامیت
f341332277
1فایلهای تغییر یافته به همراه23 افزوده شده و 2 حذف شده
  1. 23 2
      src/map/skill.c

+ 23 - 2
src/map/skill.c

@@ -2616,8 +2616,29 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
 			(d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == bl->id)
 			) && check_distance_bl(bl, d_bl, sce->val3) )
 		{
-			clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
-			status_fix_damage(NULL, d_bl, damage, 0);
+			/**
+			 * Check for devotion and change targetted dmg.
+			 * [d_bl = paladin; bl = player; src = source of dmg]
+			 **/
+			bool devo_flag = false; /* false = paladin devoing; true = player */
+			if ( src )
+			{
+				struct status_change *tsc;
+				tsc = status_get_sc(src);
+
+				/* Per official standards, following skills should reflect at the bl */
+				if( (tsc->data[SC_KAITE] && attack_type == BF_MAGIC) ||
+					(tsc->data[SC_REFLECTDAMAGE] && attack_type != BF_MAGIC)
+				  )
+					devo_flag = true;
+			}
+
+			clif_damage(
+				( (devo_flag) ? bl:d_bl), 
+				( (devo_flag) ? bl:d_bl), gettick(), 0, 0, damage, 0, 0, 0);
+			status_fix_damage(
+				( (devo_flag) ? bl:NULL), 
+				( (devo_flag) ? bl:d_bl), damage, 0, 0);
 		}
 		else {
 			status_change_end(bl, SC_DEVOTION, INVALID_TIMER);