Replaced qualified names with simple names.

This commit is contained in:
MobiusDev 2018-06-19 03:23:43 +00:00
parent a5b69096dd
commit e7606fb5ec
341 changed files with 1119 additions and 1137 deletions

View File

@ -174,8 +174,8 @@ public class L2ClientDat extends JFrame
{
currentFileWindow = fileopen.getSelectedFile();
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_PACK", currentFileWindow.getPath());
L2ClientDat.addLogConsole("---------------------------------------", true);
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
addLogConsole("---------------------------------------", true);
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
try
{
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();
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY_UNPACK", currentFileWindow.getPath());
L2ClientDat.addLogConsole("---------------------------------------", true);
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
addLogConsole("---------------------------------------", true);
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
try
{
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();
ConfigWindow.save("FILE_OPEN_CURRENT_DIRECTORY", currentFileWindow.getPath());
L2ClientDat.addLogConsole("---------------------------------------", true);
L2ClientDat.addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
addLogConsole("---------------------------------------", true);
addLogConsole("selected folder: " + currentFileWindow.getPath(), true);
try
{
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();
ConfigWindow.save("LAST_FILE_SELECTED", currentFileWindow.getAbsolutePath());
L2ClientDat.addLogConsole("---------------------------------------", true);
L2ClientDat.addLogConsole("Open file: " + currentFileWindow.getName(), true);
addLogConsole("---------------------------------------", true);
addLogConsole("Open file: " + currentFileWindow.getName(), true);
try
{
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
}
L2ClientDat.addLogConsole("---------------------------------------", true);
L2ClientDat.addLogConsole("Saved: " + f.getPath(), true);
addLogConsole("---------------------------------------", true);
addLogConsole("Saved: " + f.getPath(), true);
}
}
else
{
L2ClientDat.addLogConsole("No open file!", true);
addLogConsole("No open file!", true);
}
}
@ -306,7 +306,7 @@ public class L2ClientDat extends JFrame
{
if (currentFileWindow == null)
{
L2ClientDat.addLogConsole("Error saving dat. No file name.", true);
addLogConsole("Error saving dat. No file name.", true);
return;
}
byte[] buff = null;
@ -322,7 +322,7 @@ public class L2ClientDat extends JFrame
buff = DescriptorWriter.parseData(currentFileWindow, crypter, desc, textPaneMain.getText());
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)
{
@ -337,7 +337,7 @@ public class L2ClientDat extends JFrame
}
if (buff == null)
{
L2ClientDat.addLogConsole("buff == null.", true);
addLogConsole("buff == null.", true);
return;
}
try
@ -352,7 +352,7 @@ public class L2ClientDat extends JFrame
DebugUtil.getLogger().error(e.getMessage(), e);
return;
}
L2ClientDat.addLogConsole("Packed successfully.", true);
addLogConsole("Packed successfully.", true);
}
private void saveComboBox(JComboBox<?> jComboBox, String param)

View File

@ -68,7 +68,7 @@ public class ConfigWindow extends ConfigParser
FileOutputStream output = new FileOutputStream(PATH);
props.store(output, "Saved settings");
output.close();
ConfigWindow.load();
load();
}
catch (Exception props)
{

View File

@ -43,7 +43,7 @@ public class ByteReader
public static int readUInt(ByteBuffer buffer)
{
return ByteReader.readInt(buffer);
return readInt(buffer);
}
public static short readShort(ByteBuffer buffer)
@ -135,12 +135,12 @@ public class ByteReader
{
a = "0" + a;
}
return a + ByteReader.readRGB(buffer);
return a + readRGB(buffer);
}
public static String readUtfString(ByteBuffer buffer, boolean isRaw) throws Exception
{
int size = ByteReader.readInt(buffer);
int size = readInt(buffer);
if (size <= 0)
{
return "";
@ -162,19 +162,19 @@ public class ByteReader
{
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
{
int len = ByteReader.readCompactInt(input);
int len = readCompactInt(input);
if (len == 0)
{
return "";
}
byte[] bytes = new byte[len > 0 ? len : -2 * len];
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)

View File

@ -36,7 +36,7 @@ public class ByteWriter
public static Buffer writeCompactInt(int count)
{
byte[] b = ByteWriter.compactIntToByteArray(count);
byte[] b = compactIntToByteArray(count);
ByteBuffer buffer = ByteBuffer.allocate(b.length).order(BYTE_ORDER);
buffer.put(b);
return buffer;
@ -97,7 +97,7 @@ public class ByteWriter
public static Buffer writeRGBA(String rgba)
{
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));
return buffer;
}
@ -111,7 +111,7 @@ public class ByteWriter
}
if (!isRaw)
{
str = ByteWriter.checkAndReplaceNewLine(str);
str = checkAndReplaceNewLine(str);
size = str.length();
}
ByteBuffer buffer = ByteBuffer.allocate((size * 2) + 4).order(BYTE_ORDER);
@ -127,16 +127,16 @@ public class ByteWriter
{
if ((s == null) || s.isEmpty())
{
return ByteWriter.writeCompactInt(0);
return writeCompactInt(0);
}
if (!isRaw)
{
s = ByteWriter.checkAndReplaceNewLine(s);
s = checkAndReplaceNewLine(s);
}
s = s + '\u0000';
boolean def = defaultCharset.newEncoder().canEncode(s);
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);
buffer.put(bSize);
buffer.put(bytes);

View File

@ -75,9 +75,9 @@ public class Util
{
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)
{
continue;
@ -130,7 +130,7 @@ public class Util
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)
@ -225,7 +225,7 @@ public class Util
{
byte[] data = new byte[buf.remaining()];
buf.get(data);
String hex = Util.printData(data, data.length);
String hex = printData(data, data.length);
buf.position(buf.position() - data.length);
return hex;
}
@ -300,7 +300,7 @@ public class Util
DiagnosticCollector diagnostics = new DiagnosticCollector();
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
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);
if (!task.call().booleanValue())
{

View File

@ -45,7 +45,7 @@ public class CryptVersionParser
private CryptVersionParser()
{
CryptVersionParser.parseCryptVersion();
parseCryptVersion();
}
private static void parseCryptVersion()

View File

@ -77,7 +77,7 @@ public class DescriptorWriter
}
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)
{
stream.write((byte[]) result.array());
@ -92,7 +92,7 @@ public class DescriptorWriter
ByteBuffer buffer = ByteBuffer.allocateDirect(data.length() * 2);
String lines = data.replace("\r\n", "\t");
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
{
buffer.flip();
@ -133,22 +133,22 @@ public class DescriptorWriter
{
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)
{
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;
}
param = DescriptorWriter.getDataString(node, node.getName(), paramMap, mapData);
param = getDataString(node, node.getName(), paramMap, mapData);
if (param == null)
{
throw new Exception("Error getDataString == null node: " + node.getName());
}
if (param.isEmpty() || param.equals("{}"))
{
DescriptorWriter.writeSize(currentFile, crypter, buffer, counters, node, 0);
writeSize(currentFile, crypter, buffer, counters, node, 0);
continue;
}
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()));
}
DescriptorWriter.writeSize(currentFile, crypter, buffer, counters, node, cycleSize);
writeSize(currentFile, crypter, buffer, counters, node, cycleSize);
int nPramNode = 0;
int nCycleNode = 0;
for (ParamNode n : node.getSubNodes())
@ -189,13 +189,13 @@ public class DescriptorWriter
}
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;
}
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;
for (ParamNode n : node.getSubNodes())
{
@ -205,19 +205,19 @@ public class DescriptorWriter
}
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;
}
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;
}
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;
}
DescriptorWriter.packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
packData(currentFile, crypter, buffer, lines, counters, paramMap, mapData, node.getSubNodes());
}
catch (Exception e)
{
@ -336,7 +336,7 @@ public class DescriptorWriter
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);
if (pos >= 0)
{

View File

@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
Set<PlayerClass> subclasses = null;
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.remove(pClass);

View File

@ -1950,7 +1950,7 @@ public final class Config
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
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);
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
@ -2984,7 +2984,7 @@ public final class Config
*/
public static void saveHexid(int serverId, String hexId)
{
Config.saveHexid(serverId, hexId, HEXID_FILE);
saveHexid(serverId, hexId, HEXID_FILE);
}
/**

View File

@ -88,7 +88,7 @@ public final class CommonUtil
{
final byte[] data = new byte[buf.remaining()];
buf.get(data);
final String hex = CommonUtil.printData(data, data.length);
final String hex = printData(data, data.length);
buf.position(buf.position() - data.length);
return hex;
}

View File

@ -49,7 +49,7 @@ public final class NewCrypt
*/
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)
{
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)
{
NewCrypt.encXORPass(raw, 0, raw.length, key);
encXORPass(raw, 0, raw.length, key);
}
/**

View File

@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
public boolean isFollowing()
{
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
}
/**

View File

@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
}
// Set the AI Intention to AI_INTENTION_ATTACK
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
return;
@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
// Set the Intention to AI_INTENTION_ATTACK
if (getIntention() != AI_INTENTION_ATTACK)
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
setIntention(AI_INTENTION_ATTACK, attacker);
}
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);
// 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
if (!me.isRunning())
@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
me.setRunning();
}
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
setIntention(AI_INTENTION_ATTACK, target);
}
if (me.isMonster())

View File

@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
{
// If player is trying attack target but he cannot move to attack target
// 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;
}
// 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()))
{

View File

@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
{
case AI_IDLE:
{
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
if (getIntention() != AI_INTENTION_ACTIVE)
{
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
setIntention(AI_INTENTION_ACTIVE);
}
break;
}
@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
if (hated != null)
{
_actor.setRunning();
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
}

View File

@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
else
{
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);
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);
PostBBSManager.getInstance().addPostByTopic(p, t);
parsecmd("_bbsmemo", activeChar);

View File

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

View File

@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
{
final List<Skill> temp = new LinkedList<>();
temp.add(_skills.get(SkillData.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_LIGHT.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)
{
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
}
if (hasCastle)
{
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
}
return temp;
}

View File

@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
{
final int arena = player.getBlockCheckerArena();
final int team = getHolder(arena).getPlayerTeam(player);
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
getInstance().removePlayer(player, arena, team);
if (player.getTeam() != Team.NONE)
{
player.stopAllEffects();

View File

@ -104,7 +104,7 @@ public final class QuestManager
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
}
QuestManager.getInstance().report();
getInstance().report();
}
/**

View File

@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{
@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{

View File

@ -255,7 +255,7 @@ public class BlockList
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
if (player != null)
{
return BlockList.isBlocked(player, targetId);
return isBlocked(player, targetId);
}
if (!OFFLINE_LIST.containsKey(ownerId))
{

View File

@ -1836,7 +1836,7 @@ public class L2Clan implements IIdentifiable, INamable
pledgeType = getAvailablePledgeTypes(pledgeType);
if (pledgeType == 0)
{
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
if (pledgeType == SUBUNIT_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
// 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);
return null;
@ -1876,7 +1876,7 @@ public class L2Clan implements IIdentifiable, INamable
{
// Royal Guard 5000 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);
}
@ -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);
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);
return;
@ -2471,7 +2471,7 @@ public class L2Clan implements IIdentifiable, INamable
setAllyId(0);
setAllyName(null);
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();
}

View File

@ -28,7 +28,6 @@ import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.datatables.ItemTable;
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.items.L2Item;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
@ -234,7 +233,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;
@ -290,7 +289,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;

View File

@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
setIsTeleporting(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
// Adjust position a bit
z += 5;
@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if (target.isDead())
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Checking if target has moved to peace zone
else if (target.isInsidePeaceZone(getActingPlayer()))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
}
else if (isInsidePeaceZone(this, target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
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
{
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.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(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
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
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(ActionFailed.STATIC_PACKET);
return;

View File

@ -151,7 +151,7 @@ public class L2Npc extends L2Character
private NpcStringId _nameString;
private StatsSet _params;
private DBSpawnManager.DBStatusType _raidStatus;
private DBStatusType _raidStatus;
/** Contains information about local tax payments. */
private L2TaxZone _taxZone = null;

View File

@ -949,7 +949,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
*/
public static boolean isAssignableTo(Object obj, Class<?> clazz)
{
return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
return isAssignableTo(obj.getClass(), clazz);
}
public List<Integer> getExtendDrop()

View File

@ -854,25 +854,25 @@ public class FortSiege implements Siegable
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
{
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
{
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)
{
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(300), delay - 300000);
}
else if (delay > 60000)
{
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), delay - 60000);
}
else
{
// 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());
@ -902,7 +902,7 @@ public class FortSiege implements Siegable
}
// Execute siege auto start
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), 0);
}
/**

View File

@ -1028,7 +1028,7 @@ public class Siege implements Siegable
{
_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)
{
_scheduledStartSiegeTask.cancel(true);
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
}
try (Connection con = DatabaseFactory.getInstance().getConnection();

View File

@ -1242,7 +1242,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1273,7 +1273,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1449,7 +1449,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1963,7 +1963,7 @@ public abstract class Inventory extends ItemContainer
public int getWeaponEnchant()
{
final L2ItemInstance item = getPaperdollItem(Inventory.PAPERDOLL_RHAND);
final L2ItemInstance item = getPaperdollItem(PAPERDOLL_RHAND);
return item != null ? item.getEnchantLevel() : 0;
}

View File

@ -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.OnItemTalk;
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.L2EtcItem;
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
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
&& !(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())))));
}

View File

@ -1088,17 +1088,17 @@ public class Olympiad extends ListenersContainer
if (!_nobles.containsKey(player.getObjectId()))
{
final StatsSet statDat = new StatsSet();
statDat.set(Olympiad.CLASS_ID, player.getBaseClass());
statDat.set(Olympiad.CHAR_NAME, player.getName());
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
statDat.set(Olympiad.COMP_DONE, 0);
statDat.set(Olympiad.COMP_WON, 0);
statDat.set(Olympiad.COMP_LOST, 0);
statDat.set(Olympiad.COMP_DRAWN, 0);
statDat.set(Olympiad.COMP_DONE_WEEK, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_CLASSED, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_NON_CLASSED, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_TEAM, 0);
statDat.set(CLASS_ID, player.getBaseClass());
statDat.set(CHAR_NAME, player.getName());
statDat.set(POINTS, DEFAULT_POINTS);
statDat.set(COMP_DONE, 0);
statDat.set(COMP_WON, 0);
statDat.set(COMP_LOST, 0);
statDat.set(COMP_DRAWN, 0);
statDat.set(COMP_DONE_WEEK, 0);
statDat.set(COMP_DONE_WEEK_CLASSED, 0);
statDat.set(COMP_DONE_WEEK_NON_CLASSED, 0);
statDat.set(COMP_DONE_WEEK_TEAM, 0);
statDat.set("to_save", true);
addNobleStats(player.getObjectId(), statDat);
}

View File

@ -492,7 +492,7 @@ public class SkillCaster implements Runnable
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
// 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.
if (!_skill.isWithoutAction())
@ -726,7 +726,7 @@ public class SkillCaster implements Runnable
{
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))
{

View File

@ -82,12 +82,12 @@ public final class Formulas
switch (shld)
{
case Formulas.SHIELD_DEFENSE_SUCCEED:
case SHIELD_DEFENSE_SUCCEED:
{
defence += target.getShldDef();
break;
}
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
{
return 1;
}
@ -1114,7 +1114,7 @@ public final class Formulas
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 ((skill != null) && Formulas.calcSkillMastery(caster, skill))
if ((skill != null) && calcSkillMastery(caster, skill))
{
time *= 2;
}

View File

@ -37,7 +37,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
throw new NullPointerException();
}
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_3);
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_3);
sm.addString(text);
return sm;
}

View File

@ -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 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 SKILL_CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.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 SKILL_CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.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 IExecutionContext _currentExecutionContext = null;

View File

@ -95,7 +95,7 @@ public final class OfflineTradeUtil
*/
public static boolean enteredOfflineMode(L2PcInstance player)
{
if (!OfflineTradeUtil.offlineMode(player))
if (!offlineMode(player))
{
return false;
}

View File

@ -408,9 +408,9 @@ public class ProcessTask extends Task
StringBuffer b = new StringBuffer();
b.append("Task[");
b.append("cmd=");
b.append(ProcessTask.listStrings(command));
b.append(listStrings(command));
b.append(", env=");
b.append(ProcessTask.listStrings(envs));
b.append(listStrings(envs));
b.append(", ");
b.append("dir=");
b.append(directory);

View File

@ -364,7 +364,7 @@ public final class GameServerTable implements IGameXmlReader
public String getName()
{
// 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);
}
/**

View File

@ -67,7 +67,7 @@ public class GameServerThread extends Thread
public void run()
{
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
if (GameServerThread.isBannedGameserverIP(_connectionIPAddress))
if (isBannedGameserverIP(_connectionIPAddress))
{
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
forceClose(LoginServerFail.REASON_IP_BANNED);

View File

@ -108,7 +108,7 @@ public abstract class BaseGameServerRegister
{
interactive = false;
BaseGameServerRegister.printHelp();
printHelp();
}
}
@ -116,7 +116,7 @@ public abstract class BaseGameServerRegister
{
if (interactive)
{
BaseGameServerRegister.startCMD();
startCMD();
}
else
{
@ -129,7 +129,7 @@ public abstract class BaseGameServerRegister
}
catch (HeadlessException e)
{
BaseGameServerRegister.startCMD();
startCMD();
}
}
@ -274,7 +274,7 @@ public abstract class BaseGameServerRegister
{
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
{
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
registerGameServer(e.getKey(), outDir);
return e.getKey();
}
}
@ -372,7 +372,7 @@ public abstract class BaseGameServerRegister
{
if (_id < 0)
{
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
final int registeredId = registerFirstAvailable(_outDir);
if (registeredId < 0)
{
@ -392,14 +392,14 @@ public abstract class BaseGameServerRegister
if (_force)
{
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
BaseGameServerRegister.unregisterGameServer(_id);
BaseGameServerRegister.registerGameServer(_id, _outDir);
unregisterGameServer(_id);
registerGameServer(_id, _outDir);
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
}
else if (_fallback)
{
System.out.println(getBundle().getString("fallingBack"));
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
final int registeredId = registerFirstAvailable(_outDir);
if (registeredId < 0)
{
@ -418,7 +418,7 @@ public abstract class BaseGameServerRegister
else
{
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);
try
{
BaseGameServerRegister.unregisterGameServer(_id);
unregisterGameServer(_id);
}
catch (SQLException e)
{
@ -475,7 +475,7 @@ public abstract class BaseGameServerRegister
{
try
{
BaseGameServerRegister.unregisterAllGameServers();
unregisterAllGameServers();
}
catch (SQLException e)
{

View File

@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
Set<PlayerClass> subclasses = null;
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.remove(pClass);

View File

@ -1966,7 +1966,7 @@ public final class Config
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
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);
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
@ -3000,7 +3000,7 @@ public final class Config
*/
public static void saveHexid(int serverId, String hexId)
{
Config.saveHexid(serverId, hexId, HEXID_FILE);
saveHexid(serverId, hexId, HEXID_FILE);
}
/**

View File

@ -88,7 +88,7 @@ public final class CommonUtil
{
final byte[] data = new byte[buf.remaining()];
buf.get(data);
final String hex = CommonUtil.printData(data, data.length);
final String hex = printData(data, data.length);
buf.position(buf.position() - data.length);
return hex;
}

View File

@ -49,7 +49,7 @@ public final class NewCrypt
*/
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)
{
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)
{
NewCrypt.encXORPass(raw, 0, raw.length, key);
encXORPass(raw, 0, raw.length, key);
}
/**

View File

@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
public boolean isFollowing()
{
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
}
/**

View File

@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
}
// Set the AI Intention to AI_INTENTION_ATTACK
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
return;
@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
// Set the Intention to AI_INTENTION_ATTACK
if (getIntention() != AI_INTENTION_ATTACK)
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
setIntention(AI_INTENTION_ATTACK, attacker);
}
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);
// 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
if (!me.isRunning())
@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
me.setRunning();
}
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
setIntention(AI_INTENTION_ATTACK, target);
}
if (me.isMonster())

View File

@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
{
// If player is trying attack target but he cannot move to attack target
// 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;
}
// 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()))
{

View File

@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
{
case AI_IDLE:
{
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
if (getIntention() != AI_INTENTION_ACTIVE)
{
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
setIntention(AI_INTENTION_ACTIVE);
}
break;
}
@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
if (hated != null)
{
_actor.setRunning();
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
}

View File

@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
else
{
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);
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);
PostBBSManager.getInstance().addPostByTopic(p, t);
parsecmd("_bbsmemo", activeChar);

View File

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

View File

@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
{
final List<Skill> temp = new LinkedList<>();
temp.add(_skills.get(SkillData.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_LIGHT.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)
{
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
}
if (hasCastle)
{
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
}
return temp;
}

View File

@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
{
final int arena = player.getBlockCheckerArena();
final int team = getHolder(arena).getPlayerTeam(player);
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
getInstance().removePlayer(player, arena, team);
if (player.getTeam() != Team.NONE)
{
player.stopAllEffects();

View File

@ -104,7 +104,7 @@ public final class QuestManager
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
}
QuestManager.getInstance().report();
getInstance().report();
}
/**

View File

@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{
@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{

View File

@ -255,7 +255,7 @@ public class BlockList
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
if (player != null)
{
return BlockList.isBlocked(player, targetId);
return isBlocked(player, targetId);
}
if (!OFFLINE_LIST.containsKey(ownerId))
{

View File

@ -1837,7 +1837,7 @@ public class L2Clan implements IIdentifiable, INamable
pledgeType = getAvailablePledgeTypes(pledgeType);
if (pledgeType == 0)
{
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
if (pledgeType == SUBUNIT_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
// 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);
return null;
@ -1877,7 +1877,7 @@ public class L2Clan implements IIdentifiable, INamable
{
// Royal Guard 5000 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);
}
@ -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);
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);
return;
@ -2472,7 +2472,7 @@ public class L2Clan implements IIdentifiable, INamable
setAllyId(0);
setAllyName(null);
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();
}

View File

@ -28,7 +28,6 @@ import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.datatables.ItemTable;
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.items.L2Item;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
@ -234,7 +233,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;
@ -290,7 +289,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;

View File

@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
setIsTeleporting(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
// Adjust position a bit
z += 5;
@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if (target.isDead())
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Checking if target has moved to peace zone
else if (target.isInsidePeaceZone(getActingPlayer()))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
}
else if (isInsidePeaceZone(this, target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
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
{
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.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(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
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
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(ActionFailed.STATIC_PACKET);
return;

View File

@ -151,7 +151,7 @@ public class L2Npc extends L2Character
private NpcStringId _nameString;
private StatsSet _params;
private DBSpawnManager.DBStatusType _raidStatus;
private DBStatusType _raidStatus;
/** Contains information about local tax payments. */
private L2TaxZone _taxZone = null;

View File

@ -949,7 +949,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
*/
public static boolean isAssignableTo(Object obj, Class<?> clazz)
{
return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
return isAssignableTo(obj.getClass(), clazz);
}
public List<Integer> getExtendDrop()

View File

@ -854,25 +854,25 @@ public class FortSiege implements Siegable
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
{
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
{
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)
{
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(300), delay - 300000);
}
else if (delay > 60000)
{
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), delay - 60000);
}
else
{
// 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());
@ -902,7 +902,7 @@ public class FortSiege implements Siegable
}
// Execute siege auto start
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), 0);
}
/**

View File

@ -1028,7 +1028,7 @@ public class Siege implements Siegable
{
_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)
{
_scheduledStartSiegeTask.cancel(true);
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
}
try (Connection con = DatabaseFactory.getInstance().getConnection();

View File

@ -1272,7 +1272,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1479,7 +1479,7 @@ public abstract class Inventory extends ItemContainer
*/
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
{
final Inventory.ChangeRecorder recorder = newRecorder();
final ChangeRecorder recorder = newRecorder();
try
{
@ -1993,7 +1993,7 @@ public abstract class Inventory extends ItemContainer
public int getWeaponEnchant()
{
final L2ItemInstance item = getPaperdollItem(Inventory.PAPERDOLL_RHAND);
final L2ItemInstance item = getPaperdollItem(PAPERDOLL_RHAND);
return item != null ? item.getEnchantLevel() : 0;
}

View File

@ -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.OnItemTalk;
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.L2EtcItem;
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
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
&& !(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())))));
}

View File

@ -1088,17 +1088,17 @@ public class Olympiad extends ListenersContainer
if (!_nobles.containsKey(player.getObjectId()))
{
final StatsSet statDat = new StatsSet();
statDat.set(Olympiad.CLASS_ID, player.getBaseClass());
statDat.set(Olympiad.CHAR_NAME, player.getName());
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
statDat.set(Olympiad.COMP_DONE, 0);
statDat.set(Olympiad.COMP_WON, 0);
statDat.set(Olympiad.COMP_LOST, 0);
statDat.set(Olympiad.COMP_DRAWN, 0);
statDat.set(Olympiad.COMP_DONE_WEEK, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_CLASSED, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_NON_CLASSED, 0);
statDat.set(Olympiad.COMP_DONE_WEEK_TEAM, 0);
statDat.set(CLASS_ID, player.getBaseClass());
statDat.set(CHAR_NAME, player.getName());
statDat.set(POINTS, DEFAULT_POINTS);
statDat.set(COMP_DONE, 0);
statDat.set(COMP_WON, 0);
statDat.set(COMP_LOST, 0);
statDat.set(COMP_DRAWN, 0);
statDat.set(COMP_DONE_WEEK, 0);
statDat.set(COMP_DONE_WEEK_CLASSED, 0);
statDat.set(COMP_DONE_WEEK_NON_CLASSED, 0);
statDat.set(COMP_DONE_WEEK_TEAM, 0);
statDat.set("to_save", true);
addNobleStats(player.getObjectId(), statDat);
}

View File

@ -492,7 +492,7 @@ public class SkillCaster implements Runnable
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
// 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.
if (!_skill.isWithoutAction())
@ -726,7 +726,7 @@ public class SkillCaster implements Runnable
{
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))
{

View File

@ -82,12 +82,12 @@ public final class Formulas
switch (shld)
{
case Formulas.SHIELD_DEFENSE_SUCCEED:
case SHIELD_DEFENSE_SUCCEED:
{
defence += target.getShldDef();
break;
}
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
{
return 1;
}
@ -1114,7 +1114,7 @@ public final class Formulas
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 ((skill != null) && Formulas.calcSkillMastery(caster, skill))
if ((skill != null) && calcSkillMastery(caster, skill))
{
time *= 2;
}

View File

@ -37,7 +37,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
throw new NullPointerException();
}
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_3);
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_3);
sm.addString(text);
return sm;
}

View File

@ -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 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 SKILL_CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.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 SKILL_CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.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");
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();

View File

@ -95,7 +95,7 @@ public final class OfflineTradeUtil
*/
public static boolean enteredOfflineMode(L2PcInstance player)
{
if (!OfflineTradeUtil.offlineMode(player))
if (!offlineMode(player))
{
return false;
}

View File

@ -408,9 +408,9 @@ public class ProcessTask extends Task
StringBuffer b = new StringBuffer();
b.append("Task[");
b.append("cmd=");
b.append(ProcessTask.listStrings(command));
b.append(listStrings(command));
b.append(", env=");
b.append(ProcessTask.listStrings(envs));
b.append(listStrings(envs));
b.append(", ");
b.append("dir=");
b.append(directory);

View File

@ -364,7 +364,7 @@ public final class GameServerTable implements IGameXmlReader
public String getName()
{
// 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);
}
/**

View File

@ -67,7 +67,7 @@ public class GameServerThread extends Thread
public void run()
{
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
if (GameServerThread.isBannedGameserverIP(_connectionIPAddress))
if (isBannedGameserverIP(_connectionIPAddress))
{
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
forceClose(LoginServerFail.REASON_IP_BANNED);

View File

@ -108,7 +108,7 @@ public abstract class BaseGameServerRegister
{
interactive = false;
BaseGameServerRegister.printHelp();
printHelp();
}
}
@ -116,7 +116,7 @@ public abstract class BaseGameServerRegister
{
if (interactive)
{
BaseGameServerRegister.startCMD();
startCMD();
}
else
{
@ -129,7 +129,7 @@ public abstract class BaseGameServerRegister
}
catch (HeadlessException e)
{
BaseGameServerRegister.startCMD();
startCMD();
}
}
@ -274,7 +274,7 @@ public abstract class BaseGameServerRegister
{
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
{
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
registerGameServer(e.getKey(), outDir);
return e.getKey();
}
}
@ -372,7 +372,7 @@ public abstract class BaseGameServerRegister
{
if (_id < 0)
{
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
final int registeredId = registerFirstAvailable(_outDir);
if (registeredId < 0)
{
@ -392,14 +392,14 @@ public abstract class BaseGameServerRegister
if (_force)
{
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
BaseGameServerRegister.unregisterGameServer(_id);
BaseGameServerRegister.registerGameServer(_id, _outDir);
unregisterGameServer(_id);
registerGameServer(_id, _outDir);
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
}
else if (_fallback)
{
System.out.println(getBundle().getString("fallingBack"));
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
final int registeredId = registerFirstAvailable(_outDir);
if (registeredId < 0)
{
@ -418,7 +418,7 @@ public abstract class BaseGameServerRegister
else
{
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);
try
{
BaseGameServerRegister.unregisterGameServer(_id);
unregisterGameServer(_id);
}
catch (SQLException e)
{
@ -475,7 +475,7 @@ public abstract class BaseGameServerRegister
{
try
{
BaseGameServerRegister.unregisterAllGameServers();
unregisterAllGameServers();
}
catch (SQLException e)
{

View File

@ -826,7 +826,7 @@ public final class Raina extends AbstractNpcAI
Set<PlayerClass> subclasses = null;
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.remove(pClass);

View File

@ -1974,7 +1974,7 @@ public final class Config
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
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);
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
@ -3017,7 +3017,7 @@ public final class Config
*/
public static void saveHexid(int serverId, String hexId)
{
Config.saveHexid(serverId, hexId, HEXID_FILE);
saveHexid(serverId, hexId, HEXID_FILE);
}
/**

View File

@ -88,7 +88,7 @@ public final class CommonUtil
{
final byte[] data = new byte[buf.remaining()];
buf.get(data);
final String hex = CommonUtil.printData(data, data.length);
final String hex = printData(data, data.length);
buf.position(buf.position() - data.length);
return hex;
}

View File

@ -49,7 +49,7 @@ public final class NewCrypt
*/
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)
{
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)
{
NewCrypt.encXORPass(raw, 0, raw.length, key);
encXORPass(raw, 0, raw.length, key);
}
/**

View File

@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
public boolean isFollowing()
{
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
}
/**

View File

@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -490,7 +490,7 @@ public class L2AttackableAI extends L2CharacterAI
}
// Set the AI Intention to AI_INTENTION_ATTACK
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
return;
@ -1254,11 +1254,11 @@ public class L2AttackableAI extends L2CharacterAI
// Set the Intention to AI_INTENTION_ATTACK
if (getIntention() != AI_INTENTION_ATTACK)
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
setIntention(AI_INTENTION_ATTACK, attacker);
}
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);
// 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
if (!me.isRunning())
@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
me.setRunning();
}
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
setIntention(AI_INTENTION_ATTACK, target);
}
if (me.isMonster())

View File

@ -972,16 +972,16 @@ public class L2CharacterAI extends AbstractAI
{
// If player is trying attack target but he cannot move to attack target
// 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;
}
// 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()))
{

View File

@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
{
case AI_IDLE:
{
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
if (getIntention() != AI_INTENTION_ACTIVE)
{
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
setIntention(AI_INTENTION_ACTIVE);
}
break;
}
@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
if (hated != null)
{
_actor.setRunning();
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
setIntention(AI_INTENTION_ATTACK, hated);
}
}

View File

@ -214,7 +214,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
}
else
{
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
setIntention(AI_INTENTION_ATTACK, _lastAttack);
_lastAttack = null;
}
}

View File

@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
else
{
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);
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);
PostBBSManager.getInstance().addPostByTopic(p, t);
parsecmd("_bbsmemo", activeChar);

View File

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

View File

@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
{
final List<Skill> temp = new LinkedList<>();
temp.add(_skills.get(SkillData.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_LIGHT.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)
{
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
}
if (hasCastle)
{
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
}
return temp;
}

View File

@ -331,7 +331,7 @@ public final class HandysBlockCheckerManager
{
final int arena = player.getBlockCheckerArena();
final int team = getHolder(arena).getPlayerTeam(player);
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
getInstance().removePlayer(player, arena, team);
if (player.getTeam() != Team.NONE)
{
player.stopAllEffects();

View File

@ -104,7 +104,7 @@ public final class QuestManager
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
}
QuestManager.getInstance().report();
getInstance().report();
}
/**

View File

@ -665,7 +665,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{
@ -688,7 +688,7 @@ public final class ZoneManager implements IGameXmlReader
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))
{

View File

@ -255,7 +255,7 @@ public class BlockList
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
if (player != null)
{
return BlockList.isBlocked(player, targetId);
return isBlocked(player, targetId);
}
if (!OFFLINE_LIST.containsKey(ownerId))
{

View File

@ -1837,7 +1837,7 @@ public class L2Clan implements IIdentifiable, INamable
pledgeType = getAvailablePledgeTypes(pledgeType);
if (pledgeType == 0)
{
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
if (pledgeType == SUBUNIT_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
// 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);
return null;
@ -1877,7 +1877,7 @@ public class L2Clan implements IIdentifiable, INamable
{
// Royal Guard 5000 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);
}
@ -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);
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);
return;
@ -2472,7 +2472,7 @@ public class L2Clan implements IIdentifiable, INamable
setAllyId(0);
setAllyName(null);
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();
}

View File

@ -28,7 +28,6 @@ import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.datatables.ItemTable;
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.items.L2Item;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
@ -234,7 +233,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;
@ -290,7 +289,7 @@ public class TradeList
return null;
}
if ((Inventory.MAX_ADENA / count) < price)
if ((MAX_ADENA / count) < price)
{
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
return null;

View File

@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
setIsTeleporting(true);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
// Adjust position a bit
z += 5;
@ -922,7 +922,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -930,7 +930,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if (target.isDead())
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -966,14 +966,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Checking if target has moved to peace zone
else if (target.isInsidePeaceZone(getActingPlayer()))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
}
else if (isInsidePeaceZone(this, target))
{
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
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
{
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
getAI().setIntention(AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.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(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
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
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(ActionFailed.STATIC_PACKET);
return;

View File

@ -151,7 +151,7 @@ public class L2Npc extends L2Character
private NpcStringId _nameString;
private StatsSet _params;
private DBSpawnManager.DBStatusType _raidStatus;
private DBStatusType _raidStatus;
/** Contains information about local tax payments. */
private L2TaxZone _taxZone = null;

Some files were not shown because too many files have changed in this diff Show More