Sync with L2jUnity (7db5b4f).
This commit is contained in:
@@ -17,18 +17,14 @@
|
||||
package com.l2jmobius.gameserver.engines;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.file.filter.XMLFilter;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.engines.items.DocumentItem;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author mkizub
|
||||
@@ -38,7 +34,6 @@ public class DocumentEngine
|
||||
private static final Logger LOGGER = Logger.getLogger(DocumentEngine.class.getName());
|
||||
|
||||
private final List<File> _itemFiles = new LinkedList<>();
|
||||
private final List<File> _skillFiles = new LinkedList<>();
|
||||
|
||||
public static DocumentEngine getInstance()
|
||||
{
|
||||
@@ -52,11 +47,6 @@ public class DocumentEngine
|
||||
{
|
||||
hashFiles("data/stats/items/custom", _itemFiles);
|
||||
}
|
||||
hashFiles("data/stats/skills", _skillFiles);
|
||||
if (Config.CUSTOM_SKILLS_LOAD)
|
||||
{
|
||||
hashFiles("data/stats/skills/custom", _skillFiles);
|
||||
}
|
||||
}
|
||||
|
||||
private void hashFiles(String dirname, List<File> hash)
|
||||
@@ -74,35 +64,6 @@ public class DocumentEngine
|
||||
}
|
||||
}
|
||||
|
||||
public List<Skill> loadSkills(File file)
|
||||
{
|
||||
if (file == null)
|
||||
{
|
||||
LOGGER.warning("Skill file not found.");
|
||||
return null;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public void loadAllSkills(Map<Integer, Skill> allSkills)
|
||||
{
|
||||
int count = 0;
|
||||
for (File file : _skillFiles)
|
||||
{
|
||||
final List<Skill> s = loadSkills(file);
|
||||
if (s == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (Skill skill : s)
|
||||
{
|
||||
allSkills.put(SkillData.getSkillHashCode(skill), skill);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
LOGGER.info("Loaded " + count + " Skill templates from XML files.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return created items
|
||||
* @return List of {@link L2Item}
|
||||
|
Reference in New Issue
Block a user