Replaced qualified names with simple names.
This commit is contained in:
@@ -174,8 +174,8 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
currentFileWindow = fileopen.getSelectedFile();
|
currentFileWindow = fileopen.getSelectedFile();
|
||||||
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_PACK", currentFileWindow.getPath());
|
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_PACK", currentFileWindow.getPath());
|
||||||
L2ClientDat.addLogConsole("---------------------------------------", true);
|
addLogConsole("---------------------------------------", true);
|
||||||
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MassTxtPacker.getInstance().pack(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getEncryptKey(String.valueOf(jComboBoxEncrypt.getSelectedItem())));
|
MassTxtPacker.getInstance().pack(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getEncryptKey(String.valueOf(jComboBoxEncrypt.getSelectedItem())));
|
||||||
@@ -199,8 +199,8 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
currentFileWindow = fileopen.getSelectedFile();
|
currentFileWindow = fileopen.getSelectedFile();
|
||||||
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_UNPACK", currentFileWindow.getPath());
|
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_UNPACK", currentFileWindow.getPath());
|
||||||
L2ClientDat.addLogConsole("---------------------------------------", true);
|
addLogConsole("---------------------------------------", true);
|
||||||
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MassTxtUnpacker.getInstance().unpack(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())));
|
MassTxtUnpacker.getInstance().unpack(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())));
|
||||||
@@ -224,8 +224,8 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
currentFileWindow = fileopen.getSelectedFile();
|
currentFileWindow = fileopen.getSelectedFile();
|
||||||
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY", currentFileWindow.getPath());
|
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY", currentFileWindow.getPath());
|
||||||
L2ClientDat.addLogConsole("---------------------------------------", true);
|
addLogConsole("---------------------------------------", true);
|
||||||
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MassRecryptor.getInstance().recrypt(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())), CryptVersionParser.getInstance().getEncryptKey(String.valueOf(jComboBoxEncrypt.getSelectedItem())));
|
MassRecryptor.getInstance().recrypt(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow.getPath(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())), CryptVersionParser.getInstance().getEncryptKey(String.valueOf(jComboBoxEncrypt.getSelectedItem())));
|
||||||
@@ -251,8 +251,8 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
currentFileWindow = fileopen.getSelectedFile();
|
currentFileWindow = fileopen.getSelectedFile();
|
||||||
ConfigWindow.save("LAST_FILE_SELECTED", currentFileWindow.getAbsolutePath());
|
ConfigWindow.save("LAST_FILE_SELECTED", currentFileWindow.getAbsolutePath());
|
||||||
L2ClientDat.addLogConsole("---------------------------------------", true);
|
addLogConsole("---------------------------------------", true);
|
||||||
L2ClientDat.addLogConsole("Open file: " + currentFileWindow.getName(), true);
|
addLogConsole("Open file: " + currentFileWindow.getName(), true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OpenDat.start(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow, currentFileWindow.getName(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())));
|
OpenDat.start(String.valueOf(jComboBoxChronicle.getSelectedItem()), currentFileWindow, currentFileWindow.getName(), CryptVersionParser.getInstance().getDecryptKey(String.valueOf(jComboBoxDecrypt.getSelectedItem())));
|
||||||
@@ -289,13 +289,13 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
// empty catch block
|
// empty catch block
|
||||||
}
|
}
|
||||||
L2ClientDat.addLogConsole("---------------------------------------", true);
|
addLogConsole("---------------------------------------", true);
|
||||||
L2ClientDat.addLogConsole("Saved: " + f.getPath(), true);
|
addLogConsole("Saved: " + f.getPath(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
L2ClientDat.addLogConsole("No open file!", true);
|
addLogConsole("No open file!", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ public class L2ClientDat extends JFrame
|
|||||||
{
|
{
|
||||||
if (currentFileWindow == null)
|
if (currentFileWindow == null)
|
||||||
{
|
{
|
||||||
L2ClientDat.addLogConsole("Error saving dat. No file name.", true);
|
addLogConsole("Error saving dat. No file name.", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
byte[] buff = null;
|
byte[] buff = null;
|
||||||
@@ -322,7 +322,7 @@ public class L2ClientDat extends JFrame
|
|||||||
buff = DescriptorWriter.parseData(currentFileWindow, crypter, desc, textPaneMain.getText());
|
buff = DescriptorWriter.parseData(currentFileWindow, crypter, desc, textPaneMain.getText());
|
||||||
GameDataName.getInstance().checkAndUpdate(currentFileWindow.getParent(), crypter);
|
GameDataName.getInstance().checkAndUpdate(currentFileWindow.getParent(), crypter);
|
||||||
}
|
}
|
||||||
L2ClientDat.addLogConsole("Not found the structure of the file: " + currentFileWindow.getName(), true);
|
addLogConsole("Not found the structure of the file: " + currentFileWindow.getName(), true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -337,7 +337,7 @@ public class L2ClientDat extends JFrame
|
|||||||
}
|
}
|
||||||
if (buff == null)
|
if (buff == null)
|
||||||
{
|
{
|
||||||
L2ClientDat.addLogConsole("buff == null.", true);
|
addLogConsole("buff == null.", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
@@ -352,7 +352,7 @@ public class L2ClientDat extends JFrame
|
|||||||
DebugUtil.getLogger().error(e.getMessage(), e);
|
DebugUtil.getLogger().error(e.getMessage(), e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
L2ClientDat.addLogConsole("Packed successfully.", true);
|
addLogConsole("Packed successfully.", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveComboBox(JComboBox<?> jComboBox, String param)
|
private void saveComboBox(JComboBox<?> jComboBox, String param)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class ConfigWindow extends ConfigParser
|
|||||||
FileOutputStream output = new FileOutputStream(PATH);
|
FileOutputStream output = new FileOutputStream(PATH);
|
||||||
props.store(output, "Saved settings");
|
props.store(output, "Saved settings");
|
||||||
output.close();
|
output.close();
|
||||||
ConfigWindow.load();
|
load();
|
||||||
}
|
}
|
||||||
catch (Exception props)
|
catch (Exception props)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class ByteReader
|
|||||||
|
|
||||||
public static int readUInt(ByteBuffer buffer)
|
public static int readUInt(ByteBuffer buffer)
|
||||||
{
|
{
|
||||||
return ByteReader.readInt(buffer);
|
return readInt(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static short readShort(ByteBuffer buffer)
|
public static short readShort(ByteBuffer buffer)
|
||||||
@@ -135,12 +135,12 @@ public class ByteReader
|
|||||||
{
|
{
|
||||||
a = "0" + a;
|
a = "0" + a;
|
||||||
}
|
}
|
||||||
return a + ByteReader.readRGB(buffer);
|
return a + readRGB(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String readUtfString(ByteBuffer buffer, boolean isRaw) throws Exception
|
public static String readUtfString(ByteBuffer buffer, boolean isRaw) throws Exception
|
||||||
{
|
{
|
||||||
int size = ByteReader.readInt(buffer);
|
int size = readInt(buffer);
|
||||||
if (size <= 0)
|
if (size <= 0)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
@@ -162,19 +162,19 @@ public class ByteReader
|
|||||||
{
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return ByteReader.checkAndReplaceNewLine(isRaw, new String(new String(bytes, "Unicode").getBytes("UTF-8"), "UTF-8"));
|
return checkAndReplaceNewLine(isRaw, new String(new String(bytes, "Unicode").getBytes("UTF-8"), "UTF-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String readString(ByteBuffer input, boolean isRaw) throws IOException
|
public static String readString(ByteBuffer input, boolean isRaw) throws IOException
|
||||||
{
|
{
|
||||||
int len = ByteReader.readCompactInt(input);
|
int len = readCompactInt(input);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
byte[] bytes = new byte[len > 0 ? len : -2 * len];
|
byte[] bytes = new byte[len > 0 ? len : -2 * len];
|
||||||
input.get(bytes);
|
input.get(bytes);
|
||||||
return ByteReader.checkAndReplaceNewLine(isRaw, new String(bytes, 0, bytes.length - (len > 0 ? 1 : 2), len > 0 ? defaultCharset : utf16leCharset).intern());
|
return checkAndReplaceNewLine(isRaw, new String(bytes, 0, bytes.length - (len > 0 ? 1 : 2), len > 0 ? defaultCharset : utf16leCharset).intern());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String checkAndReplaceNewLine(boolean isRaw, String str)
|
private static String checkAndReplaceNewLine(boolean isRaw, String str)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class ByteWriter
|
|||||||
|
|
||||||
public static Buffer writeCompactInt(int count)
|
public static Buffer writeCompactInt(int count)
|
||||||
{
|
{
|
||||||
byte[] b = ByteWriter.compactIntToByteArray(count);
|
byte[] b = compactIntToByteArray(count);
|
||||||
ByteBuffer buffer = ByteBuffer.allocate(b.length).order(BYTE_ORDER);
|
ByteBuffer buffer = ByteBuffer.allocate(b.length).order(BYTE_ORDER);
|
||||||
buffer.put(b);
|
buffer.put(b);
|
||||||
return buffer;
|
return buffer;
|
||||||
@@ -97,7 +97,7 @@ public class ByteWriter
|
|||||||
public static Buffer writeRGBA(String rgba)
|
public static Buffer writeRGBA(String rgba)
|
||||||
{
|
{
|
||||||
ByteBuffer buffer = ByteBuffer.allocate(4).order(BYTE_ORDER);
|
ByteBuffer buffer = ByteBuffer.allocate(4).order(BYTE_ORDER);
|
||||||
buffer.put((byte[]) ByteWriter.writeRGB(rgba.substring(0, 6)).array());
|
buffer.put((byte[]) writeRGB(rgba.substring(0, 6)).array());
|
||||||
buffer.put((byte) Integer.parseInt(rgba.substring(6, 8), 16));
|
buffer.put((byte) Integer.parseInt(rgba.substring(6, 8), 16));
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ public class ByteWriter
|
|||||||
}
|
}
|
||||||
if (!isRaw)
|
if (!isRaw)
|
||||||
{
|
{
|
||||||
str = ByteWriter.checkAndReplaceNewLine(str);
|
str = checkAndReplaceNewLine(str);
|
||||||
size = str.length();
|
size = str.length();
|
||||||
}
|
}
|
||||||
ByteBuffer buffer = ByteBuffer.allocate((size * 2) + 4).order(BYTE_ORDER);
|
ByteBuffer buffer = ByteBuffer.allocate((size * 2) + 4).order(BYTE_ORDER);
|
||||||
@@ -127,16 +127,16 @@ public class ByteWriter
|
|||||||
{
|
{
|
||||||
if ((s == null) || s.isEmpty())
|
if ((s == null) || s.isEmpty())
|
||||||
{
|
{
|
||||||
return ByteWriter.writeCompactInt(0);
|
return writeCompactInt(0);
|
||||||
}
|
}
|
||||||
if (!isRaw)
|
if (!isRaw)
|
||||||
{
|
{
|
||||||
s = ByteWriter.checkAndReplaceNewLine(s);
|
s = checkAndReplaceNewLine(s);
|
||||||
}
|
}
|
||||||
s = s + '\u0000';
|
s = s + '\u0000';
|
||||||
boolean def = defaultCharset.newEncoder().canEncode(s);
|
boolean def = defaultCharset.newEncoder().canEncode(s);
|
||||||
byte[] bytes = s.getBytes(def ? defaultCharset : utf16leCharset);
|
byte[] bytes = s.getBytes(def ? defaultCharset : utf16leCharset);
|
||||||
byte[] bSize = ByteWriter.compactIntToByteArray(def ? bytes.length : (-bytes.length) / 2);
|
byte[] bSize = compactIntToByteArray(def ? bytes.length : (-bytes.length) / 2);
|
||||||
ByteBuffer buffer = ByteBuffer.allocate(bytes.length + bSize.length).order(BYTE_ORDER);
|
ByteBuffer buffer = ByteBuffer.allocate(bytes.length + bSize.length).order(BYTE_ORDER);
|
||||||
buffer.put(bSize);
|
buffer.put(bSize);
|
||||||
buffer.put(bytes);
|
buffer.put(bytes);
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ public class Util
|
|||||||
{
|
{
|
||||||
if ((counter % 16) == 0)
|
if ((counter % 16) == 0)
|
||||||
{
|
{
|
||||||
result.append(Util.fillHex(i, 4) + ": ");
|
result.append(fillHex(i, 4) + ": ");
|
||||||
}
|
}
|
||||||
result.append(Util.fillHex(data[i] & 255, 2) + " ");
|
result.append(fillHex(data[i] & 255, 2) + " ");
|
||||||
if (++counter != 16)
|
if (++counter != 16)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@@ -130,7 +130,7 @@ public class Util
|
|||||||
|
|
||||||
public static String printData(byte[] blop)
|
public static String printData(byte[] blop)
|
||||||
{
|
{
|
||||||
return Util.printData(blop, blop.length);
|
return printData(blop, blop.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<File> loadFiles(String dir, String prefix)
|
public static List<File> loadFiles(String dir, String prefix)
|
||||||
@@ -225,7 +225,7 @@ public class Util
|
|||||||
{
|
{
|
||||||
byte[] data = new byte[buf.remaining()];
|
byte[] data = new byte[buf.remaining()];
|
||||||
buf.get(data);
|
buf.get(data);
|
||||||
String hex = Util.printData(data, data.length);
|
String hex = printData(data, data.length);
|
||||||
buf.position(buf.position() - data.length);
|
buf.position(buf.position() - data.length);
|
||||||
return hex;
|
return hex;
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ public class Util
|
|||||||
DiagnosticCollector diagnostics = new DiagnosticCollector();
|
DiagnosticCollector diagnostics = new DiagnosticCollector();
|
||||||
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
||||||
StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
|
StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
|
||||||
Iterable<? extends JavaFileObject> compilationUnit = fileManager.getJavaFileObjectsFromFiles(Util.loadFiles(sourceFile, ".java"));
|
Iterable<? extends JavaFileObject> compilationUnit = fileManager.getJavaFileObjectsFromFiles(loadFiles(sourceFile, ".java"));
|
||||||
JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnit);
|
JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnit);
|
||||||
if (!task.call().booleanValue())
|
if (!task.call().booleanValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class CryptVersionParser
|
|||||||
|
|
||||||
private CryptVersionParser()
|
private CryptVersionParser()
|
||||||
{
|
{
|
||||||
CryptVersionParser.parseCryptVersion();
|
parseCryptVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void parseCryptVersion()
|
private static void parseCryptVersion()
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class DescriptorWriter
|
|||||||
}
|
}
|
||||||
if (desc.isRawData())
|
if (desc.isRawData())
|
||||||
{
|
{
|
||||||
Buffer result = DescriptorWriter.parseNodeValue(currentFile, crypter, data, desc.getNodes().get(0), true);
|
Buffer result = parseNodeValue(currentFile, crypter, data, desc.getNodes().get(0), true);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
stream.write((byte[]) result.array());
|
stream.write((byte[]) result.array());
|
||||||
@@ -92,7 +92,7 @@ public class DescriptorWriter
|
|||||||
ByteBuffer buffer = ByteBuffer.allocateDirect(data.length() * 2);
|
ByteBuffer buffer = ByteBuffer.allocateDirect(data.length() * 2);
|
||||||
String lines = data.replace("\r\n", "\t");
|
String lines = data.replace("\r\n", "\t");
|
||||||
HashMap<ParamNode, Integer> counters = new HashMap<>();
|
HashMap<ParamNode, Integer> counters = new HashMap<>();
|
||||||
DescriptorWriter.packData(currentFile, crypter, buffer, lines, counters, new HashMap<String, String>(), new HashMap<ParamNode, String>(), desc.getNodes());
|
packData(currentFile, crypter, buffer, lines, counters, new HashMap<String, String>(), new HashMap<ParamNode, String>(), desc.getNodes());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
@@ -133,22 +133,22 @@ public class DescriptorWriter
|
|||||||
{
|
{
|
||||||
list.add(m.group(1));
|
list.add(m.group(1));
|
||||||
}
|
}
|
||||||
DescriptorWriter.writeSize(currentFile, crypter, buffer, counters, node, list.size());
|
writeSize(currentFile, crypter, buffer, counters, node, list.size());
|
||||||
for (String str : list)
|
for (String str : list)
|
||||||
{
|
{
|
||||||
paramMap.putAll(Util.stringToMap(str));
|
paramMap.putAll(Util.stringToMap(str));
|
||||||
DescriptorWriter.packData(currentFile, crypter, buffer, str, counters, paramMap, mapData, node.getSubNodes());
|
packData(currentFile, crypter, buffer, str, counters, paramMap, mapData, node.getSubNodes());
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
param = DescriptorWriter.getDataString(node, node.getName(), paramMap, mapData);
|
param = getDataString(node, node.getName(), paramMap, mapData);
|
||||||
if (param == null)
|
if (param == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Error getDataString == null node: " + node.getName());
|
throw new Exception("Error getDataString == null node: " + node.getName());
|
||||||
}
|
}
|
||||||
if (param.isEmpty() || param.equals("{}"))
|
if (param.isEmpty() || param.equals("{}"))
|
||||||
{
|
{
|
||||||
DescriptorWriter.writeSize(currentFile, crypter, buffer, counters, node, 0);
|
writeSize(currentFile, crypter, buffer, counters, node, 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<String> subParams = Util.splitList(param);
|
List<String> subParams = Util.splitList(param);
|
||||||
@@ -157,7 +157,7 @@ public class DescriptorWriter
|
|||||||
{
|
{
|
||||||
throw new Exception("Wrong static cycle count for cycle: " + node.getName() + " size: " + subParams.size() + " params: " + Arrays.toString(subParams.toArray()));
|
throw new Exception("Wrong static cycle count for cycle: " + node.getName() + " size: " + subParams.size() + " params: " + Arrays.toString(subParams.toArray()));
|
||||||
}
|
}
|
||||||
DescriptorWriter.writeSize(currentFile, crypter, buffer, counters, node, cycleSize);
|
writeSize(currentFile, crypter, buffer, counters, node, cycleSize);
|
||||||
int nPramNode = 0;
|
int nPramNode = 0;
|
||||||
int nCycleNode = 0;
|
int nCycleNode = 0;
|
||||||
for (ParamNode n : node.getSubNodes())
|
for (ParamNode n : node.getSubNodes())
|
||||||
@@ -189,13 +189,13 @@ public class DescriptorWriter
|
|||||||
}
|
}
|
||||||
mapData.put(n, sub2Params.get(paramIndex++));
|
mapData.put(n, sub2Params.get(paramIndex++));
|
||||||
}
|
}
|
||||||
DescriptorWriter.packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (node.getEntityType().isWrapper())
|
if (node.getEntityType().isWrapper())
|
||||||
{
|
{
|
||||||
List<String> subParams = Util.splitList(DescriptorWriter.getDataString(node, node.getName(), paramMap, mapData));
|
List<String> subParams = Util.splitList(getDataString(node, node.getName(), paramMap, mapData));
|
||||||
int paramIndex = 0;
|
int paramIndex = 0;
|
||||||
for (ParamNode n : node.getSubNodes())
|
for (ParamNode n : node.getSubNodes())
|
||||||
{
|
{
|
||||||
@@ -205,19 +205,19 @@ public class DescriptorWriter
|
|||||||
}
|
}
|
||||||
mapData.put(n, subParams.get(paramIndex++));
|
mapData.put(n, subParams.get(paramIndex++));
|
||||||
}
|
}
|
||||||
DescriptorWriter.packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (node.getEntityType().isVariable())
|
if (node.getEntityType().isVariable())
|
||||||
{
|
{
|
||||||
buffer.put((byte[]) DescriptorWriter.parseNodeValue(currentFile, crypter, DescriptorWriter.getDataString(node, node.getName(), paramMap, mapData), node, false).array());
|
buffer.put((byte[]) parseNodeValue(currentFile, crypter, getDataString(node, node.getName(), paramMap, mapData), node, false).array());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!node.getEntityType().isIf() || ((param = DescriptorWriter.getDataString(node, node.getParamIf(), paramMap, mapData)) == null) || !node.getValIf().equalsIgnoreCase(param))
|
if (!node.getEntityType().isIf() || ((param = getDataString(node, node.getParamIf(), paramMap, mapData)) == null) || !node.getValIf().equalsIgnoreCase(param))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
DescriptorWriter.packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -336,7 +336,7 @@ public class DescriptorWriter
|
|||||||
throw new CycleArgumentException("Invalid argument [" + node.getName() + "] for cycle");
|
throw new CycleArgumentException("Invalid argument [" + node.getName() + "] for cycle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Buffer buff = DescriptorWriter.parseNodeValue(currentFile, crypter, String.valueOf(cycleSize), iterator, false);
|
Buffer buff = parseNodeValue(currentFile, crypter, String.valueOf(cycleSize), iterator, false);
|
||||||
int pos = counters.get(iterator);
|
int pos = counters.get(iterator);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
|
|||||||
Set<PlayerClass> subclasses = null;
|
Set<PlayerClass> subclasses = null;
|
||||||
final PlayerClass pClass = PlayerClass.values()[classId];
|
final PlayerClass pClass = PlayerClass.values()[classId];
|
||||||
|
|
||||||
if ((pClass.getLevel() == ClassLevel.THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
if ((pClass.getLevel() == THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
||||||
{
|
{
|
||||||
subclasses = EnumSet.copyOf(mainSubclassSet);
|
subclasses = EnumSet.copyOf(mainSubclassSet);
|
||||||
subclasses.remove(pClass);
|
subclasses.remove(pClass);
|
||||||
|
|||||||
@@ -1950,7 +1950,7 @@ public final class Config
|
|||||||
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
||||||
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
||||||
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
||||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + Config.EOL + Config.EOL + "Sincerely, Alegria");
|
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria");
|
||||||
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
||||||
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
||||||
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
||||||
@@ -2984,7 +2984,7 @@ public final class Config
|
|||||||
*/
|
*/
|
||||||
public static void saveHexid(int serverId, String hexId)
|
public static void saveHexid(int serverId, String hexId)
|
||||||
{
|
{
|
||||||
Config.saveHexid(serverId, hexId, HEXID_FILE);
|
saveHexid(serverId, hexId, HEXID_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public final class CommonUtil
|
|||||||
{
|
{
|
||||||
final byte[] data = new byte[buf.remaining()];
|
final byte[] data = new byte[buf.remaining()];
|
||||||
buf.get(data);
|
buf.get(data);
|
||||||
final String hex = CommonUtil.printData(data, data.length);
|
final String hex = printData(data, data.length);
|
||||||
buf.position(buf.position() - data.length);
|
buf.position(buf.position() - data.length);
|
||||||
return hex;
|
return hex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static boolean verifyChecksum(byte[] raw)
|
public static boolean verifyChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
return NewCrypt.verifyChecksum(raw, 0, raw.length);
|
return verifyChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,7 +97,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void appendChecksum(byte[] raw)
|
public static void appendChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
NewCrypt.appendChecksum(raw, 0, raw.length);
|
appendChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,7 +142,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void encXORPass(byte[] raw, int key)
|
public static void encXORPass(byte[] raw, int key)
|
||||||
{
|
{
|
||||||
NewCrypt.encXORPass(raw, 0, raw.length, key);
|
encXORPass(raw, 0, raw.length, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
|
|||||||
|
|
||||||
public boolean isFollowing()
|
public boolean isFollowing()
|
||||||
{
|
{
|
||||||
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
|
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
// Set the Intention to AI_INTENTION_ATTACK
|
// Set the Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
else if (me.getMostHated() != target)
|
else if (me.getMostHated() != target)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,7 +1305,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.addDamageHate(target, 0, aggro);
|
me.addDamageHate(target, 0, aggro);
|
||||||
|
|
||||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||||
if (!me.isRunning())
|
if (!me.isRunning())
|
||||||
@@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.setRunning();
|
me.setRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
setIntention(AI_INTENTION_ATTACK, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.isMonster())
|
if (me.isMonster())
|
||||||
|
|||||||
@@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
|
|||||||
{
|
{
|
||||||
// If player is trying attack target but he cannot move to attack target
|
// If player is trying attack target but he cannot move to attack target
|
||||||
// change his intention to idle
|
// change his intention to idle
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK)
|
if (_actor.getAI().getIntention() == AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
_actor.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
_actor.getAI().setIntention(AI_INTENTION_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// while flying there is no move to cast
|
// while flying there is no move to cast
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST)
|
if (_actor.getAI().getIntention() == AI_INTENTION_CAST)
|
||||||
{
|
{
|
||||||
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
{
|
{
|
||||||
case AI_IDLE:
|
case AI_IDLE:
|
||||||
{
|
{
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
|
if (getIntention() != AI_INTENTION_ACTIVE)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
setIntention(AI_INTENTION_ACTIVE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
if (hated != null)
|
if (hated != null)
|
||||||
{
|
{
|
||||||
_actor.setRunning();
|
_actor.setRunning();
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
f.vload();
|
f.vload();
|
||||||
final Topic t = new Topic(Topic.ConstructorType.CREATE, TopicBBSManager.getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
final Topic t = new Topic(Topic.ConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
||||||
f.addTopic(t);
|
f.addTopic(t);
|
||||||
TopicBBSManager.getInstance().setMaxID(t.getID(), f);
|
getInstance().setMaxID(t.getID(), f);
|
||||||
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
||||||
PostBBSManager.getInstance().addPostByTopic(p, t);
|
PostBBSManager.getInstance().addPostByTopic(p, t);
|
||||||
parsecmd("_bbsmemo", activeChar);
|
parsecmd("_bbsmemo", activeChar);
|
||||||
|
|||||||
@@ -378,8 +378,8 @@ public class ClanTable
|
|||||||
|
|
||||||
public void deleteclanswars(int clanId1, int clanId2)
|
public void deleteclanswars(int clanId1, int clanId2)
|
||||||
{
|
{
|
||||||
final L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
|
final L2Clan clan1 = getInstance().getClan(clanId1);
|
||||||
final L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
|
final L2Clan clan2 = getInstance().getClan(clanId2);
|
||||||
|
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
||||||
|
|
||||||
|
|||||||
@@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
|
|||||||
{
|
{
|
||||||
final List<Skill> temp = new LinkedList<>();
|
final List<Skill> temp = new LinkedList<>();
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(247, 1))); // Build Headquarters
|
temp.add(_skills.get(getSkillHashCode(247, 1))); // Build Headquarters
|
||||||
|
|
||||||
if (addNoble)
|
if (addNoble)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
||||||
}
|
}
|
||||||
if (hasCastle)
|
if (hasCastle)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
|
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
|
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
|
|||||||
{
|
{
|
||||||
final int arena = player.getBlockCheckerArena();
|
final int arena = player.getBlockCheckerArena();
|
||||||
final int team = getHolder(arena).getPlayerTeam(player);
|
final int team = getHolder(arena).getPlayerTeam(player);
|
||||||
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
|
getInstance().removePlayer(player, arena, team);
|
||||||
if (player.getTeam() != Team.NONE)
|
if (player.getTeam() != Team.NONE)
|
||||||
{
|
{
|
||||||
player.stopAllEffects();
|
player.stopAllEffects();
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ public final class QuestManager
|
|||||||
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
QuestManager.getInstance().report();
|
getInstance().report();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
@@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public class BlockList
|
|||||||
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
return BlockList.isBlocked(player, targetId);
|
return isBlocked(player, targetId);
|
||||||
}
|
}
|
||||||
if (!OFFLINE_LIST.containsKey(ownerId))
|
if (!OFFLINE_LIST.containsKey(ownerId))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1836,7 +1836,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
pledgeType = getAvailablePledgeTypes(pledgeType);
|
pledgeType = getAvailablePledgeTypes(pledgeType);
|
||||||
if (pledgeType == 0)
|
if (pledgeType == 0)
|
||||||
{
|
{
|
||||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
if (pledgeType == SUBUNIT_ACADEMY)
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
||||||
}
|
}
|
||||||
@@ -1854,7 +1854,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
|
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < L2Clan.SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > L2Clan.SUBUNIT_ROYAL2))))
|
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > SUBUNIT_ROYAL2))))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
||||||
return null;
|
return null;
|
||||||
@@ -1876,7 +1876,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if (pledgeType < L2Clan.SUBUNIT_KNIGHT1)
|
if (pledgeType < SUBUNIT_KNIGHT1)
|
||||||
{
|
{
|
||||||
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
||||||
}
|
}
|
||||||
@@ -2399,7 +2399,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == L2Clan.PENALTY_TYPE_DISSOLVE_ALLY))
|
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == PENALTY_TYPE_DISSOLVE_ALLY))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
||||||
return;
|
return;
|
||||||
@@ -2471,7 +2471,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
setAllyId(0);
|
setAllyId(0);
|
||||||
setAllyName(null);
|
setAllyName(null);
|
||||||
changeAllyCrest(0, false);
|
changeAllyCrest(0, false);
|
||||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), L2Clan.PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||||
updateClanInDB();
|
updateClanInDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@@ -234,7 +233,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
@@ -290,7 +289,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
setIsTeleporting(true);
|
setIsTeleporting(true);
|
||||||
|
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
|
|
||||||
// Adjust position a bit
|
// Adjust position a bit
|
||||||
z += 5;
|
z += 5;
|
||||||
@@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (target.isDead())
|
if (target.isDead())
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Checking if target has moved to peace zone
|
// Checking if target has moved to peace zone
|
||||||
else if (target.isInsidePeaceZone(getActingPlayer()))
|
else if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isInsidePeaceZone(this, target))
|
else if (isInsidePeaceZone(this, target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -986,7 +986,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
||||||
{
|
{
|
||||||
// Cancel the action because the L2PcInstance have no arrow
|
// Cancel the action because the L2PcInstance have no arrow
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
||||||
return;
|
return;
|
||||||
@@ -1040,7 +1040,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Other melee is checked in movement code and for offensive spells a check is done every time
|
// Other melee is checked in movement code and for offensive spells a check is done every time
|
||||||
if (target.isInsidePeaceZone(getActingPlayer()))
|
if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class L2Npc extends L2Character
|
|||||||
private NpcStringId _nameString;
|
private NpcStringId _nameString;
|
||||||
|
|
||||||
private StatsSet _params;
|
private StatsSet _params;
|
||||||
private DBSpawnManager.DBStatusType _raidStatus;
|
private DBStatusType _raidStatus;
|
||||||
|
|
||||||
/** Contains information about local tax payments. */
|
/** Contains information about local tax payments. */
|
||||||
private L2TaxZone _taxZone = null;
|
private L2TaxZone _taxZone = null;
|
||||||
|
|||||||
+1
-1
@@ -949,7 +949,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
*/
|
*/
|
||||||
public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
||||||
{
|
{
|
||||||
return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
|
return isAssignableTo(obj.getClass(), clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getExtendDrop()
|
public List<Integer> getExtendDrop()
|
||||||
|
|||||||
@@ -854,25 +854,25 @@ public class FortSiege implements Siegable
|
|||||||
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
||||||
{
|
{
|
||||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), delay - 3600000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||||
}
|
}
|
||||||
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
||||||
{
|
{
|
||||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(600), delay - 600000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(600), delay - 600000);
|
||||||
}
|
}
|
||||||
else if (delay > 300000)
|
else if (delay > 300000)
|
||||||
{
|
{
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(300), delay - 300000);
|
||||||
}
|
}
|
||||||
else if (delay > 60000)
|
else if (delay > 60000)
|
||||||
{
|
{
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), delay - 60000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// lower than 1 min, set to 1 min
|
// lower than 1 min, set to 1 min
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), 0);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
LOGGER.info(getClass().getSimpleName() + ": Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
||||||
@@ -902,7 +902,7 @@ public class FortSiege implements Siegable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute siege auto start
|
// Execute siege auto start
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ public class Siege implements Siegable
|
|||||||
{
|
{
|
||||||
_scheduledStartSiegeTask.cancel(false);
|
_scheduledStartSiegeTask.cancel(false);
|
||||||
}
|
}
|
||||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1346,7 +1346,7 @@ public class Siege implements Siegable
|
|||||||
if (_scheduledStartSiegeTask != null)
|
if (_scheduledStartSiegeTask != null)
|
||||||
{
|
{
|
||||||
_scheduledStartSiegeTask.cancel(true);
|
_scheduledStartSiegeTask.cancel(true);
|
||||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||||
|
|||||||
+4
-4
@@ -1242,7 +1242,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1273,7 +1273,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1449,7 +1449,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1963,7 +1963,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
|
|
||||||
public int getWeaponEnchant()
|
public int getWeaponEnchant()
|
||||||
{
|
{
|
||||||
final L2ItemInstance item = getPaperdollItem(Inventory.PAPERDOLL_RHAND);
|
final L2ItemInstance item = getPaperdollItem(PAPERDOLL_RHAND);
|
||||||
return item != null ? item.getEnchantLevel() : 0;
|
return item != null ? item.getEnchantLevel() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -67,7 +67,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemP
|
|||||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
||||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
||||||
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import com.l2jmobius.gameserver.model.items.L2Armor;
|
import com.l2jmobius.gameserver.model.items.L2Armor;
|
||||||
import com.l2jmobius.gameserver.model.items.L2EtcItem;
|
import com.l2jmobius.gameserver.model.items.L2EtcItem;
|
||||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||||
@@ -892,7 +891,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
&& ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield
|
&& ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield
|
||||||
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
|
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
|
||||||
&& !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll
|
&& !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll
|
||||||
&& (allowAdena || (getId() != Inventory.ADENA_ID)) // Not Adena
|
&& (allowAdena || (getId() != ADENA_ID)) // Not Adena
|
||||||
&& (!player.isCastingNow(s -> s.getSkill().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
&& (!player.isCastingNow(s -> s.getSkill().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1088,17 +1088,17 @@ public class Olympiad extends ListenersContainer
|
|||||||
if (!_nobles.containsKey(player.getObjectId()))
|
if (!_nobles.containsKey(player.getObjectId()))
|
||||||
{
|
{
|
||||||
final StatsSet statDat = new StatsSet();
|
final StatsSet statDat = new StatsSet();
|
||||||
statDat.set(Olympiad.CLASS_ID, player.getBaseClass());
|
statDat.set(CLASS_ID, player.getBaseClass());
|
||||||
statDat.set(Olympiad.CHAR_NAME, player.getName());
|
statDat.set(CHAR_NAME, player.getName());
|
||||||
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
|
statDat.set(POINTS, DEFAULT_POINTS);
|
||||||
statDat.set(Olympiad.COMP_DONE, 0);
|
statDat.set(COMP_DONE, 0);
|
||||||
statDat.set(Olympiad.COMP_WON, 0);
|
statDat.set(COMP_WON, 0);
|
||||||
statDat.set(Olympiad.COMP_LOST, 0);
|
statDat.set(COMP_LOST, 0);
|
||||||
statDat.set(Olympiad.COMP_DRAWN, 0);
|
statDat.set(COMP_DRAWN, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK, 0);
|
statDat.set(COMP_DONE_WEEK, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_CLASSED, 0);
|
statDat.set(COMP_DONE_WEEK_CLASSED, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_NON_CLASSED, 0);
|
statDat.set(COMP_DONE_WEEK_NON_CLASSED, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_TEAM, 0);
|
statDat.set(COMP_DONE_WEEK_TEAM, 0);
|
||||||
statDat.set("to_save", true);
|
statDat.set("to_save", true);
|
||||||
addNobleStats(player.getObjectId(), statDat);
|
addNobleStats(player.getObjectId(), statDat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ public class SkillCaster implements Runnable
|
|||||||
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
|
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
|
||||||
|
|
||||||
// Call the skill's effects and AI interraction and stuff.
|
// Call the skill's effects and AI interraction and stuff.
|
||||||
SkillCaster.callSkill(caster, target, _targets, _skill, _item);
|
callSkill(caster, target, _targets, _skill, _item);
|
||||||
|
|
||||||
// Start attack stance.
|
// Start attack stance.
|
||||||
if (!_skill.isWithoutAction())
|
if (!_skill.isWithoutAction())
|
||||||
@@ -726,7 +726,7 @@ public class SkillCaster implements Runnable
|
|||||||
{
|
{
|
||||||
if ((_skill.getNextAction() == NextActionType.ATTACK) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
if ((_skill.getNextAction() == NextActionType.ATTACK) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||||
{
|
{
|
||||||
caster.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
caster.getAI().setIntention(AI_INTENTION_ATTACK, target);
|
||||||
}
|
}
|
||||||
else if ((_skill.getNextAction() == NextActionType.CAST) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
else if ((_skill.getNextAction() == NextActionType.CAST) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ public final class Formulas
|
|||||||
|
|
||||||
switch (shld)
|
switch (shld)
|
||||||
{
|
{
|
||||||
case Formulas.SHIELD_DEFENSE_SUCCEED:
|
case SHIELD_DEFENSE_SUCCEED:
|
||||||
{
|
{
|
||||||
defence += target.getShldDef();
|
defence += target.getShldDef();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1114,7 +1114,7 @@ public final class Formulas
|
|||||||
int time = (skill == null) || skill.isPassive() || skill.isToggle() ? -1 : skill.getAbnormalTime();
|
int time = (skill == null) || skill.isPassive() || skill.isToggle() ? -1 : skill.getAbnormalTime();
|
||||||
|
|
||||||
// If the skill is a mastery skill, the effect will last twice the default time.
|
// If the skill is a mastery skill, the effect will last twice the default time.
|
||||||
if ((skill != null) && Formulas.calcSkillMastery(caster, skill))
|
if ((skill != null) && calcSkillMastery(caster, skill))
|
||||||
{
|
{
|
||||||
time *= 2;
|
time *= 2;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
|||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
|
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_3);
|
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_3);
|
||||||
sm.addString(text);
|
sm.addString(text);
|
||||||
return sm;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,8 +55,8 @@ public final class ScriptEngineManager implements IGameXmlReader
|
|||||||
public static final Path SCRIPT_FOLDER = Paths.get(Config.DATAPACK_ROOT.getAbsolutePath(), "data", "scripts");
|
public static final Path SCRIPT_FOLDER = Paths.get(Config.DATAPACK_ROOT.getAbsolutePath(), "data", "scripts");
|
||||||
public static final Path MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "MasterHandler.java");
|
public static final Path MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "MasterHandler.java");
|
||||||
public static final Path EFFECT_MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "EffectMasterHandler.java");
|
public static final Path EFFECT_MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "EffectMasterHandler.java");
|
||||||
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
||||||
public static final Path CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
public static final Path CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
||||||
|
|
||||||
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();
|
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();
|
||||||
private IExecutionContext _currentExecutionContext = null;
|
private IExecutionContext _currentExecutionContext = null;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public final class OfflineTradeUtil
|
|||||||
*/
|
*/
|
||||||
public static boolean enteredOfflineMode(L2PcInstance player)
|
public static boolean enteredOfflineMode(L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (!OfflineTradeUtil.offlineMode(player))
|
if (!offlineMode(player))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,9 +408,9 @@ public class ProcessTask extends Task
|
|||||||
StringBuffer b = new StringBuffer();
|
StringBuffer b = new StringBuffer();
|
||||||
b.append("Task[");
|
b.append("Task[");
|
||||||
b.append("cmd=");
|
b.append("cmd=");
|
||||||
b.append(ProcessTask.listStrings(command));
|
b.append(listStrings(command));
|
||||||
b.append(", env=");
|
b.append(", env=");
|
||||||
b.append(ProcessTask.listStrings(envs));
|
b.append(listStrings(envs));
|
||||||
b.append(", ");
|
b.append(", ");
|
||||||
b.append("dir=");
|
b.append("dir=");
|
||||||
b.append(directory);
|
b.append(directory);
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ public final class GameServerTable implements IGameXmlReader
|
|||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
// this value can't be stored in a private variable because the ID can be changed by setId()
|
// this value can't be stored in a private variable because the ID can be changed by setId()
|
||||||
return GameServerTable.getInstance().getServerNameById(_id);
|
return getInstance().getServerNameById(_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class GameServerThread extends Thread
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
|
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
|
||||||
if (GameServerThread.isBannedGameserverIP(_connectionIPAddress))
|
if (isBannedGameserverIP(_connectionIPAddress))
|
||||||
{
|
{
|
||||||
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
|
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
|
||||||
forceClose(LoginServerFail.REASON_IP_BANNED);
|
forceClose(LoginServerFail.REASON_IP_BANNED);
|
||||||
|
|||||||
+11
-11
@@ -108,7 +108,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
interactive = false;
|
interactive = false;
|
||||||
|
|
||||||
BaseGameServerRegister.printHelp();
|
printHelp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (interactive)
|
if (interactive)
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.startCMD();
|
startCMD();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ public abstract class BaseGameServerRegister
|
|||||||
}
|
}
|
||||||
catch (HeadlessException e)
|
catch (HeadlessException e)
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.startCMD();
|
startCMD();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
|
registerGameServer(e.getKey(), outDir);
|
||||||
return e.getKey();
|
return e.getKey();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,7 +372,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (_id < 0)
|
if (_id < 0)
|
||||||
{
|
{
|
||||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
final int registeredId = registerFirstAvailable(_outDir);
|
||||||
|
|
||||||
if (registeredId < 0)
|
if (registeredId < 0)
|
||||||
{
|
{
|
||||||
@@ -392,14 +392,14 @@ public abstract class BaseGameServerRegister
|
|||||||
if (_force)
|
if (_force)
|
||||||
{
|
{
|
||||||
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
|
||||||
BaseGameServerRegister.unregisterGameServer(_id);
|
unregisterGameServer(_id);
|
||||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
registerGameServer(_id, _outDir);
|
||||||
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
|
||||||
}
|
}
|
||||||
else if (_fallback)
|
else if (_fallback)
|
||||||
{
|
{
|
||||||
System.out.println(getBundle().getString("fallingBack"));
|
System.out.println(getBundle().getString("fallingBack"));
|
||||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
final int registeredId = registerFirstAvailable(_outDir);
|
||||||
|
|
||||||
if (registeredId < 0)
|
if (registeredId < 0)
|
||||||
{
|
{
|
||||||
@@ -418,7 +418,7 @@ public abstract class BaseGameServerRegister
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.out.println(getBundle().getString("no"));
|
System.out.println(getBundle().getString("no"));
|
||||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
registerGameServer(_id, _outDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,7 +456,7 @@ public abstract class BaseGameServerRegister
|
|||||||
System.out.printf(getBundle().getString("removingGsId") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("removingGsId") + Config.EOL, _id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.unregisterGameServer(_id);
|
unregisterGameServer(_id);
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
@@ -475,7 +475,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.unregisterAllGameServers();
|
unregisterAllGameServers();
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
|
|||||||
Set<PlayerClass> subclasses = null;
|
Set<PlayerClass> subclasses = null;
|
||||||
final PlayerClass pClass = PlayerClass.values()[classId];
|
final PlayerClass pClass = PlayerClass.values()[classId];
|
||||||
|
|
||||||
if ((pClass.getLevel() == ClassLevel.THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
if ((pClass.getLevel() == THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
||||||
{
|
{
|
||||||
subclasses = EnumSet.copyOf(mainSubclassSet);
|
subclasses = EnumSet.copyOf(mainSubclassSet);
|
||||||
subclasses.remove(pClass);
|
subclasses.remove(pClass);
|
||||||
|
|||||||
@@ -1966,7 +1966,7 @@ public final class Config
|
|||||||
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
||||||
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
||||||
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
||||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + Config.EOL + Config.EOL + "Sincerely, Alegria");
|
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria");
|
||||||
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
||||||
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
||||||
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
||||||
@@ -3000,7 +3000,7 @@ public final class Config
|
|||||||
*/
|
*/
|
||||||
public static void saveHexid(int serverId, String hexId)
|
public static void saveHexid(int serverId, String hexId)
|
||||||
{
|
{
|
||||||
Config.saveHexid(serverId, hexId, HEXID_FILE);
|
saveHexid(serverId, hexId, HEXID_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public final class CommonUtil
|
|||||||
{
|
{
|
||||||
final byte[] data = new byte[buf.remaining()];
|
final byte[] data = new byte[buf.remaining()];
|
||||||
buf.get(data);
|
buf.get(data);
|
||||||
final String hex = CommonUtil.printData(data, data.length);
|
final String hex = printData(data, data.length);
|
||||||
buf.position(buf.position() - data.length);
|
buf.position(buf.position() - data.length);
|
||||||
return hex;
|
return hex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static boolean verifyChecksum(byte[] raw)
|
public static boolean verifyChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
return NewCrypt.verifyChecksum(raw, 0, raw.length);
|
return verifyChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,7 +97,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void appendChecksum(byte[] raw)
|
public static void appendChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
NewCrypt.appendChecksum(raw, 0, raw.length);
|
appendChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,7 +142,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void encXORPass(byte[] raw, int key)
|
public static void encXORPass(byte[] raw, int key)
|
||||||
{
|
{
|
||||||
NewCrypt.encXORPass(raw, 0, raw.length, key);
|
encXORPass(raw, 0, raw.length, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
|
|||||||
|
|
||||||
public boolean isFollowing()
|
public boolean isFollowing()
|
||||||
{
|
{
|
||||||
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
|
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
// Set the Intention to AI_INTENTION_ATTACK
|
// Set the Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
else if (me.getMostHated() != target)
|
else if (me.getMostHated() != target)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,7 +1305,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.addDamageHate(target, 0, aggro);
|
me.addDamageHate(target, 0, aggro);
|
||||||
|
|
||||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||||
if (!me.isRunning())
|
if (!me.isRunning())
|
||||||
@@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.setRunning();
|
me.setRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
setIntention(AI_INTENTION_ATTACK, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.isMonster())
|
if (me.isMonster())
|
||||||
|
|||||||
@@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
|
|||||||
{
|
{
|
||||||
// If player is trying attack target but he cannot move to attack target
|
// If player is trying attack target but he cannot move to attack target
|
||||||
// change his intention to idle
|
// change his intention to idle
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK)
|
if (_actor.getAI().getIntention() == AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
_actor.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
_actor.getAI().setIntention(AI_INTENTION_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// while flying there is no move to cast
|
// while flying there is no move to cast
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST)
|
if (_actor.getAI().getIntention() == AI_INTENTION_CAST)
|
||||||
{
|
{
|
||||||
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
{
|
{
|
||||||
case AI_IDLE:
|
case AI_IDLE:
|
||||||
{
|
{
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
|
if (getIntention() != AI_INTENTION_ACTIVE)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
setIntention(AI_INTENTION_ACTIVE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
if (hated != null)
|
if (hated != null)
|
||||||
{
|
{
|
||||||
_actor.setRunning();
|
_actor.setRunning();
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
f.vload();
|
f.vload();
|
||||||
final Topic t = new Topic(Topic.ConstructorType.CREATE, TopicBBSManager.getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
final Topic t = new Topic(Topic.ConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
||||||
f.addTopic(t);
|
f.addTopic(t);
|
||||||
TopicBBSManager.getInstance().setMaxID(t.getID(), f);
|
getInstance().setMaxID(t.getID(), f);
|
||||||
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
||||||
PostBBSManager.getInstance().addPostByTopic(p, t);
|
PostBBSManager.getInstance().addPostByTopic(p, t);
|
||||||
parsecmd("_bbsmemo", activeChar);
|
parsecmd("_bbsmemo", activeChar);
|
||||||
|
|||||||
+2
-2
@@ -378,8 +378,8 @@ public class ClanTable
|
|||||||
|
|
||||||
public void deleteclanswars(int clanId1, int clanId2)
|
public void deleteclanswars(int clanId1, int clanId2)
|
||||||
{
|
{
|
||||||
final L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
|
final L2Clan clan1 = getInstance().getClan(clanId1);
|
||||||
final L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
|
final L2Clan clan2 = getInstance().getClan(clanId2);
|
||||||
|
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
|
|||||||
{
|
{
|
||||||
final List<Skill> temp = new LinkedList<>();
|
final List<Skill> temp = new LinkedList<>();
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(247, 1))); // Build Headquarters
|
temp.add(_skills.get(getSkillHashCode(247, 1))); // Build Headquarters
|
||||||
|
|
||||||
if (addNoble)
|
if (addNoble)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
||||||
}
|
}
|
||||||
if (hasCastle)
|
if (hasCastle)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
|
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
|
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
|
|||||||
{
|
{
|
||||||
final int arena = player.getBlockCheckerArena();
|
final int arena = player.getBlockCheckerArena();
|
||||||
final int team = getHolder(arena).getPlayerTeam(player);
|
final int team = getHolder(arena).getPlayerTeam(player);
|
||||||
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
|
getInstance().removePlayer(player, arena, team);
|
||||||
if (player.getTeam() != Team.NONE)
|
if (player.getTeam() != Team.NONE)
|
||||||
{
|
{
|
||||||
player.stopAllEffects();
|
player.stopAllEffects();
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ public final class QuestManager
|
|||||||
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
QuestManager.getInstance().report();
|
getInstance().report();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
@@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public class BlockList
|
|||||||
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
return BlockList.isBlocked(player, targetId);
|
return isBlocked(player, targetId);
|
||||||
}
|
}
|
||||||
if (!OFFLINE_LIST.containsKey(ownerId))
|
if (!OFFLINE_LIST.containsKey(ownerId))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1837,7 +1837,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
pledgeType = getAvailablePledgeTypes(pledgeType);
|
pledgeType = getAvailablePledgeTypes(pledgeType);
|
||||||
if (pledgeType == 0)
|
if (pledgeType == 0)
|
||||||
{
|
{
|
||||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
if (pledgeType == SUBUNIT_ACADEMY)
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
||||||
}
|
}
|
||||||
@@ -1855,7 +1855,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
|
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < L2Clan.SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > L2Clan.SUBUNIT_ROYAL2))))
|
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > SUBUNIT_ROYAL2))))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
||||||
return null;
|
return null;
|
||||||
@@ -1877,7 +1877,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if (pledgeType < L2Clan.SUBUNIT_KNIGHT1)
|
if (pledgeType < SUBUNIT_KNIGHT1)
|
||||||
{
|
{
|
||||||
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
||||||
}
|
}
|
||||||
@@ -2400,7 +2400,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == L2Clan.PENALTY_TYPE_DISSOLVE_ALLY))
|
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == PENALTY_TYPE_DISSOLVE_ALLY))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
||||||
return;
|
return;
|
||||||
@@ -2472,7 +2472,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
setAllyId(0);
|
setAllyId(0);
|
||||||
setAllyName(null);
|
setAllyName(null);
|
||||||
changeAllyCrest(0, false);
|
changeAllyCrest(0, false);
|
||||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), L2Clan.PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||||
updateClanInDB();
|
updateClanInDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@@ -234,7 +233,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
@@ -290,7 +289,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+8
-8
@@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
setIsTeleporting(true);
|
setIsTeleporting(true);
|
||||||
|
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
|
|
||||||
// Adjust position a bit
|
// Adjust position a bit
|
||||||
z += 5;
|
z += 5;
|
||||||
@@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (target.isDead())
|
if (target.isDead())
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Checking if target has moved to peace zone
|
// Checking if target has moved to peace zone
|
||||||
else if (target.isInsidePeaceZone(getActingPlayer()))
|
else if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isInsidePeaceZone(this, target))
|
else if (isInsidePeaceZone(this, target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -986,7 +986,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
||||||
{
|
{
|
||||||
// Cancel the action because the L2PcInstance have no arrow
|
// Cancel the action because the L2PcInstance have no arrow
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
||||||
return;
|
return;
|
||||||
@@ -1040,7 +1040,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Other melee is checked in movement code and for offensive spells a check is done every time
|
// Other melee is checked in movement code and for offensive spells a check is done every time
|
||||||
if (target.isInsidePeaceZone(getActingPlayer()))
|
if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class L2Npc extends L2Character
|
|||||||
private NpcStringId _nameString;
|
private NpcStringId _nameString;
|
||||||
|
|
||||||
private StatsSet _params;
|
private StatsSet _params;
|
||||||
private DBSpawnManager.DBStatusType _raidStatus;
|
private DBStatusType _raidStatus;
|
||||||
|
|
||||||
/** Contains information about local tax payments. */
|
/** Contains information about local tax payments. */
|
||||||
private L2TaxZone _taxZone = null;
|
private L2TaxZone _taxZone = null;
|
||||||
|
|||||||
+1
-1
@@ -949,7 +949,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
*/
|
*/
|
||||||
public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
||||||
{
|
{
|
||||||
return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
|
return isAssignableTo(obj.getClass(), clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getExtendDrop()
|
public List<Integer> getExtendDrop()
|
||||||
|
|||||||
+6
-6
@@ -854,25 +854,25 @@ public class FortSiege implements Siegable
|
|||||||
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
||||||
{
|
{
|
||||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), delay - 3600000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||||
}
|
}
|
||||||
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
||||||
{
|
{
|
||||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(600), delay - 600000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(600), delay - 600000);
|
||||||
}
|
}
|
||||||
else if (delay > 300000)
|
else if (delay > 300000)
|
||||||
{
|
{
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(300), delay - 300000);
|
||||||
}
|
}
|
||||||
else if (delay > 60000)
|
else if (delay > 60000)
|
||||||
{
|
{
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), delay - 60000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// lower than 1 min, set to 1 min
|
// lower than 1 min, set to 1 min
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), 0);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.info(getClass().getSimpleName() + ": Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
LOGGER.info(getClass().getSimpleName() + ": Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
||||||
@@ -902,7 +902,7 @@ public class FortSiege implements Siegable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute siege auto start
|
// Execute siege auto start
|
||||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
|
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ public class Siege implements Siegable
|
|||||||
{
|
{
|
||||||
_scheduledStartSiegeTask.cancel(false);
|
_scheduledStartSiegeTask.cancel(false);
|
||||||
}
|
}
|
||||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1346,7 +1346,7 @@ public class Siege implements Siegable
|
|||||||
if (_scheduledStartSiegeTask != null)
|
if (_scheduledStartSiegeTask != null)
|
||||||
{
|
{
|
||||||
_scheduledStartSiegeTask.cancel(true);
|
_scheduledStartSiegeTask.cancel(true);
|
||||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||||
|
|||||||
+4
-4
@@ -1272,7 +1272,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1479,7 +1479,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
*/
|
*/
|
||||||
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
||||||
{
|
{
|
||||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
final ChangeRecorder recorder = newRecorder();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1993,7 +1993,7 @@ public abstract class Inventory extends ItemContainer
|
|||||||
|
|
||||||
public int getWeaponEnchant()
|
public int getWeaponEnchant()
|
||||||
{
|
{
|
||||||
final L2ItemInstance item = getPaperdollItem(Inventory.PAPERDOLL_RHAND);
|
final L2ItemInstance item = getPaperdollItem(PAPERDOLL_RHAND);
|
||||||
return item != null ? item.getEnchantLevel() : 0;
|
return item != null ? item.getEnchantLevel() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -71,7 +71,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemP
|
|||||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
||||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
||||||
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import com.l2jmobius.gameserver.model.items.L2Armor;
|
import com.l2jmobius.gameserver.model.items.L2Armor;
|
||||||
import com.l2jmobius.gameserver.model.items.L2EtcItem;
|
import com.l2jmobius.gameserver.model.items.L2EtcItem;
|
||||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||||
@@ -899,7 +898,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
&& ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield
|
&& ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield
|
||||||
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
|
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
|
||||||
&& !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll
|
&& !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll
|
||||||
&& (allowAdena || (getId() != Inventory.ADENA_ID)) // Not Adena
|
&& (allowAdena || (getId() != ADENA_ID)) // Not Adena
|
||||||
&& (!player.isCastingNow(s -> s.getSkill().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
&& (!player.isCastingNow(s -> s.getSkill().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -1088,17 +1088,17 @@ public class Olympiad extends ListenersContainer
|
|||||||
if (!_nobles.containsKey(player.getObjectId()))
|
if (!_nobles.containsKey(player.getObjectId()))
|
||||||
{
|
{
|
||||||
final StatsSet statDat = new StatsSet();
|
final StatsSet statDat = new StatsSet();
|
||||||
statDat.set(Olympiad.CLASS_ID, player.getBaseClass());
|
statDat.set(CLASS_ID, player.getBaseClass());
|
||||||
statDat.set(Olympiad.CHAR_NAME, player.getName());
|
statDat.set(CHAR_NAME, player.getName());
|
||||||
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
|
statDat.set(POINTS, DEFAULT_POINTS);
|
||||||
statDat.set(Olympiad.COMP_DONE, 0);
|
statDat.set(COMP_DONE, 0);
|
||||||
statDat.set(Olympiad.COMP_WON, 0);
|
statDat.set(COMP_WON, 0);
|
||||||
statDat.set(Olympiad.COMP_LOST, 0);
|
statDat.set(COMP_LOST, 0);
|
||||||
statDat.set(Olympiad.COMP_DRAWN, 0);
|
statDat.set(COMP_DRAWN, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK, 0);
|
statDat.set(COMP_DONE_WEEK, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_CLASSED, 0);
|
statDat.set(COMP_DONE_WEEK_CLASSED, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_NON_CLASSED, 0);
|
statDat.set(COMP_DONE_WEEK_NON_CLASSED, 0);
|
||||||
statDat.set(Olympiad.COMP_DONE_WEEK_TEAM, 0);
|
statDat.set(COMP_DONE_WEEK_TEAM, 0);
|
||||||
statDat.set("to_save", true);
|
statDat.set("to_save", true);
|
||||||
addNobleStats(player.getObjectId(), statDat);
|
addNobleStats(player.getObjectId(), statDat);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -492,7 +492,7 @@ public class SkillCaster implements Runnable
|
|||||||
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
|
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
|
||||||
|
|
||||||
// Call the skill's effects and AI interraction and stuff.
|
// Call the skill's effects and AI interraction and stuff.
|
||||||
SkillCaster.callSkill(caster, target, _targets, _skill, _item);
|
callSkill(caster, target, _targets, _skill, _item);
|
||||||
|
|
||||||
// Start attack stance.
|
// Start attack stance.
|
||||||
if (!_skill.isWithoutAction())
|
if (!_skill.isWithoutAction())
|
||||||
@@ -726,7 +726,7 @@ public class SkillCaster implements Runnable
|
|||||||
{
|
{
|
||||||
if ((_skill.getNextAction() == NextActionType.ATTACK) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
if ((_skill.getNextAction() == NextActionType.ATTACK) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||||
{
|
{
|
||||||
caster.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
caster.getAI().setIntention(AI_INTENTION_ATTACK, target);
|
||||||
}
|
}
|
||||||
else if ((_skill.getNextAction() == NextActionType.CAST) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
else if ((_skill.getNextAction() == NextActionType.CAST) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ public final class Formulas
|
|||||||
|
|
||||||
switch (shld)
|
switch (shld)
|
||||||
{
|
{
|
||||||
case Formulas.SHIELD_DEFENSE_SUCCEED:
|
case SHIELD_DEFENSE_SUCCEED:
|
||||||
{
|
{
|
||||||
defence += target.getShldDef();
|
defence += target.getShldDef();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1114,7 +1114,7 @@ public final class Formulas
|
|||||||
int time = (skill == null) || skill.isPassive() || skill.isToggle() ? -1 : skill.getAbnormalTime();
|
int time = (skill == null) || skill.isPassive() || skill.isToggle() ? -1 : skill.getAbnormalTime();
|
||||||
|
|
||||||
// If the skill is a mastery skill, the effect will last twice the default time.
|
// If the skill is a mastery skill, the effect will last twice the default time.
|
||||||
if ((skill != null) && Formulas.calcSkillMastery(caster, skill))
|
if ((skill != null) && calcSkillMastery(caster, skill))
|
||||||
{
|
{
|
||||||
time *= 2;
|
time *= 2;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
|||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
|
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_3);
|
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_3);
|
||||||
sm.addString(text);
|
sm.addString(text);
|
||||||
return sm;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,8 +55,8 @@ public final class ScriptEngineManager implements IGameXmlReader
|
|||||||
public static final Path SCRIPT_FOLDER = Paths.get(Config.DATAPACK_ROOT.getAbsolutePath(), "data", "scripts");
|
public static final Path SCRIPT_FOLDER = Paths.get(Config.DATAPACK_ROOT.getAbsolutePath(), "data", "scripts");
|
||||||
public static final Path MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "MasterHandler.java");
|
public static final Path MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "MasterHandler.java");
|
||||||
public static final Path EFFECT_MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "EffectMasterHandler.java");
|
public static final Path EFFECT_MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "EffectMasterHandler.java");
|
||||||
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
||||||
public static final Path CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
public static final Path CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
||||||
public static final Path ONE_DAY_REWARD_MASTER_HANDLER = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "DailyMissionMasterHandler.java");
|
public static final Path ONE_DAY_REWARD_MASTER_HANDLER = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "DailyMissionMasterHandler.java");
|
||||||
|
|
||||||
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();
|
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public final class OfflineTradeUtil
|
|||||||
*/
|
*/
|
||||||
public static boolean enteredOfflineMode(L2PcInstance player)
|
public static boolean enteredOfflineMode(L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (!OfflineTradeUtil.offlineMode(player))
|
if (!offlineMode(player))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -408,9 +408,9 @@ public class ProcessTask extends Task
|
|||||||
StringBuffer b = new StringBuffer();
|
StringBuffer b = new StringBuffer();
|
||||||
b.append("Task[");
|
b.append("Task[");
|
||||||
b.append("cmd=");
|
b.append("cmd=");
|
||||||
b.append(ProcessTask.listStrings(command));
|
b.append(listStrings(command));
|
||||||
b.append(", env=");
|
b.append(", env=");
|
||||||
b.append(ProcessTask.listStrings(envs));
|
b.append(listStrings(envs));
|
||||||
b.append(", ");
|
b.append(", ");
|
||||||
b.append("dir=");
|
b.append("dir=");
|
||||||
b.append(directory);
|
b.append(directory);
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ public final class GameServerTable implements IGameXmlReader
|
|||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
// this value can't be stored in a private variable because the ID can be changed by setId()
|
// this value can't be stored in a private variable because the ID can be changed by setId()
|
||||||
return GameServerTable.getInstance().getServerNameById(_id);
|
return getInstance().getServerNameById(_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class GameServerThread extends Thread
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
|
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
|
||||||
if (GameServerThread.isBannedGameserverIP(_connectionIPAddress))
|
if (isBannedGameserverIP(_connectionIPAddress))
|
||||||
{
|
{
|
||||||
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
|
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
|
||||||
forceClose(LoginServerFail.REASON_IP_BANNED);
|
forceClose(LoginServerFail.REASON_IP_BANNED);
|
||||||
|
|||||||
+11
-11
@@ -108,7 +108,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
interactive = false;
|
interactive = false;
|
||||||
|
|
||||||
BaseGameServerRegister.printHelp();
|
printHelp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (interactive)
|
if (interactive)
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.startCMD();
|
startCMD();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ public abstract class BaseGameServerRegister
|
|||||||
}
|
}
|
||||||
catch (HeadlessException e)
|
catch (HeadlessException e)
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.startCMD();
|
startCMD();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
|
registerGameServer(e.getKey(), outDir);
|
||||||
return e.getKey();
|
return e.getKey();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,7 +372,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
if (_id < 0)
|
if (_id < 0)
|
||||||
{
|
{
|
||||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
final int registeredId = registerFirstAvailable(_outDir);
|
||||||
|
|
||||||
if (registeredId < 0)
|
if (registeredId < 0)
|
||||||
{
|
{
|
||||||
@@ -392,14 +392,14 @@ public abstract class BaseGameServerRegister
|
|||||||
if (_force)
|
if (_force)
|
||||||
{
|
{
|
||||||
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
|
||||||
BaseGameServerRegister.unregisterGameServer(_id);
|
unregisterGameServer(_id);
|
||||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
registerGameServer(_id, _outDir);
|
||||||
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
|
||||||
}
|
}
|
||||||
else if (_fallback)
|
else if (_fallback)
|
||||||
{
|
{
|
||||||
System.out.println(getBundle().getString("fallingBack"));
|
System.out.println(getBundle().getString("fallingBack"));
|
||||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
final int registeredId = registerFirstAvailable(_outDir);
|
||||||
|
|
||||||
if (registeredId < 0)
|
if (registeredId < 0)
|
||||||
{
|
{
|
||||||
@@ -418,7 +418,7 @@ public abstract class BaseGameServerRegister
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.out.println(getBundle().getString("no"));
|
System.out.println(getBundle().getString("no"));
|
||||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
registerGameServer(_id, _outDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,7 +456,7 @@ public abstract class BaseGameServerRegister
|
|||||||
System.out.printf(getBundle().getString("removingGsId") + Config.EOL, _id);
|
System.out.printf(getBundle().getString("removingGsId") + Config.EOL, _id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.unregisterGameServer(_id);
|
unregisterGameServer(_id);
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
@@ -475,7 +475,7 @@ public abstract class BaseGameServerRegister
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BaseGameServerRegister.unregisterAllGameServers();
|
unregisterAllGameServers();
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
|
|||||||
Set<PlayerClass> subclasses = null;
|
Set<PlayerClass> subclasses = null;
|
||||||
final PlayerClass pClass = PlayerClass.values()[classId];
|
final PlayerClass pClass = PlayerClass.values()[classId];
|
||||||
|
|
||||||
if ((pClass.getLevel() == ClassLevel.THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
if ((pClass.getLevel() == THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
||||||
{
|
{
|
||||||
subclasses = EnumSet.copyOf(mainSubclassSet);
|
subclasses = EnumSet.copyOf(mainSubclassSet);
|
||||||
subclasses.remove(pClass);
|
subclasses.remove(pClass);
|
||||||
|
|||||||
@@ -1974,7 +1974,7 @@ public final class Config
|
|||||||
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
||||||
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
||||||
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
||||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + Config.EOL + Config.EOL + "Sincerely, Alegria");
|
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria");
|
||||||
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
||||||
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
||||||
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
||||||
@@ -3017,7 +3017,7 @@ public final class Config
|
|||||||
*/
|
*/
|
||||||
public static void saveHexid(int serverId, String hexId)
|
public static void saveHexid(int serverId, String hexId)
|
||||||
{
|
{
|
||||||
Config.saveHexid(serverId, hexId, HEXID_FILE);
|
saveHexid(serverId, hexId, HEXID_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public final class CommonUtil
|
|||||||
{
|
{
|
||||||
final byte[] data = new byte[buf.remaining()];
|
final byte[] data = new byte[buf.remaining()];
|
||||||
buf.get(data);
|
buf.get(data);
|
||||||
final String hex = CommonUtil.printData(data, data.length);
|
final String hex = printData(data, data.length);
|
||||||
buf.position(buf.position() - data.length);
|
buf.position(buf.position() - data.length);
|
||||||
return hex;
|
return hex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static boolean verifyChecksum(byte[] raw)
|
public static boolean verifyChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
return NewCrypt.verifyChecksum(raw, 0, raw.length);
|
return verifyChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,7 +97,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void appendChecksum(byte[] raw)
|
public static void appendChecksum(byte[] raw)
|
||||||
{
|
{
|
||||||
NewCrypt.appendChecksum(raw, 0, raw.length);
|
appendChecksum(raw, 0, raw.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,7 +142,7 @@ public final class NewCrypt
|
|||||||
*/
|
*/
|
||||||
public static void encXORPass(byte[] raw, int key)
|
public static void encXORPass(byte[] raw, int key)
|
||||||
{
|
{
|
||||||
NewCrypt.encXORPass(raw, 0, raw.length, key);
|
encXORPass(raw, 0, raw.length, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
|
|||||||
|
|
||||||
public boolean isFollowing()
|
public boolean isFollowing()
|
||||||
{
|
{
|
||||||
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
|
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
// Set the Intention to AI_INTENTION_ATTACK
|
// Set the Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
else if (me.getMostHated() != target)
|
else if (me.getMostHated() != target)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,7 +1305,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.addDamageHate(target, 0, aggro);
|
me.addDamageHate(target, 0, aggro);
|
||||||
|
|
||||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
if (getIntention() != AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||||
if (!me.isRunning())
|
if (!me.isRunning())
|
||||||
@@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
|
|||||||
me.setRunning();
|
me.setRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
setIntention(AI_INTENTION_ATTACK, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.isMonster())
|
if (me.isMonster())
|
||||||
|
|||||||
@@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
|
|||||||
{
|
{
|
||||||
// If player is trying attack target but he cannot move to attack target
|
// If player is trying attack target but he cannot move to attack target
|
||||||
// change his intention to idle
|
// change his intention to idle
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK)
|
if (_actor.getAI().getIntention() == AI_INTENTION_ATTACK)
|
||||||
{
|
{
|
||||||
_actor.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
_actor.getAI().setIntention(AI_INTENTION_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// while flying there is no move to cast
|
// while flying there is no move to cast
|
||||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST)
|
if (_actor.getAI().getIntention() == AI_INTENTION_CAST)
|
||||||
{
|
{
|
||||||
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
{
|
{
|
||||||
case AI_IDLE:
|
case AI_IDLE:
|
||||||
{
|
{
|
||||||
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
|
if (getIntention() != AI_INTENTION_ACTIVE)
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
setIntention(AI_INTENTION_ACTIVE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
if (hated != null)
|
if (hated != null)
|
||||||
{
|
{
|
||||||
_actor.setRunning();
|
_actor.setRunning();
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
setIntention(AI_INTENTION_ATTACK, hated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||||
_lastAttack = null;
|
_lastAttack = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
f.vload();
|
f.vload();
|
||||||
final Topic t = new Topic(Topic.ConstructorType.CREATE, TopicBBSManager.getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
final Topic t = new Topic(Topic.ConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
||||||
f.addTopic(t);
|
f.addTopic(t);
|
||||||
TopicBBSManager.getInstance().setMaxID(t.getID(), f);
|
getInstance().setMaxID(t.getID(), f);
|
||||||
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
||||||
PostBBSManager.getInstance().addPostByTopic(p, t);
|
PostBBSManager.getInstance().addPostByTopic(p, t);
|
||||||
parsecmd("_bbsmemo", activeChar);
|
parsecmd("_bbsmemo", activeChar);
|
||||||
|
|||||||
@@ -382,8 +382,8 @@ public class ClanTable
|
|||||||
|
|
||||||
public void deleteclanswars(int clanId1, int clanId2)
|
public void deleteclanswars(int clanId1, int clanId2)
|
||||||
{
|
{
|
||||||
final L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
|
final L2Clan clan1 = getInstance().getClan(clanId1);
|
||||||
final L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
|
final L2Clan clan2 = getInstance().getClan(clanId2);
|
||||||
|
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
||||||
|
|
||||||
|
|||||||
@@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
|
|||||||
{
|
{
|
||||||
final List<Skill> temp = new LinkedList<>();
|
final List<Skill> temp = new LinkedList<>();
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
||||||
|
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(247, 1))); // Build Headquarters
|
temp.add(_skills.get(getSkillHashCode(247, 1))); // Build Headquarters
|
||||||
|
|
||||||
if (addNoble)
|
if (addNoble)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
||||||
}
|
}
|
||||||
if (hasCastle)
|
if (hasCastle)
|
||||||
{
|
{
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
|
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
|
||||||
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
|
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
|
|||||||
{
|
{
|
||||||
final int arena = player.getBlockCheckerArena();
|
final int arena = player.getBlockCheckerArena();
|
||||||
final int team = getHolder(arena).getPlayerTeam(player);
|
final int team = getHolder(arena).getPlayerTeam(player);
|
||||||
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
|
getInstance().removePlayer(player, arena, team);
|
||||||
if (player.getTeam() != Team.NONE)
|
if (player.getTeam() != Team.NONE)
|
||||||
{
|
{
|
||||||
player.stopAllEffects();
|
player.stopAllEffects();
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ public final class QuestManager
|
|||||||
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
QuestManager.getInstance().report();
|
getInstance().report();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
@@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||||
{
|
{
|
||||||
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public class BlockList
|
|||||||
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
return BlockList.isBlocked(player, targetId);
|
return isBlocked(player, targetId);
|
||||||
}
|
}
|
||||||
if (!OFFLINE_LIST.containsKey(ownerId))
|
if (!OFFLINE_LIST.containsKey(ownerId))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1837,7 +1837,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
pledgeType = getAvailablePledgeTypes(pledgeType);
|
pledgeType = getAvailablePledgeTypes(pledgeType);
|
||||||
if (pledgeType == 0)
|
if (pledgeType == 0)
|
||||||
{
|
{
|
||||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
if (pledgeType == SUBUNIT_ACADEMY)
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
||||||
}
|
}
|
||||||
@@ -1855,7 +1855,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
|
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < L2Clan.SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > L2Clan.SUBUNIT_ROYAL2))))
|
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > SUBUNIT_ROYAL2))))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_IS_TOO_LOW);
|
||||||
return null;
|
return null;
|
||||||
@@ -1877,7 +1877,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
// Royal Guard 5000 points per each
|
// Royal Guard 5000 points per each
|
||||||
// Order of Knights 10000 points per each
|
// Order of Knights 10000 points per each
|
||||||
if (pledgeType < L2Clan.SUBUNIT_KNIGHT1)
|
if (pledgeType < SUBUNIT_KNIGHT1)
|
||||||
{
|
{
|
||||||
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
||||||
}
|
}
|
||||||
@@ -2400,7 +2400,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == L2Clan.PENALTY_TYPE_DISSOLVE_ALLY))
|
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == PENALTY_TYPE_DISSOLVE_ALLY))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
||||||
return;
|
return;
|
||||||
@@ -2472,7 +2472,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
setAllyId(0);
|
setAllyId(0);
|
||||||
setAllyName(null);
|
setAllyName(null);
|
||||||
changeAllyCrest(0, false);
|
changeAllyCrest(0, false);
|
||||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), L2Clan.PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||||
updateClanInDB();
|
updateClanInDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@@ -234,7 +233,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
@@ -290,7 +289,7 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Inventory.MAX_ADENA / count) < price)
|
if ((MAX_ADENA / count) < price)
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
setIsTeleporting(true);
|
setIsTeleporting(true);
|
||||||
|
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
|
|
||||||
// Adjust position a bit
|
// Adjust position a bit
|
||||||
z += 5;
|
z += 5;
|
||||||
@@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (target.isDead())
|
if (target.isDead())
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Checking if target has moved to peace zone
|
// Checking if target has moved to peace zone
|
||||||
else if (target.isInsidePeaceZone(getActingPlayer()))
|
else if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isInsidePeaceZone(this, target))
|
else if (isInsidePeaceZone(this, target))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -986,7 +986,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
||||||
{
|
{
|
||||||
// Cancel the action because the L2PcInstance have no arrow
|
// Cancel the action because the L2PcInstance have no arrow
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
||||||
return;
|
return;
|
||||||
@@ -1040,7 +1040,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// Other melee is checked in movement code and for offensive spells a check is done every time
|
// Other melee is checked in movement code and for offensive spells a check is done every time
|
||||||
if (target.isInsidePeaceZone(getActingPlayer()))
|
if (target.isInsidePeaceZone(getActingPlayer()))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class L2Npc extends L2Character
|
|||||||
private NpcStringId _nameString;
|
private NpcStringId _nameString;
|
||||||
|
|
||||||
private StatsSet _params;
|
private StatsSet _params;
|
||||||
private DBSpawnManager.DBStatusType _raidStatus;
|
private DBStatusType _raidStatus;
|
||||||
|
|
||||||
/** Contains information about local tax payments. */
|
/** Contains information about local tax payments. */
|
||||||
private L2TaxZone _taxZone = null;
|
private L2TaxZone _taxZone = null;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user