Minor code organization related to PvP flag gain.

This commit is contained in:
MobiusDev
2019-01-25 03:45:32 +00:00
parent f27e223be9
commit e70aa2c56d
10 changed files with 100 additions and 110 deletions

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }

View File

@@ -642,19 +642,18 @@ public class SkillCaster implements Runnable
((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster); ((L2Character) obj).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
} }
} }
else if (((skill.getEffectPoint() > 0) && obj.isMonster()) // // Self casting should not increase PvP time.
|| (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) // else if (obj != player)
|| (((L2Character) obj).getReputation() < 0) //
)))
{ {
// Supporting players or monsters result in pvpflag. // Supporting monsters or players results in pvpflag.
if (!obj.isFakePlayer() // if (((skill.getEffectPoint() > 0) && obj.isMonster()) //
|| (obj.isFakePlayer() // || (obj.isPlayable() && ((obj.getActingPlayer().getPvpFlag() > 0) //
&& (!((L2Npc) obj).isScriptValue(0) // || (((L2Character) obj).getReputation() < 0) //
|| (((L2Npc) obj).getReputation() < 0)))) )))
{ {
// Self casting should not increase PvP time. // Consider fake player PvP status.
if (obj != player) if (!obj.isFakePlayer() //
|| (obj.isFakePlayer() && (!((L2Npc) obj).isScriptValue(0) || (((L2Npc) obj).getReputation() < 0))))
{ {
player.updatePvPStatus(); player.updatePvPStatus();
} }