Sync with L2jServer HighFive Mar 25th 2015.

This commit is contained in:
MobiusDev
2015-03-25 06:48:51 +00:00
parent e0c66b1412
commit 82606870c0
194 changed files with 2619 additions and 2869 deletions

View File

@@ -378,8 +378,8 @@ public class ClanTable
public void storeclanswars(int clanId1, int clanId2)
{
final L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
final L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
final L2Clan clan1 = getClan(clanId1);
final L2Clan clan2 = getClan(clanId2);
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarStart(clan1, clan2));
@@ -419,8 +419,8 @@ public class ClanTable
public void deleteclanswars(int clanId1, int clanId2)
{
L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
L2Clan clan1 = getClan(clanId1);
L2Clan clan2 = getClan(clanId2);
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));

View File

@@ -1,644 +0,0 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.data.xml;
import java.io.File;
import java.io.FileFilter;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXParseException;
import com.l2jserver.Config;
import com.l2jserver.util.file.filter.XMLFilter;
/**
* Abstract class for XML parsers.
* @author Zoey76
*/
public interface IXmlReader
{
static final Logger LOGGER = Logger.getLogger(IXmlReader.class.getName());
static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
/** The default file filter, ".xml" files only. */
static final XMLFilter XML_FILTER = new XMLFilter();
/**
* This method can be used to load/reload the data.<br>
* It's highly recommended to clear the data storage, either the list or map.
*/
public void load();
/**
* Wrapper for {@link #parseFile(File)} method.
* @param path the relative path to the datapack root of the XML file to parse.
*/
default void parseDatapackFile(String path)
{
parseFile(new File(Config.DATAPACK_ROOT, path));
}
/**
* Parses a single XML file.<br>
* If the file was successfully parsed, call {@link #parseDocument(Document, File)} for the parsed document.<br>
* <b>Validation is enforced.</b>
* @param f the XML file to parse.
*/
default void parseFile(File f)
{
if (!getCurrentFileFilter().accept(f))
{
LOGGER.warning(getClass().getSimpleName() + ": Could not parse " + f.getName() + " is not a file or it doesn't exist!");
return;
}
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(true);
dbf.setIgnoringComments(true);
try
{
dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
final DocumentBuilder db = dbf.newDocumentBuilder();
db.setErrorHandler(new XMLErrorHandler());
parseDocument(db.parse(f), f);
}
catch (SAXParseException e)
{
LOGGER.warning(getClass().getSimpleName() + ": Could not parse file " + f.getName() + " at line " + e.getLineNumber() + ", column " + e.getColumnNumber() + ": " + e.getMessage());
return;
}
catch (Exception e)
{
LOGGER.warning(getClass().getSimpleName() + ": Could not parse file " + f.getName() + ": " + e.getMessage());
return;
}
}
/**
* Wrapper for {@link #parseDirectory(File, boolean)}.
* @param file the path to the directory where the XML files are.
* @return {@code false} if it fails to find the directory, {@code true} otherwise.
*/
default boolean parseDirectory(File file)
{
return parseDirectory(file, false);
}
/**
* Loads all XML files from {@code path} and calls {@link #parseFile(File)} for each one of them.
* @param dir the directory object to scan.
* @param recursive parses all sub folders if there is.
* @return {@code false} if it fails to find the directory, {@code true} otherwise.
*/
default boolean parseDirectory(File dir, boolean recursive)
{
if (!dir.exists())
{
LOGGER.warning(getClass().getSimpleName() + ": Folder " + dir.getAbsolutePath() + " doesn't exist!");
return false;
}
final File[] listOfFiles = dir.listFiles();
for (File f : listOfFiles)
{
if (recursive && f.isDirectory())
{
parseDirectory(f, recursive);
}
else if (getCurrentFileFilter().accept(f))
{
parseFile(f);
}
}
return true;
}
/**
* Wrapper for {@link #parseDirectory(File, boolean)}.
* @param path the path to the directory where the XML files are
* @param recursive parses all sub folders if there is
* @return {@code false} if it fails to find the directory, {@code true} otherwise
*/
default boolean parseDatapackDirectory(String path, boolean recursive)
{
return parseDirectory(new File(Config.DATAPACK_ROOT, path), recursive);
}
/**
* Abstract method that when implemented will parse the current document.<br>
* Is expected to be call from {@link #parseFile(File)}.
* @param doc the current document to parse
* @param f the current file
*/
default void parseDocument(Document doc, File f)
{
parseDocument(doc);
}
/**
* Abstract method that when implemented will parse the current document.<br>
* Is expected to be call from {@link #parseFile(File)}.
* @param doc the current document to parse
*/
default void parseDocument(Document doc)
{
LOGGER.severe("Parser not implemented!");
}
/**
* Parses a boolean value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Boolean parseBoolean(Node node, Boolean defaultValue)
{
return node != null ? Boolean.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a boolean value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Boolean parseBoolean(Node node)
{
return parseBoolean(node, null);
}
/**
* Parses a boolean value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Boolean parseBoolean(NamedNodeMap attrs, String name)
{
return parseBoolean(attrs.getNamedItem(name));
}
/**
* Parses a boolean value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Boolean parseBoolean(NamedNodeMap attrs, String name, Boolean defaultValue)
{
return parseBoolean(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a byte value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Byte parseByte(Node node, Byte defaultValue)
{
return node != null ? Byte.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a byte value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Byte parseByte(Node node)
{
return parseByte(node, null);
}
/**
* Parses a byte value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Byte parseByte(NamedNodeMap attrs, String name)
{
return parseByte(attrs.getNamedItem(name));
}
/**
* Parses a byte value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Byte parseByte(NamedNodeMap attrs, String name, Byte defaultValue)
{
return parseByte(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a short value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Short parseShort(Node node, Short defaultValue)
{
return node != null ? Short.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a short value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Short parseShort(Node node)
{
return parseShort(node, null);
}
/**
* Parses a short value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Short parseShort(NamedNodeMap attrs, String name)
{
return parseShort(attrs.getNamedItem(name));
}
/**
* Parses a short value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Short parseShort(NamedNodeMap attrs, String name, Short defaultValue)
{
return parseShort(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses an int value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default int parseInt(Node node, Integer defaultValue)
{
return node != null ? Integer.parseInt(node.getNodeValue()) : defaultValue;
}
/**
* Parses an int value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default int parseInt(Node node)
{
return parseInt(node, -1);
}
/**
* Parses an integer value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Integer parseInteger(Node node, Integer defaultValue)
{
return node != null ? Integer.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses an integer value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Integer parseInteger(Node node)
{
return parseInteger(node, null);
}
/**
* Parses an integer value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Integer parseInteger(NamedNodeMap attrs, String name)
{
return parseInteger(attrs.getNamedItem(name));
}
/**
* Parses an integer value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Integer parseInteger(NamedNodeMap attrs, String name, Integer defaultValue)
{
return parseInteger(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a long value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Long parseLong(Node node, Long defaultValue)
{
return node != null ? Long.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a long value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Long parseLong(Node node)
{
return parseLong(node, null);
}
/**
* Parses a long value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Long parseLong(NamedNodeMap attrs, String name)
{
return parseLong(attrs.getNamedItem(name));
}
/**
* Parses a long value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Long parseLong(NamedNodeMap attrs, String name, Long defaultValue)
{
return parseLong(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a float value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Float parseFloat(Node node, Float defaultValue)
{
return node != null ? Float.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a float value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Float parseFloat(Node node)
{
return parseFloat(node, null);
}
/**
* Parses a float value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Float parseFloat(NamedNodeMap attrs, String name)
{
return parseFloat(attrs.getNamedItem(name));
}
/**
* Parses a float value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Float parseFloat(NamedNodeMap attrs, String name, Float defaultValue)
{
return parseFloat(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a double value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Double parseDouble(Node node, Double defaultValue)
{
return node != null ? Double.valueOf(node.getNodeValue()) : defaultValue;
}
/**
* Parses a double value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Double parseDouble(Node node)
{
return parseDouble(node, null);
}
/**
* Parses a double value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default Double parseDouble(NamedNodeMap attrs, String name)
{
return parseDouble(attrs.getNamedItem(name));
}
/**
* Parses a double value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default Double parseDouble(NamedNodeMap attrs, String name, Double defaultValue)
{
return parseDouble(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses a string value.
* @param node the node to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default String parseString(Node node, String defaultValue)
{
return node != null ? node.getNodeValue() : defaultValue;
}
/**
* Parses a string value.
* @param node the node to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default String parseString(Node node)
{
return parseString(node, null);
}
/**
* Parses a string value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @return if the node is not null, the value of the parsed node, otherwise null
*/
default String parseString(NamedNodeMap attrs, String name)
{
return parseString(attrs.getNamedItem(name));
}
/**
* Parses a string value.
* @param attrs the attributes
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null, the value of the parsed node, otherwise the default value
*/
default String parseString(NamedNodeMap attrs, String name, String defaultValue)
{
return parseString(attrs.getNamedItem(name), defaultValue);
}
/**
* Parses an enumerated value.
* @param <T> the enumerated type
* @param node the node to parse
* @param clazz the class of the enumerated
* @param defaultValue the default value
* @return if the node is not null and the node value is valid the parsed value, otherwise the default value
*/
default <T extends Enum<T>> T parseEnum(Node node, Class<T> clazz, T defaultValue)
{
if (node == null)
{
return defaultValue;
}
try
{
return Enum.valueOf(clazz, node.getNodeValue());
}
catch (IllegalArgumentException e)
{
LOGGER.warning("Invalid value specified for node: " + node.getNodeName() + " specified value: " + node.getNodeValue() + " should be enum value of \"" + clazz.getSimpleName() + "\" using default value: " + defaultValue);
return defaultValue;
}
}
/**
* Parses an enumerated value.
* @param <T> the enumerated type
* @param node the node to parse
* @param clazz the class of the enumerated
* @return if the node is not null and the node value is valid the parsed value, otherwise null
*/
default <T extends Enum<T>> T parseEnum(Node node, Class<T> clazz)
{
return parseEnum(node, clazz, null);
}
/**
* Parses an enumerated value.
* @param <T> the enumerated type
* @param attrs the attributes
* @param clazz the class of the enumerated
* @param name the name of the attribute to parse
* @return if the node is not null and the node value is valid the parsed value, otherwise null
*/
default <T extends Enum<T>> T parseEnum(NamedNodeMap attrs, Class<T> clazz, String name)
{
return parseEnum(attrs.getNamedItem(name), clazz);
}
/**
* Parses an enumerated value.
* @param <T> the enumerated type
* @param attrs the attributes
* @param clazz the class of the enumerated
* @param name the name of the attribute to parse
* @param defaultValue the default value
* @return if the node is not null and the node value is valid the parsed value, otherwise the default value
*/
default <T extends Enum<T>> T parseEnum(NamedNodeMap attrs, Class<T> clazz, String name, T defaultValue)
{
return parseEnum(attrs.getNamedItem(name), clazz, defaultValue);
}
/**
* Gets the current file filter.
* @return the current file filter
*/
default FileFilter getCurrentFileFilter()
{
return XML_FILTER;
}
/**
* Simple XML error handler.
* @author Zoey76
*/
static class XMLErrorHandler implements ErrorHandler
{
@Override
public void warning(SAXParseException e) throws SAXParseException
{
throw e;
}
@Override
public void error(SAXParseException e) throws SAXParseException
{
throw e;
}
@Override
public void fatalError(SAXParseException e) throws SAXParseException
{
throw e;
}
}
}

View File

@@ -27,8 +27,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.holders.RangeAbilityPointsHolder;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -30,7 +30,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.L2AccessLevel;
import com.l2jserver.gameserver.model.L2AdminCommandAccessRight;
import com.l2jserver.gameserver.model.StatsSet;
@@ -38,6 +37,7 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads administrator access levels and commands.

View File

@@ -26,13 +26,13 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.items.appearance.AppearanceStone;
import com.l2jserver.gameserver.model.items.appearance.AppearanceTargetType;
import com.l2jserver.gameserver.model.items.type.CrystalType;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid
@@ -109,7 +109,7 @@ public class AppearanceItemData implements IXmlReader
}
case "bodyPart":
{
final int part = ItemTable._slots.get(c.getTextContent());
final int part = ItemTable.SLOTS.get(c.getTextContent());
stone.addBodyPart(part);
break;
}

View File

@@ -25,10 +25,10 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.L2ArmorSet;
import com.l2jserver.gameserver.model.holders.ArmorsetSkillHolder;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads armor set bonuses.

View File

@@ -25,12 +25,12 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.enums.Sex;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.beautyshop.BeautyData;
import com.l2jserver.gameserver.model.beautyshop.BeautyItem;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author Sdw

View File

@@ -33,11 +33,11 @@ import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.model.buylist.L2BuyList;
import com.l2jserver.gameserver.model.buylist.Product;
import com.l2jserver.gameserver.model.items.L2Item;
import com.l2jserver.util.data.xml.IXmlReader;
import com.l2jserver.util.file.filter.NumericNameFilter;
/**

View File

@@ -29,9 +29,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.CastleSide;
import com.l2jserver.gameserver.model.holders.CastleSpawnHolder;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author St3eT

View File

@@ -29,8 +29,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.CategoryType;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads the category data with Class or NPC IDs.

View File

@@ -25,9 +25,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.model.base.ClassInfo;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads the the list of classes and it's info.

View File

@@ -30,13 +30,13 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.instancemanager.InstanceManager;
import com.l2jserver.gameserver.instancemanager.MapRegionManager;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
import com.l2jserver.gameserver.model.actor.templates.L2DoorTemplate;
import com.l2jserver.gameserver.pathfinding.AbstractNodeLoc;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads doors.

View File

@@ -26,11 +26,11 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.items.enchant.EnchantScroll;
import com.l2jserver.gameserver.model.items.enchant.EnchantSupportItem;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads item enchant data.

View File

@@ -26,7 +26,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.model.holders.RangeChanceHolder;
import com.l2jserver.gameserver.model.items.L2Item;
@@ -34,6 +33,7 @@ import com.l2jserver.gameserver.model.items.enchant.EnchantItemGroup;
import com.l2jserver.gameserver.model.items.enchant.EnchantRateItem;
import com.l2jserver.gameserver.model.items.enchant.EnchantScrollGroup;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid
@@ -117,7 +117,7 @@ public final class EnchantItemGroupsData implements IXmlReader
final NamedNodeMap attrs = z.getAttributes();
if (attrs.getNamedItem("slot") != null)
{
rateGroup.addSlot(ItemTable._slots.get(parseString(attrs, "slot")));
rateGroup.addSlot(ItemTable.SLOTS.get(parseString(attrs, "slot")));
}
if (attrs.getNamedItem("magicWeapon") != null)
{

View File

@@ -27,7 +27,6 @@ import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.enums.StatFunction;
import com.l2jserver.gameserver.model.items.L2Item;
@@ -35,6 +34,7 @@ import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.items.type.CrystalType;
import com.l2jserver.gameserver.model.stats.Stats;
import com.l2jserver.gameserver.model.stats.functions.FuncTemplate;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Enchant HP Bonus Data.

View File

@@ -25,10 +25,10 @@ import java.util.logging.Level;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.options.EnchantOptions;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -27,13 +27,13 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.L2EnchantSkillGroup;
import com.l2jserver.gameserver.model.L2EnchantSkillGroup.EnchantSkillHolder;
import com.l2jserver.gameserver.model.L2EnchantSkillLearn;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Enchant Groups information.

View File

@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Experience points for each level for players and pets.

View File

@@ -27,9 +27,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.fishing.L2Fish;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Fish information.

View File

@@ -25,9 +25,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.fishing.L2FishingMonster;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Fishing Monsters information.

View File

@@ -25,9 +25,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.fishing.L2FishingRod;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Fishing Rods information.

View File

@@ -27,10 +27,10 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.model.items.L2Henna;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the henna related information.<br>

View File

@@ -24,8 +24,8 @@ import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.GameTimeController;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class load, holds and calculates the hit condition bonuses.

View File

@@ -28,10 +28,10 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.model.items.PcItemTemplate;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Initial Equipment information.<br>

View File

@@ -27,7 +27,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.MacroType;
import com.l2jserver.gameserver.enums.ShortcutType;
import com.l2jserver.gameserver.model.Macro;
@@ -37,6 +36,7 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.serverpackets.ShortCutRegister;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Initial Shortcuts information.<br>

View File

@@ -26,9 +26,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.CrystalizationData;
import com.l2jserver.gameserver.model.holders.ItemChanceHolder;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -26,7 +26,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -31,7 +31,6 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -45,6 +44,7 @@ import com.l2jserver.gameserver.network.serverpackets.MultiSellList;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
import com.l2jserver.util.file.filter.NumericNameFilter;
public final class MultisellData implements IXmlReader

View File

@@ -36,7 +36,6 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.enums.AISkillScope;
import com.l2jserver.gameserver.model.StatsSet;
@@ -51,6 +50,7 @@ import com.l2jserver.gameserver.model.holders.MinionHolder;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* NPC data parser.

View File

@@ -26,13 +26,13 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.options.Options;
import com.l2jserver.gameserver.model.options.OptionsSkillHolder;
import com.l2jserver.gameserver.model.options.OptionsSkillType;
import com.l2jserver.gameserver.model.stats.Stats;
import com.l2jserver.gameserver.model.stats.functions.FuncTemplate;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -25,11 +25,11 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.MountType;
import com.l2jserver.gameserver.model.L2PetData;
import com.l2jserver.gameserver.model.L2PetLevelData;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class parse and hold all pet parameters.<br>

View File

@@ -28,11 +28,11 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.templates.L2PcTemplate;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Loads player's base stats.

View File

@@ -24,7 +24,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class holds the Player Xp Percent Lost Data for each level for players.

View File

@@ -27,7 +27,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -35,6 +34,7 @@ import com.l2jserver.gameserver.model.items.L2Item;
import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup;
import com.l2jserver.gameserver.model.primeshop.PrimeShopItem;
import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRProductInfo;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author Gnacik, UnAfraid

View File

@@ -27,12 +27,12 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.L2RecipeInstance;
import com.l2jserver.gameserver.model.L2RecipeList;
import com.l2jserver.gameserver.model.L2RecipeStatInstance;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* The Class RecipeData.

View File

@@ -26,7 +26,7 @@ import java.util.logging.Level;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author NosBit

View File

@@ -28,7 +28,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.VehiclePathPoint;
@@ -37,6 +36,7 @@ import com.l2jserver.gameserver.model.actor.templates.L2CharTemplate;
import com.l2jserver.gameserver.model.shuttle.L2ShuttleData;
import com.l2jserver.gameserver.model.shuttle.L2ShuttleEngine;
import com.l2jserver.gameserver.model.shuttle.L2ShuttleStop;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -27,10 +27,10 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.SiegeScheduleDate;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -26,8 +26,8 @@ import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Holds all skill learn data for all npcs.

View File

@@ -36,7 +36,6 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.enums.CategoryType;
import com.l2jserver.gameserver.enums.Race;
@@ -54,6 +53,7 @@ import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.interfaces.ISkillsHolder;
import com.l2jserver.gameserver.model.skills.CommonSkill;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class loads and manage the characters and pledges skills trees.<br>

View File

@@ -26,10 +26,10 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2StaticObjectInstance;
import com.l2jserver.gameserver.model.actor.templates.L2CharTemplate;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* This class loads and holds all static object data.

View File

@@ -26,11 +26,11 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.teleporter.TeleportHolder;
import com.l2jserver.gameserver.model.teleporter.TeleportLocation;
import com.l2jserver.gameserver.model.teleporter.TeleportType;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -26,7 +26,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.transform.Transform;
@@ -36,6 +35,7 @@ import com.l2jserver.gameserver.model.holders.AdditionalItemHolder;
import com.l2jserver.gameserver.model.holders.AdditionalSkillHolder;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.network.serverpackets.ExBasicActionList;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -27,8 +27,8 @@ import java.util.logging.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.ActionKey;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* UI Data parser.