فهرست منبع

Fixed polearm target numbers. Skill 3599 add 4 targets for every character, and 3 was hardcoded in core, total 7.

_DS_ 15 سال پیش
والد
کامیت
beebcf3448
1فایلهای تغییر یافته به همراه9 افزوده شده و 10 حذف شده
  1. 9 10
      L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Character.java

+ 9 - 10
L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -1302,7 +1302,7 @@ public abstract class L2Character extends L2Object
 
 		// Get char's heading degree
 		//angleChar = Util.convertHeadingToDegree(getHeading());
-		int attackRandomCountMax = (int)getStat().calcStat(Stats.ATTACK_COUNT_MAX, 3, null, null) - 1;
+		int attackRandomCountMax = (int)getStat().calcStat(Stats.ATTACK_COUNT_MAX, 0, null, null) - 1;
 		int attackcount = 0;
 
 		/*if (angleChar <= 0)
@@ -1351,16 +1351,15 @@ public abstract class L2Character extends L2Object
 					// Launch a simple attack against the L2Character targeted
 					if (!temp.isAlikeDead())
 					{
-						attackcount += 1;
-						if (attackcount <= attackRandomCountMax)
+						if (temp == getAI().getAttackTarget()
+						        || temp.isAutoAttackable(this))
 						{
-							if (temp == getAI().getAttackTarget()
-							        || temp.isAutoAttackable(this))
-							{
-								
-								hitted |= doAttackHitSimple(attack, temp, attackpercent, sAtk);
-								attackpercent /= 1.15;
-							}
+							hitted |= doAttackHitSimple(attack, temp, attackpercent, sAtk);
+							attackpercent /= 1.15;
+
+							attackcount++;
+							if (attackcount > attackRandomCountMax)
+								break;
 						}
 					}
 				}