Removed instance getter from InstanceWorld.

This commit is contained in:
MobiusDev
2018-04-30 02:24:41 +00:00
parent fa2d194ac8
commit dca612dbb5
21 changed files with 67 additions and 68 deletions

View File

@@ -55,6 +55,6 @@ public class ConditionPlayerInstanceId extends Condition
}
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(effector.getActingPlayer());
return (world != null) && (world.getInstanceId() == instanceId) && _instanceIds.contains(world.getInstance().getTemplateId());
return (world != null) && (world.getInstanceId() == instanceId) && _instanceIds.contains(world.getTemplateId());
}
}

View File

@@ -47,15 +47,6 @@ public class InstanceWorld
_instance = instance;
}
/**
* Gets the instance.
* @return the instance
*/
public Instance getInstance()
{
return _instance;
}
/**
* Gets the dynamically generated instance ID.
* @return the instance ID
@@ -65,6 +56,15 @@ public class InstanceWorld
return _instance.getId();
}
/**
* Get template ID of instance world.
* @return instance template ID
*/
public int getTemplateId()
{
return _instance.getTemplateId();
}
public List<Integer> getAllowed()
{
return _allowed;

View File

@@ -202,7 +202,7 @@ public abstract class L2ZoneType extends ListenersContainer
if (_instanceTemplateId > 0)
{
final InstanceWorld world = InstanceManager.getInstance().getWorld(character);
if ((world != null) && (world.getInstance().getTemplateId() != _instanceTemplateId))
if ((world != null) && (world.getTemplateId() != _instanceTemplateId))
{
return false;
}