1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-08 08:23:11 +00:00

Implements packed data directory for faster loading times

This commit is contained in:
2011-12-27 17:28:48 -02:00
parent 92c72ff155
commit 92962241c3
13 changed files with 183 additions and 73 deletions

View File

@@ -120,7 +120,7 @@ public class GameServerJDBCDatabaseService extends AbstractSQLDatabaseService
updateSchema(QLogChat.logChat);
if (updateSchema(QNPC.npc)) {
try {
importData(vfsService.resolve("data/static/npc.csv"), QNPC.npc);
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
} catch (IOException e) {
throw new DatabaseException(e);
}

View File

@@ -100,7 +100,7 @@ public class GameServerOrientDatabaseService extends
updateSchema(QLogChat.logChat);
if (updateSchema(QNPC.npc)) {
try {
importData(vfsService.resolve("data/static/npc.csv"), QNPC.npc);
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
} catch (IOException e) {
throw new DatabaseException(e);
}

View File

@@ -18,7 +18,6 @@ package com.l2jserver.service.game.template;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -143,9 +142,9 @@ public class XMLTemplateService extends AbstractService implements
/**
* @return the directory in which templates are stored
*/
@ConfigurationPropertyGetter(defaultValue = "data/template")
@ConfigurationPropertyGetter(defaultValue = "template/")
@ConfigurationXPath("/configuration/services/template/directory")
URI getTemplateDirectory();
String getTemplateDirectory();
/**
* @param file
@@ -153,7 +152,7 @@ public class XMLTemplateService extends AbstractService implements
*/
@ConfigurationPropertySetter
@ConfigurationXPath("/configuration/services/template/directory")
void setTemplateDirectory(URI file);
void setTemplateDirectory(String file);
}
/**
@@ -215,8 +214,8 @@ public class XMLTemplateService extends AbstractService implements
unmarshaller.setAdapter(effectIdTemplateAdapter);
unmarshaller.setAdapter(teleportationIdTemplateAdapter);
final Path templatePath = vfsService.resolve(config
.getTemplateDirectory().toString());
final Path templatePath = vfsService.resolveDataFile(config
.getTemplateDirectory());
log.info("Scanning {} for XML templates", templatePath);