Code style changes.

This commit is contained in:
MobiusDev
2016-04-26 19:21:19 +00:00
parent 6a13705766
commit fc070c9238
768 changed files with 3338 additions and 4252 deletions

View File

@@ -204,7 +204,7 @@ public enum AbnormalVisualEffect
* @param name the name
* @return The abnormal visual effect if its found, {@code null} otherwise
*/
public static final AbnormalVisualEffect findByName(String name)
public static AbnormalVisualEffect findByName(String name)
{
for (AbnormalVisualEffect abnormalVisualEffect : values())
{

View File

@@ -339,7 +339,7 @@ public final class BuffInfo
// Remove abnormal visual effects.
resetAbnormalVisualEffects();
// Set the proper system message.
if (!(_effected.isSummon() && !((L2Summon) _effected).getOwner().hasSummon()))
if (!_effected.isSummon() || ((L2Summon) _effected).getOwner().hasSummon())
{
SystemMessageId smId = null;
if (_skill.isToggle())

View File

@@ -832,7 +832,7 @@ public final class Skill implements IIdentifiable
public int getAffectLimit()
{
return (_affectLimit[0] + Rnd.get(_affectLimit[1]));
return _affectLimit[0] + Rnd.get(_affectLimit[1]);
}
public boolean isActive()
@@ -1111,7 +1111,7 @@ public final class Skill implements IIdentifiable
* @param sourceInArena
* @return
*/
public static final boolean checkForAreaOffensiveSkills(L2Character caster, L2Character target, Skill skill, boolean sourceInArena)
public static boolean checkForAreaOffensiveSkills(L2Character caster, L2Character target, Skill skill, boolean sourceInArena)
{
if ((target == null) || target.isDead() || (target == caster))
{
@@ -1164,7 +1164,7 @@ public final class Skill implements IIdentifiable
return false;
}
if (!sourceInArena && !(targetPlayer.isInsideZone(ZoneId.PVP) && !targetPlayer.isInsideZone(ZoneId.SIEGE)))
if (!sourceInArena && (!targetPlayer.isInsideZone(ZoneId.PVP) || targetPlayer.isInsideZone(ZoneId.SIEGE)))
{
if ((player.getAllyId() != 0) && (player.getAllyId() == targetPlayer.getAllyId()))
{
@@ -1200,13 +1200,10 @@ public final class Skill implements IIdentifiable
}
}
}
else
// target is mob
else if ((targetPlayer == null) && (target instanceof L2Attackable) && (caster instanceof L2Attackable))
{
// target is mob
if ((targetPlayer == null) && (target instanceof L2Attackable) && (caster instanceof L2Attackable))
{
return false;
}
return false;
}
if (!GeoData.getInstance().canSeeTarget(caster, target))
@@ -1216,13 +1213,13 @@ public final class Skill implements IIdentifiable
return true;
}
public static final boolean addPet(L2Character caster, L2PcInstance owner, int radius, boolean isDead)
public static boolean addPet(L2Character caster, L2PcInstance owner, int radius, boolean isDead)
{
final L2Summon pet = owner.getPet();
return (pet != null) && addCharacter(caster, pet, radius, isDead);
}
public static final boolean addCharacter(L2Character caster, L2Character target, int radius, boolean isDead)
public static boolean addCharacter(L2Character caster, L2Character target, int radius, boolean isDead)
{
if (isDead != target.isDead())
{
@@ -1354,7 +1351,7 @@ public final class Skill implements IIdentifiable
}
// Check bad skills against target.
if ((effector != effected) && isBad() && ((effected.isInvul() && (!effected.isVulnerableFor(effector))) || (effector.isGM() && !effector.getAccessLevel().canGiveDamage())))
if ((effector != effected) && isBad() && ((effected.isInvul() && !effected.isVulnerableFor(effector)) || (effector.isGM() && !effector.getAccessLevel().canGiveDamage())))
{
return;
}
@@ -1366,12 +1363,9 @@ public final class Skill implements IIdentifiable
return;
}
}
else
else if (effected.isBuffBlocked() && !isBad())
{
if (effected.isBuffBlocked() && !isBad())
{
return;
}
return;
}
if (effected.isInvulAgainst(getId(), getLevel()))
@@ -1677,7 +1671,7 @@ public final class Skill implements IIdentifiable
*/
public boolean canBeStolen()
{
return !isPassive() && !isToggle() && !isDebuff() && !isHeroSkill() && !isGMSkill() && !(isStatic() && (getId() != CommonSkill.CARAVANS_SECRET_MEDICINE.getId())) && canBeDispeled() && (getId() != CommonSkill.SERVITOR_SHARE.getId());
return !isPassive() && !isToggle() && !isDebuff() && !isHeroSkill() && !isGMSkill() && (!isStatic() || (getId() == CommonSkill.CARAVANS_SECRET_MEDICINE.getId())) && canBeDispeled() && (getId() != CommonSkill.SERVITOR_SHARE.getId());
}
public boolean isClanSkill()

View File

@@ -137,7 +137,7 @@ public enum SkillOperateType
*/
public boolean isSelfContinuous()
{
return (this == ACTIVE_WITH_TRIGGER);
return this == ACTIVE_WITH_TRIGGER;
}
/**
@@ -146,7 +146,7 @@ public enum SkillOperateType
*/
public boolean isPassive()
{
return (this == PASSIVE);
return this == PASSIVE;
}
/**
@@ -155,7 +155,7 @@ public enum SkillOperateType
*/
public boolean isToggle()
{
return (this == TOGGLE);
return this == TOGGLE;
}
/**