serverTemplates now load on login

Make sure your script setup() funcs don't have anything in them that
can't be run twice
This commit is contained in:
Treeku
2014-04-13 17:29:05 +01:00
parent 1c654f8696
commit e3c0332924
+15 -1
View File
@@ -656,7 +656,21 @@ public class ObjectService implements INetworkDispatch {
}
public CreatureObject getCreatureFromDB(long objectId) {
return core.getCreatureODB().get(new Long(objectId), Long.class, CreatureObject.class);
CreatureObject object = core.getCreatureODB().get(new Long(objectId), Long.class, CreatureObject.class);
if (object != null && getObject(object.getObjectID()) == null) {
loadServerTemplate(object);
object.viewChildren(object, true, true, new Traverser() {
public void process(SWGObject child) {
loadServerTemplate(child);
}
});
}
return object;
}
public long generateObjectID() {