Addition of DuelistFury effect.
Contributed by kiwimen.
This commit is contained in:
@ -796,7 +796,7 @@ public final class CharEffectList
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.getEffector().isPlayer() && info.getEffected().isPlayer() && info.getEffected().isAffected(EffectFlag.FACEOFF) && (info.getEffected().getActingPlayer().getAttackerObjId() != info.getEffector().getObjectId()))
|
||||
if (info.getEffector().isPlayer() && info.getEffected().isPlayer() && info.getEffected().isAffected(EffectFlag.DUELIST_FURY) && !info.getEffector().isAffected(EffectFlag.DUELIST_FURY))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ public abstract class L2Summon extends L2Playable
|
||||
|
||||
final SystemMessage sm;
|
||||
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.FACEOFF) && (target.getActingPlayer().getAttackerObjId() != getObjectId())))
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.DUELIST_FURY) && !getActingPlayer().isAffected(EffectFlag.FACEOFF)))
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THE_ATTACK_HAS_BEEN_BLOCKED);
|
||||
}
|
||||
@ -737,7 +737,7 @@ public abstract class L2Summon extends L2Playable
|
||||
{
|
||||
super.reduceCurrentHp(damage, attacker, skill);
|
||||
|
||||
if (!isDead() && !isHpBlocked() && (getOwner() != null) && (attacker != null) && (!getOwner().isAffected(EffectFlag.FACEOFF) || (getOwner().getAttackerObjId() == attacker.getObjectId())))
|
||||
if (!isDead() && !isHpBlocked() && (getOwner() != null) && (attacker != null) && (!getOwner().isAffected(EffectFlag.DUELIST_FURY) || attacker.isAffected(EffectFlag.FACEOFF)))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RECEIVED_S3_DAMAGE_FROM_C2);
|
||||
sm.addNpcName(this);
|
||||
|
@ -146,7 +146,7 @@ public class DoppelgangerInstance extends L2Npc
|
||||
|
||||
final SystemMessage sm;
|
||||
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.FACEOFF) && (target.getActingPlayer().getAttackerObjId() != getObjectId())))
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.DUELIST_FURY) && !getActingPlayer().isAffected(EffectFlag.FACEOFF)))
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THE_ATTACK_HAS_BEEN_BLOCKED);
|
||||
}
|
||||
|
@ -495,9 +495,6 @@ public final class L2PcInstance extends L2Playable
|
||||
private int _duelId = 0;
|
||||
private SystemMessageId _noDuelReason = SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL;
|
||||
|
||||
/** Faceoff */
|
||||
private int _attackerObjId = 0;
|
||||
|
||||
/** Boat and AirShip */
|
||||
private L2Vehicle _vehicle = null;
|
||||
private Location _inVehiclePosition;
|
||||
@ -11638,7 +11635,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
final SystemMessage sm;
|
||||
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.FACEOFF) && (target.getActingPlayer().getAttackerObjId() != getObjectId())))
|
||||
if ((target.isHpBlocked() && !target.isNpc()) || (target.isPlayer() && target.isAffected(EffectFlag.DUELIST_FURY) && !isAffected(EffectFlag.FACEOFF)))
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THE_ATTACK_HAS_BEEN_BLOCKED);
|
||||
}
|
||||
@ -13975,16 +13972,6 @@ public final class L2PcInstance extends L2Playable
|
||||
return _events.containsKey(clazz);
|
||||
}
|
||||
|
||||
public void setAttackerObjId(int attackerObjId)
|
||||
{
|
||||
_attackerObjId = attackerObjId;
|
||||
}
|
||||
|
||||
public int getAttackerObjId()
|
||||
{
|
||||
return _attackerObjId;
|
||||
}
|
||||
|
||||
public Fishing getFishing()
|
||||
{
|
||||
return _fishing;
|
||||
|
@ -88,7 +88,7 @@ public class PcStatus extends PlayableStatus
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActiveChar().isAffected(EffectFlag.FACEOFF) && (getActiveChar().getAttackerObjId() != attacker.getObjectId()))
|
||||
if (getActiveChar().isAffected(EffectFlag.DUELIST_FURY) && !attacker.isAffected(EffectFlag.FACEOFF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -55,7 +55,8 @@ public enum EffectFlag
|
||||
HPCPHEAL_CRITICAL,
|
||||
PROTECT_DEATH_PENALTY,
|
||||
CHAT_BLOCK,
|
||||
FAKE_DEATH;
|
||||
FAKE_DEATH,
|
||||
DUELIST_FURY;
|
||||
|
||||
public long getMask()
|
||||
{
|
||||
|
Reference in New Issue
Block a user