Removed instance getter from InstanceWorld.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user