Code improvements.

This commit is contained in:
MobiusDev
2016-04-24 16:30:15 +00:00
parent 8bd51aba1c
commit 2dd14bef9b
860 changed files with 8865 additions and 17041 deletions

View File

@@ -74,12 +74,7 @@ public class Area implements ITargetTypeHandler
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
for (L2Character obj : objs)
{
if (!(obj.isAttackable() || obj.isPlayable()))
{
continue;
}
if (obj == origin)
if (!(obj.isAttackable() || obj.isPlayable()) || (obj == origin))
{
continue;
}
@@ -100,12 +95,7 @@ public class Area implements ITargetTypeHandler
}
}
if (targetList.isEmpty())
{
return EMPTY_TARGET_LIST;
}
return targetList.toArray(new L2Character[targetList.size()]);
return targetList.isEmpty() ? EMPTY_TARGET_LIST : targetList.toArray(new L2Character[targetList.size()]);
}
@Override