1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-07 16:03:10 +00:00

First commit

Change-Id: I4d273faba7286288d2b9a214c87c39a76724d787
This commit is contained in:
rogiel
2011-04-28 18:49:39 -03:00
commit 6d52f44278
112 changed files with 1746 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package com.l2jserver.service.game.script;
import com.l2jserver.model.world.capability.Scriptable;
public interface Script<O extends Scriptable> extends Runnable {
/**
* Load this script for <tt>object</tt>
*
* @param object
*/
void load(O object);
void unload();
O getObject();
}

View File

@@ -0,0 +1,7 @@
package com.l2jserver.service.game.script;
import com.l2jserver.service.Service;
public interface ScriptingService extends Service {
}

View File

@@ -0,0 +1,25 @@
package com.l2jserver.service.game.template;
import com.l2jserver.model.id.TemplateID;
import com.l2jserver.model.template.AbstractTemplate;
import com.l2jserver.service.Service;
public interface TemplateService extends Service {
/**
* Get the template assigned with <tt>id</tt>
*
* @param id
* the template id
* @return the template matching the id
*/
AbstractTemplate getTemplate(TemplateID id);
/**
* Recompile the template with id <tt>id</tt>. This can be used to reload
* the template.
*
* @param id
* the template id
*/
void recompile(TemplateID id);
}

View File

@@ -0,0 +1,8 @@
package com.l2jserver.service.game.world;
import com.l2jserver.model.world.AbstractObject;
import com.l2jserver.model.world.event.WorldEvent;
public interface WorldEventDispatcher {
void dispatch(AbstractObject object, WorldEvent event);
}

View File

@@ -0,0 +1,22 @@
package com.l2jserver.service.game.world;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.service.Service;
public interface WorldService extends Service, Iterable<WorldObject> {
/**
* Register a new {@link WorldObject} to the service.
*
* @param object
* the object
*/
void register(WorldObject object);
/**
* Removes an registered {@link WorldObject} from the service.
*
* @param object
* the object
*/
void unregister(WorldObject object);
}

View File

@@ -0,0 +1,47 @@
package com.l2jserver.service.game.world;
import java.util.Iterator;
import java.util.Set;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.model.world.filter.WorldFilter;
import com.l2jserver.service.ServiceStartException;
import com.l2jserver.service.ServiceStopException;
public class WorldServiceImpl implements WorldService {
private Set<WorldObject> objects;
@Override
public void start() throws ServiceStartException {
// TODO Auto-generated method stub
}
@Override
public void register(WorldObject object) {
// TODO Auto-generated method stub
}
@Override
public void unregister(WorldObject object) {
// TODO Auto-generated method stub
}
@Override
public Iterator<WorldObject> iterator() {
return objects.iterator();
}
public <T extends WorldObject> Iterator<T> iterator(WorldFilter<T> filter) {
//return objects.iterator();
return null;
}
@Override
public void stop() throws ServiceStopException {
// TODO Auto-generated method stub
}
}