|
@@ -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;
|