ソースを参照

* Tiny clean: PcStatus
* Correcting comment

DrHouse 16 年 前
コミット
5a99e0e026

+ 1 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java

@@ -4933,7 +4933,7 @@ public abstract class L2Character extends L2Object
 
         if (miss)
         {
-        	// Custom ON_EVADED_HIT 
+        	// ON_EVADED_HIT 
          	if (target.getChanceSkills() != null) 
          		target.getChanceSkills().onEvadedHit(this); 
          	

+ 9 - 8
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/status/PcStatus.java

@@ -56,21 +56,22 @@ public class PcStatus extends PlayableStatus
 				return;
 		}
 		
-		if ( attacker instanceof L2PcInstance)
+		if (getActiveChar().isInDuel())
 		{
-			if (getActiveChar().isInDuel())
+			if ( attacker instanceof L2PcInstance)
 			{
-				// the duel is finishing - players do not recive damage
-				if (getActiveChar().getDuelState() == Duel.DUELSTATE_DEAD) return;
-				else if (getActiveChar().getDuelState() == Duel.DUELSTATE_WINNER) return;
+				if (getActiveChar().getDuelState() == Duel.DUELSTATE_DEAD)
+					return;
+				else if (getActiveChar().getDuelState() == Duel.DUELSTATE_WINNER)
+					return;
 
 				// cancel duel if player got hit by another player, that is not part of the duel
 				if (((L2PcInstance)attacker).getDuelId() != getActiveChar().getDuelId())
 					getActiveChar().setDuelState(Duel.DUELSTATE_INTERRUPTED);
+			
 			}
-		} else {
-			// if attacked by a non L2PcInstance & non L2SummonInstance the duel gets canceled
-			if (getActiveChar().isInDuel() && !(attacker instanceof L2SummonInstance)) getActiveChar().setDuelState(Duel.DUELSTATE_INTERRUPTED);
+			else if (!(attacker instanceof L2SummonInstance))
+					getActiveChar().setDuelState(Duel.DUELSTATE_INTERRUPTED);
 		}
 		
 		int fullValue = (int) value;