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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user