Access zone character list only by getter method.

This commit is contained in:
MobiusDevelopment
2020-02-04 05:21:24 +00:00
parent 232a3bb69b
commit 407ff24524
74 changed files with 126 additions and 224 deletions

View File

@@ -49,7 +49,7 @@ public abstract class ZoneType extends ListenersContainer
private final int _id;
protected ZoneForm _zone;
protected List<ZoneForm> _blockedZone;
protected Map<Integer, Creature> _characterList = new ConcurrentHashMap<>();
private final Map<Integer, Creature> _characterList = new ConcurrentHashMap<>();
/** Parameters to affect specific characters */
private boolean _checkAffected = false;

View File

@@ -130,7 +130,7 @@ public class DamageZone extends ZoneType
@Override
protected void onExit(Creature creature)
{
if (_characterList.isEmpty() && (getSettings().getTask() != null))
if (getCharactersInside().isEmpty() && (getSettings().getTask() != null))
{
getSettings().clear();
}

View File

@@ -183,7 +183,7 @@ public class EffectZone extends ZoneType
}
}
if (_characterList.isEmpty() && (getSettings().getTask() != null))
if (getCharactersInside().isEmpty() && (getSettings().getTask() != null))
{
getSettings().clear();
}