Improved checkIfPvP method.
This commit is contained in:
@ -203,20 +203,12 @@ public abstract class L2Playable extends L2Character
|
||||
{
|
||||
final L2PcInstance player = getActingPlayer();
|
||||
|
||||
if ((player == null) || (target == null) || (player == target))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (target.isOnDarkSide())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (target.getReputation() < 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((player.getPvpFlag() > 0) && (target.getPvpFlag() > 0))
|
||||
if ((player == null) //
|
||||
|| (target == null) //
|
||||
|| (player == target) //
|
||||
|| (target.getReputation() < 0) //
|
||||
|| (target.getPvpFlag() > 0) //
|
||||
|| target.isOnDarkSide())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -5302,11 +5302,10 @@ public final class L2PcInstance extends L2Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if ((isInDuel() && (player_target.getDuelId() == getDuelId())))
|
||||
if (isInDuel() && (player_target.getDuelId() == getDuelId()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!isInsideZone(ZoneId.PVP) || !player_target.isInsideZone(ZoneId.PVP)) && (player_target.getReputation() >= 0))
|
||||
{
|
||||
if (checkIfPvP(player_target))
|
||||
@ -5317,7 +5316,6 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);
|
||||
}
|
||||
|
||||
if (getPvpFlag() == 0)
|
||||
{
|
||||
startPvPFlag();
|
||||
|
Reference in New Issue
Block a user