Removed unnecessary final modifiers from classes, methods and fields.
This commit is contained in:
@@ -71,7 +71,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
* The files are usually located in config folder in server root folder.<br>
|
||||
* Each configuration has a default value (that should reflect retail behavior).
|
||||
*/
|
||||
public final class Config
|
||||
public class Config
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(Config.class.getName());
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.logging.Logger;
|
||||
/**
|
||||
* @author NB4L1
|
||||
*/
|
||||
public final class RejectedExecutionHandlerImpl implements RejectedExecutionHandler
|
||||
public class RejectedExecutionHandlerImpl implements RejectedExecutionHandler
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(RejectedExecutionHandlerImpl.class.getName());
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.l2jmobius.Config;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class RunnableWrapper implements Runnable
|
||||
public class RunnableWrapper implements Runnable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(RunnableWrapper.class.getName());
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.l2jmobius.Config;
|
||||
* <li>Instant pool handles short-life events.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public final class ThreadPool
|
||||
public class ThreadPool
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName());
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class BaseRecievePacket
|
||||
return result;
|
||||
}
|
||||
|
||||
public final byte[] readB(int length)
|
||||
public byte[] readB(int length)
|
||||
{
|
||||
final byte[] result = new byte[length];
|
||||
System.arraycopy(_decrypt, _off, result, 0, length);
|
||||
|
||||
@@ -21,7 +21,7 @@ import io.netty.buffer.ByteBuf;
|
||||
/**
|
||||
* @author Nos
|
||||
*/
|
||||
public final class PacketReader
|
||||
public class PacketReader
|
||||
{
|
||||
private final ByteBuf _buf;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import io.netty.buffer.ByteBuf;
|
||||
/**
|
||||
* @author Nos
|
||||
*/
|
||||
public final class PacketWriter
|
||||
public class PacketWriter
|
||||
{
|
||||
private final ByteBuf _buf;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
|
||||
public final class CommonUtil
|
||||
public class CommonUtil
|
||||
{
|
||||
private static final char[] ILLEGAL_CHARACTERS =
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public class DeadLockDetector extends Thread
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void run()
|
||||
public void run()
|
||||
{
|
||||
boolean deadlock = false;
|
||||
while (!deadlock)
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Queue;
|
||||
* @author UnAfraid
|
||||
* @param <E>
|
||||
*/
|
||||
public final class EmptyQueue<E> implements Queue<E>
|
||||
public class EmptyQueue<E> implements Queue<E>
|
||||
{
|
||||
private static final Queue<Object> EMPTY_QUEUE = new EmptyQueue<>();
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class LimitLinesDocumentListener implements DocumentListener
|
||||
* Handle insertion of new text into the Document.
|
||||
*/
|
||||
@Override
|
||||
public void insertUpdate(final DocumentEvent e)
|
||||
public void insertUpdate(DocumentEvent e)
|
||||
{
|
||||
// Changes to the Document can not be done within the listener so we need to add the processing to the end of the EDT.
|
||||
SwingUtilities.invokeLater(() -> removeLines(e));
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.logging.Logger;
|
||||
* Simplifies loading of property files and adds logging if a non existing property is requested.
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class PropertiesParser
|
||||
public class PropertiesParser
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(PropertiesParser.class.getName());
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Random;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class Rnd
|
||||
public class Rnd
|
||||
{
|
||||
/**
|
||||
* Thread-specific random number generator.<br>
|
||||
|
||||
@@ -186,7 +186,7 @@ import org.l2jmobius.Config;
|
||||
*
|
||||
* @author fordfrog
|
||||
*/
|
||||
public final class StringUtil
|
||||
public class StringUtil
|
||||
{
|
||||
private StringUtil()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.l2jmobius.commons.util.crypt;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class BlowfishEngine
|
||||
public class BlowfishEngine
|
||||
{
|
||||
private static final int[] KP =
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ package org.l2jmobius.commons.util.crypt;
|
||||
* Login Server <-> Game Server<br>
|
||||
* Also a static method is provided for the initial xor encryption between Login Server <-> Game Client.
|
||||
*/
|
||||
public final class NewCrypt
|
||||
public class NewCrypt
|
||||
{
|
||||
private final BlowfishEngine _cipher;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
* Game Time controller class.
|
||||
* @author Forsaiken
|
||||
*/
|
||||
public final class GameTimeController extends Thread
|
||||
public class GameTimeController extends Thread
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(GameTimeController.class.getName());
|
||||
|
||||
@@ -71,22 +71,22 @@ public final class GameTimeController extends Thread
|
||||
_instance = new GameTimeController();
|
||||
}
|
||||
|
||||
public final int getGameTime()
|
||||
public int getGameTime()
|
||||
{
|
||||
return (getGameTicks() % TICKS_PER_IG_DAY) / MILLIS_IN_TICK;
|
||||
}
|
||||
|
||||
public final int getGameHour()
|
||||
public int getGameHour()
|
||||
{
|
||||
return getGameTime() / 60;
|
||||
}
|
||||
|
||||
public final int getGameMinute()
|
||||
public int getGameMinute()
|
||||
{
|
||||
return getGameTime() % 60;
|
||||
}
|
||||
|
||||
public final boolean isNight()
|
||||
public boolean isNight()
|
||||
{
|
||||
return getGameHour() < 6;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public final class GameTimeController extends Thread
|
||||
* The true GameTime tick. Directly taken from current time. This represents the tick of the time.
|
||||
* @return
|
||||
*/
|
||||
public final int getGameTicks()
|
||||
public int getGameTicks()
|
||||
{
|
||||
return (int) ((System.currentTimeMillis() - _referenceTime) / MILLIS_IN_TICK);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public final class GameTimeController extends Thread
|
||||
* Add a Creature to movingObjects of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
*/
|
||||
public final void registerMovingObject(Creature creature)
|
||||
public void registerMovingObject(Creature creature)
|
||||
{
|
||||
if (creature == null)
|
||||
{
|
||||
@@ -133,14 +133,14 @@ public final class GameTimeController extends Thread
|
||||
_movingObjects.removeIf(Creature::updatePosition);
|
||||
}
|
||||
|
||||
public final void stopTimer()
|
||||
public void stopTimer()
|
||||
{
|
||||
super.interrupt();
|
||||
LOGGER.info(getClass().getSimpleName() + ": Stopped.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void run()
|
||||
public void run()
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Started.");
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
|
||||
public final class ItemsAutoDestroy
|
||||
public class ItemsAutoDestroy
|
||||
{
|
||||
private final List<ItemInstance> _items = new LinkedList<>();
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
* @param intention The new Intention to set to the AI
|
||||
*/
|
||||
@Override
|
||||
public final void setIntention(CtrlIntention intention)
|
||||
public void setIntention(CtrlIntention intention)
|
||||
{
|
||||
setIntention(intention, null, null);
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
* @param evt The event whose the AI must be notified
|
||||
*/
|
||||
@Override
|
||||
public final void notifyEvent(CtrlEvent evt)
|
||||
public void notifyEvent(CtrlEvent evt)
|
||||
{
|
||||
notifyEvent(evt, null, null);
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
* @param arg0 The first parameter of the Event (optional target)
|
||||
*/
|
||||
@Override
|
||||
public final void notifyEvent(CtrlEvent evt, Object arg0)
|
||||
public void notifyEvent(CtrlEvent evt, Object arg0)
|
||||
{
|
||||
notifyEvent(evt, arg0, null);
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
* @param arg1 The second parameter of the Event (optional target)
|
||||
*/
|
||||
@Override
|
||||
public final void notifyEvent(CtrlEvent evt, Object arg0, Object arg1)
|
||||
public void notifyEvent(CtrlEvent evt, Object arg0, Object arg1)
|
||||
{
|
||||
if ((!_actor.isSpawned() && !_actor.isTeleporting()) || !_actor.hasAI())
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
* AI for controllable mobs
|
||||
* @author littlecrow
|
||||
*/
|
||||
public final class ControllableMobAI extends AttackableAI
|
||||
public class ControllableMobAI extends AttackableAI
|
||||
{
|
||||
public static final int AI_IDLE = 1;
|
||||
public static final int AI_NORMAL = 2;
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
* Loads announcements from database.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class AnnouncementsTable
|
||||
public class AnnouncementsTable
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(AnnouncementsTable.class.getName());
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CharNameTable
|
||||
}
|
||||
}
|
||||
|
||||
public final void addName(PlayerInstance player)
|
||||
public void addName(PlayerInstance player)
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
@@ -70,13 +70,13 @@ public class CharNameTable
|
||||
}
|
||||
}
|
||||
|
||||
public final void removeName(int objId)
|
||||
public void removeName(int objId)
|
||||
{
|
||||
_chars.remove(objId);
|
||||
_accessLevels.remove(objId);
|
||||
}
|
||||
|
||||
public final int getIdByName(String name)
|
||||
public int getIdByName(String name)
|
||||
{
|
||||
if ((name == null) || name.isEmpty())
|
||||
{
|
||||
@@ -127,7 +127,7 @@ public class CharNameTable
|
||||
return -1; // not found
|
||||
}
|
||||
|
||||
public final String getNameById(int id)
|
||||
public String getNameById(int id)
|
||||
{
|
||||
if (id <= 0)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ public class CharNameTable
|
||||
return null; // not found
|
||||
}
|
||||
|
||||
public final int getAccessLevelById(int objectId)
|
||||
public int getAccessLevelById(int objectId)
|
||||
{
|
||||
return getNameById(objectId) != null ? _accessLevels.get(objectId) : 0;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
* Loads and saves crests from database.
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class CrestTable
|
||||
public class CrestTable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CrestTable.class.getName());
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
* Loads administrator access levels and commands.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class AdminData implements IXmlReader
|
||||
public class AdminData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(AdminData.class.getName());
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
* Loads armor set bonuses.
|
||||
* @author godson, Luno, UnAfraid
|
||||
*/
|
||||
public final class ArmorSetsData implements IXmlReader
|
||||
public class ArmorSetsData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ArmorSetsData.class.getName());
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.model.beautyshop.BeautyItem;
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public final class BeautyShopData implements IXmlReader
|
||||
public class BeautyShopData implements IXmlReader
|
||||
{
|
||||
private final Map<Race, Map<Sex, BeautyData>> _beautyList = new HashMap<>();
|
||||
private final Map<Sex, BeautyData> _beautyData = new HashMap<>();
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
||||
* Loads buy lists for NPCs.
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class BuyListData implements IXmlReader
|
||||
public class BuyListData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(BuyListData.class.getName());
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.model.holders.SiegeGuardHolder;
|
||||
/**
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class CastleData implements IXmlReader
|
||||
public class CastleData implements IXmlReader
|
||||
{
|
||||
private final Map<Integer, List<CastleSpawnHolder>> _spawns = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, List<SiegeGuardHolder>> _siegeGuards = new ConcurrentHashMap<>();
|
||||
@@ -117,17 +117,17 @@ public final class CastleData implements IXmlReader
|
||||
}
|
||||
}
|
||||
|
||||
public final List<CastleSpawnHolder> getSpawnsForSide(int castleId, CastleSide side)
|
||||
public List<CastleSpawnHolder> getSpawnsForSide(int castleId, CastleSide side)
|
||||
{
|
||||
return _spawns.getOrDefault(castleId, Collections.emptyList()).stream().filter(s -> s.getSide() == side).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public final List<SiegeGuardHolder> getSiegeGuardsForCastle(int castleId)
|
||||
public List<SiegeGuardHolder> getSiegeGuardsForCastle(int castleId)
|
||||
{
|
||||
return _siegeGuards.getOrDefault(castleId, Collections.emptyList());
|
||||
}
|
||||
|
||||
public final Map<Integer, List<SiegeGuardHolder>> getSiegeGuards()
|
||||
public Map<Integer, List<SiegeGuardHolder>> getSiegeGuards()
|
||||
{
|
||||
return _siegeGuards;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
* Loads the category data with Class or NPC IDs.
|
||||
* @author NosBit, xban1x
|
||||
*/
|
||||
public final class CategoryData implements IXmlReader
|
||||
public class CategoryData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CategoryData.class.getName());
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.model.holders.ClanHallTeleportHolder;
|
||||
/**
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class ClanHallData implements IXmlReader
|
||||
public class ClanHallData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ClanHallData.class.getName());
|
||||
private static final Map<Integer, ClanHall> _clanHalls = new ConcurrentHashMap<>();
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.base.ClassInfo;
|
||||
* Loads the the list of classes and it's info.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class ClassListData implements IXmlReader
|
||||
public class ClassListData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ClassListData.class.getName());
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
* This class loads and hold info about doors.
|
||||
* @author JIV, GodKratos, UnAfraid
|
||||
*/
|
||||
public final class DoorData implements IXmlReader
|
||||
public class DoorData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(DoorData.class.getName());
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public class EnchantItemData implements IXmlReader
|
||||
* @param scroll the scroll
|
||||
* @return enchant template for scroll
|
||||
*/
|
||||
public final EnchantScroll getEnchantScroll(ItemInstance scroll)
|
||||
public EnchantScroll getEnchantScroll(ItemInstance scroll)
|
||||
{
|
||||
return _scrolls.get(scroll.getId());
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class EnchantItemData implements IXmlReader
|
||||
* @param item the item
|
||||
* @return enchant template for support item
|
||||
*/
|
||||
public final EnchantSupportItem getSupportItem(ItemInstance item)
|
||||
public EnchantSupportItem getSupportItem(ItemInstance item)
|
||||
{
|
||||
return _supports.get(item.getId());
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class EnchantItemGroupsData implements IXmlReader
|
||||
public class EnchantItemGroupsData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(EnchantItemGroupsData.class.getName());
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class EnchantItemHPBonusData implements IXmlReader
|
||||
* @param item the item
|
||||
* @return the HP bonus
|
||||
*/
|
||||
public final int getHPBonus(ItemInstance item)
|
||||
public int getHPBonus(ItemInstance item)
|
||||
{
|
||||
final List<Integer> values = _armorHPBonuses.get(item.getItem().getCrystalTypePlus());
|
||||
if ((values == null) || values.isEmpty() || (item.getOlyEnchantLevel() <= 0))
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class EventEngineData implements IXmlReader
|
||||
public class EventEngineData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(EventEngineData.class.getName());
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader;
|
||||
* This class holds the Experience points for each level for players and pets.
|
||||
* @author mrTJO
|
||||
*/
|
||||
public final class ExperienceData implements IXmlReader
|
||||
public class ExperienceData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ExperienceData.class.getName());
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
/**
|
||||
* @author HoridoJoho / FBIagent
|
||||
*/
|
||||
public final class FenceData implements IXmlReader
|
||||
public class FenceData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(FenceData.class.getSimpleName());
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.fishing.FishingRod;
|
||||
* This class holds the Fishing information.
|
||||
* @author bit
|
||||
*/
|
||||
public final class FishingData implements IXmlReader
|
||||
public class FishingData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(FishingData.class.getName());
|
||||
private final Map<Integer, FishingBait> _baitData = new HashMap<>();
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
* Allowed classes to wear each henna.
|
||||
* @author Zoey76, Mobius
|
||||
*/
|
||||
public final class HennaData implements IXmlReader
|
||||
public class HennaData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HennaData.class.getName());
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
* This class load, holds and calculates the hit condition bonuses.
|
||||
* @author Nik
|
||||
*/
|
||||
public final class HitConditionBonusData implements IXmlReader
|
||||
public class HitConditionBonusData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(HitConditionBonusData.class.getName());
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.model.items.PlayerItemTemplate;
|
||||
* What items get each newly created character and if this item is equipped upon creation (<b>Requires the item to be equippable</b>).
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class InitialEquipmentData implements IXmlReader
|
||||
public class InitialEquipmentData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(InitialEquipmentData.class.getName());
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ShortCutRegister;
|
||||
* What shortcuts get each newly created character.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class InitialShortcutData implements IXmlReader
|
||||
public class InitialShortcutData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(InitialShortcutData.class.getName());
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class ItemCrystallizationData implements IXmlReader
|
||||
public class ItemCrystallizationData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ItemCrystallizationData.class.getName());
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.enchant.EnchantItemGroup;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MultiSellList;
|
||||
|
||||
public final class MultisellData implements IXmlReader
|
||||
public class MultisellData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(MultisellData.class.getName());
|
||||
|
||||
@@ -230,7 +230,7 @@ public final class MultisellData implements IXmlReader
|
||||
* @param ingredientMultiplier
|
||||
* @param productMultiplier
|
||||
*/
|
||||
public final void separateAndSend(int listId, PlayerInstance player, Npc npc, boolean inventoryOnly, double ingredientMultiplier, double productMultiplier)
|
||||
public void separateAndSend(int listId, PlayerInstance player, Npc npc, boolean inventoryOnly, double ingredientMultiplier, double productMultiplier)
|
||||
{
|
||||
final MultisellListHolder template = _multisells.get(listId);
|
||||
if (template == null)
|
||||
@@ -269,7 +269,7 @@ public final class MultisellData implements IXmlReader
|
||||
player.setMultiSell(list);
|
||||
}
|
||||
|
||||
public final void separateAndSend(int listId, PlayerInstance player, Npc npc, boolean inventoryOnly)
|
||||
public void separateAndSend(int listId, PlayerInstance player, Npc npc, boolean inventoryOnly)
|
||||
{
|
||||
separateAndSend(listId, player, npc, inventoryOnly, Double.NaN, Double.NaN);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.StatsSet;
|
||||
* TODO: load and use all pet parameters.
|
||||
* @author Zoey76 (rework)
|
||||
*/
|
||||
public final class PetDataTable implements IXmlReader
|
||||
public class PetDataTable implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(PetDataTable.class.getName());
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
* Loads player's base stats.
|
||||
* @author Forsaiken, Zoey76, GKR
|
||||
*/
|
||||
public final class PlayerTemplateData implements IXmlReader
|
||||
public class PlayerTemplateData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(PlayerTemplateData.class.getName());
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.l2jmobius.commons.util.IXmlReader;
|
||||
* This class holds the Player Xp Percent Lost Data for each level for players.
|
||||
* @author Zealar
|
||||
*/
|
||||
public final class PlayerXpPercentLostData implements IXmlReader
|
||||
public class PlayerXpPercentLostData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(PlayerXpPercentLostData.class.getName());
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.residences.ResidenceFunctionTemplate;
|
||||
* The residence functions data
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class ResidenceFunctionsData implements IXmlReader
|
||||
public class ResidenceFunctionsData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ResidenceFunctionsData.class.getName());
|
||||
private final Map<Integer, List<ResidenceFunctionTemplate>> _functions = new HashMap<>();
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.l2jmobius.gameserver.model.shuttle.ShuttleStop;
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class ShuttleData implements IXmlReader
|
||||
public class ShuttleData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ShuttleData.class.getName());
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
* For XML schema please refer to skillTrees.xsd in datapack in xsd folder and for parameters documentation refer to documentation.txt in skillTrees folder.<br>
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class SkillTreesData implements IXmlReader
|
||||
public class SkillTreesData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SkillTreesData.class.getName());
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
* This class loads and holds all static object data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class StaticObjectData implements IXmlReader
|
||||
public class StaticObjectData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(StaticObjectData.class.getName());
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
|
||||
* Transformation data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class TransformData implements IXmlReader
|
||||
public class TransformData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(TransformData.class.getName());
|
||||
|
||||
|
||||
@@ -220,17 +220,17 @@ public class VariationData implements IXmlReader
|
||||
return ((option1 != null) && (option2 != null)) ? new VariationInstance(variation.getMineralId(), option1, option2) : null;
|
||||
}
|
||||
|
||||
public final Variation getVariation(int mineralId)
|
||||
public Variation getVariation(int mineralId)
|
||||
{
|
||||
return _variations.get(mineralId);
|
||||
}
|
||||
|
||||
public final VariationFee getFee(int itemId, int mineralId)
|
||||
public VariationFee getFee(int itemId, int mineralId)
|
||||
{
|
||||
return _fees.getOrDefault(itemId, Collections.emptyMap()).get(mineralId);
|
||||
}
|
||||
|
||||
public final long getCancelFee(int itemId, int mineralId)
|
||||
public long getCancelFee(int itemId, int mineralId)
|
||||
{
|
||||
final Map<Integer, VariationFee> fees = _fees.get(itemId);
|
||||
if (fees == null)
|
||||
@@ -253,7 +253,7 @@ public class VariationData implements IXmlReader
|
||||
return fee.getCancelFee();
|
||||
}
|
||||
|
||||
public final boolean hasFeeData(int itemId)
|
||||
public boolean hasFeeData(int itemId)
|
||||
{
|
||||
Map<Integer, VariationFee> itemFees = _fees.get(itemId);
|
||||
return (itemFees != null) && !itemFees.isEmpty();
|
||||
|
||||
@@ -52,7 +52,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
/**
|
||||
* @author BiggBoss
|
||||
*/
|
||||
public final class BotReportTable
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.model.World;
|
||||
* Spawn data retriever.
|
||||
* @author Zoey76, Mobius
|
||||
*/
|
||||
public final class SpawnTable
|
||||
public class SpawnTable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SpawnTable.class.getName());
|
||||
private static final Map<Integer, Set<Spawn>> _spawnTable = new ConcurrentHashMap<>();
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.model.stats.functions.FuncTemplate;
|
||||
/**
|
||||
* @author mkizub, JIV
|
||||
*/
|
||||
public final class DocumentItem extends DocumentBase implements IXmlReader
|
||||
public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
{
|
||||
Logger LOGGER = Logger.getLogger(DocumentItem.class.getName());
|
||||
|
||||
|
||||
@@ -125,17 +125,17 @@ public enum InstanceType
|
||||
}
|
||||
}
|
||||
|
||||
public final InstanceType getParent()
|
||||
public InstanceType getParent()
|
||||
{
|
||||
return _parent;
|
||||
}
|
||||
|
||||
public final boolean isType(InstanceType it)
|
||||
public boolean isType(InstanceType it)
|
||||
{
|
||||
return ((_maskL & it._typeL) > 0) || ((_maskH & it._typeH) > 0);
|
||||
}
|
||||
|
||||
public final boolean isTypes(InstanceType... it)
|
||||
public boolean isTypes(InstanceType... it)
|
||||
{
|
||||
for (InstanceType i : it)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public enum UserInfoType implements IUpdateTypeComponent
|
||||
* @return the int mask
|
||||
*/
|
||||
@Override
|
||||
public final int getMask()
|
||||
public int getMask()
|
||||
{
|
||||
return _mask;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public class GeoEngine
|
||||
* @param geoY : Geodata Y
|
||||
* @return boolean : True, if given geo coordinates have geodata
|
||||
*/
|
||||
public final boolean hasGeoPos(int geoX, int geoY)
|
||||
public boolean hasGeoPos(int geoX, int geoY)
|
||||
{
|
||||
final ABlock block = getBlock(geoX, geoY);
|
||||
if (block == null) // null block check
|
||||
@@ -306,7 +306,7 @@ public class GeoEngine
|
||||
* @param worldZ : Cell world Z coordinate.
|
||||
* @return short : Cell geodata Z coordinate, closest to given coordinates.
|
||||
*/
|
||||
public final short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
final ABlock block = getBlock(geoX, geoY);
|
||||
return block != null ? block.getHeightNearest(geoX, geoY, worldZ) : (short) worldZ;
|
||||
@@ -319,7 +319,7 @@ public class GeoEngine
|
||||
* @param worldZ : Cell world Z coordinate.
|
||||
* @return short : Cell NSWE flag byte coordinate, closest to given coordinates.
|
||||
*/
|
||||
public final byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
final ABlock block = getBlock(geoX, geoY);
|
||||
return block != null ? block.getNsweNearest(geoX, geoY, worldZ) : (byte) 0xFF;
|
||||
@@ -331,7 +331,7 @@ public class GeoEngine
|
||||
* @param worldY : World Y
|
||||
* @return boolean : True, if given world coordinates have geodata
|
||||
*/
|
||||
public final boolean hasGeo(int worldX, int worldY)
|
||||
public boolean hasGeo(int worldX, int worldY)
|
||||
{
|
||||
return hasGeoPos(getGeoX(worldX), getGeoY(worldY));
|
||||
}
|
||||
@@ -343,7 +343,7 @@ public class GeoEngine
|
||||
* @param worldZ : world z
|
||||
* @return short : nearest Z coordinates according to geodata
|
||||
*/
|
||||
public final short getHeight(int worldX, int worldY, int worldZ)
|
||||
public short getHeight(int worldX, int worldY, int worldZ)
|
||||
{
|
||||
return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ);
|
||||
}
|
||||
@@ -356,7 +356,7 @@ public class GeoEngine
|
||||
* @param target : The target object.
|
||||
* @return {@code boolean} : True if origin can see target
|
||||
*/
|
||||
public final boolean canSeeTarget(WorldObject origin, WorldObject target)
|
||||
public boolean canSeeTarget(WorldObject origin, WorldObject target)
|
||||
{
|
||||
if (target.isDoor() || (target.isCreature() && ((Creature) target).isFlying()))
|
||||
{
|
||||
@@ -433,7 +433,7 @@ public class GeoEngine
|
||||
* @param position : The target position.
|
||||
* @return {@code boolean} : True if object can see position
|
||||
*/
|
||||
public final boolean canSeeTarget(WorldObject origin, Location position)
|
||||
public boolean canSeeTarget(WorldObject origin, Location position)
|
||||
{
|
||||
// get origin and target world coordinates
|
||||
final int ox = origin.getX();
|
||||
@@ -685,7 +685,7 @@ public class GeoEngine
|
||||
* @param instance
|
||||
* @return {code boolean} : True if target coordinates are reachable from origin coordinates
|
||||
*/
|
||||
public final boolean canMoveToTarget(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
|
||||
public boolean canMoveToTarget(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
|
||||
{
|
||||
// get origin and check existing geo coordinates
|
||||
final int gox = getGeoX(ox);
|
||||
@@ -729,7 +729,7 @@ public class GeoEngine
|
||||
* @param instance
|
||||
* @return {@link Location} : Last point where object can walk (just before wall)
|
||||
*/
|
||||
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
|
||||
public Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
|
||||
{
|
||||
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
|
||||
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
|
||||
|
||||
@@ -77,13 +77,13 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasGeoPos()
|
||||
public boolean hasGeoPos()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -99,7 +99,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
public short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -112,7 +112,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
public short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -125,7 +125,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -141,7 +141,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -154,7 +154,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -167,13 +167,13 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
public int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -192,7 +192,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3;
|
||||
@@ -211,7 +211,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeight(int index)
|
||||
public short getHeight(int index)
|
||||
{
|
||||
return (short) ((_buffer[index + 1] & 0x00FF) | (_buffer[index + 2] << 8));
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNswe(int index)
|
||||
public byte getNswe(int index)
|
||||
{
|
||||
return _buffer[index];
|
||||
}
|
||||
@@ -235,13 +235,13 @@ public class BlockComplex extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setNswe(int index, byte nswe)
|
||||
public void setNswe(int index, byte nswe)
|
||||
{
|
||||
_buffer[index] = nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
public void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
{
|
||||
// write block type
|
||||
stream.write(GeoStructure.TYPE_COMPLEX_L2D);
|
||||
|
||||
@@ -45,127 +45,127 @@ public class BlockFlat extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasGeoPos()
|
||||
public boolean hasGeoPos()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
public short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check and return height
|
||||
return _height > worldZ ? _height : Short.MIN_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
public short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check and return height
|
||||
return _height < worldZ ? _height : Short.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check height and return nswe
|
||||
return _height > worldZ ? _nswe : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check height and return nswe
|
||||
return _height < worldZ ? _nswe : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
public int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check height and return index
|
||||
return _height > worldZ ? 0 : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAboveOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return getIndexAbove(geoX, geoY, worldZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// check height and return index
|
||||
return _height < worldZ ? 0 : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelowOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return getIndexBelow(geoX, geoY, worldZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeight(int index)
|
||||
public short getHeight(int index)
|
||||
{
|
||||
return _height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightOriginal(int index)
|
||||
public short getHeightOriginal(int index)
|
||||
{
|
||||
return _height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNswe(int index)
|
||||
public byte getNswe(int index)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweOriginal(int index)
|
||||
public byte getNsweOriginal(int index)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setNswe(int index, byte nswe)
|
||||
public void setNswe(int index, byte nswe)
|
||||
{
|
||||
_nswe = nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
public void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
{
|
||||
// write block type
|
||||
stream.write(GeoStructure.TYPE_FLAT_L2D);
|
||||
|
||||
@@ -111,13 +111,13 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasGeoPos()
|
||||
public boolean hasGeoPos()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = getIndexNearest(geoX, geoY, worldZ);
|
||||
@@ -133,7 +133,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
public short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -168,7 +168,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
public short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -202,7 +202,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// get cell index
|
||||
final int index = getIndexNearest(geoX, geoY, worldZ);
|
||||
@@ -218,7 +218,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -253,7 +253,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -287,7 +287,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
public int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -327,7 +327,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -368,7 +368,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
// move index to the cell given by coordinates
|
||||
int index = 0;
|
||||
@@ -408,7 +408,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeight(int index)
|
||||
public short getHeight(int index)
|
||||
{
|
||||
// get height
|
||||
return (short) ((_buffer[index + 1] & 0x00FF) | (_buffer[index + 2] << 8));
|
||||
@@ -422,7 +422,7 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNswe(int index)
|
||||
public byte getNswe(int index)
|
||||
{
|
||||
// get nswe
|
||||
return _buffer[index];
|
||||
@@ -436,14 +436,14 @@ public class BlockMultilayer extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setNswe(int index, byte nswe)
|
||||
public void setNswe(int index, byte nswe)
|
||||
{
|
||||
// set nswe
|
||||
_buffer[index] = nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
public void saveBlock(BufferedOutputStream stream) throws IOException
|
||||
{
|
||||
// write block type
|
||||
stream.write(GeoStructure.TYPE_MULTILAYER_L2D);
|
||||
|
||||
@@ -31,120 +31,120 @@ public class BlockNull extends ABlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasGeoPos()
|
||||
public boolean hasGeoPos()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return (short) worldZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
public short getHeightNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return (short) worldZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
public short getHeightAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return (short) worldZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
public short getHeightBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return (short) worldZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
public byte getNsweBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
public int getIndexNearest(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAbove(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ)
|
||||
public int getIndexAboveOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelow(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ)
|
||||
public int getIndexBelowOriginal(int geoX, int geoY, int worldZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeight(int index)
|
||||
public short getHeight(int index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final short getHeightOriginal(int index)
|
||||
public short getHeightOriginal(int index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNswe(int index)
|
||||
public byte getNswe(int index)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte getNsweOriginal(int index)
|
||||
public byte getNsweOriginal(int index)
|
||||
{
|
||||
return _nswe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setNswe(int index, byte nswe)
|
||||
public void setNswe(int index, byte nswe)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void saveBlock(BufferedOutputStream stream)
|
||||
public void saveBlock(BufferedOutputStream stream)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.model.World;
|
||||
/**
|
||||
* @author Hasha
|
||||
*/
|
||||
public final class GeoStructure
|
||||
public class GeoStructure
|
||||
{
|
||||
// cells
|
||||
public static final byte CELL_FLAG_E = 1 << 0;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class NodeBuffer
|
||||
* @param gtz : target point z
|
||||
* @return Node : first node of path
|
||||
*/
|
||||
public final Node findPath(int gox, int goy, short goz, int gtx, int gty, short gtz)
|
||||
public Node findPath(int gox, int goy, short goz, int gtx, int gty, short gtz)
|
||||
{
|
||||
// set coordinates (middle of the line (gox,goy) - (gtx,gty), will be in the center of the buffer)
|
||||
_cx = gox + ((gtx - gox - _size) / 2);
|
||||
@@ -104,12 +104,12 @@ public class NodeBuffer
|
||||
return null;
|
||||
}
|
||||
|
||||
public final boolean isLocked()
|
||||
public boolean isLocked()
|
||||
{
|
||||
return _lock.tryLock();
|
||||
}
|
||||
|
||||
public final void free()
|
||||
public void free()
|
||||
{
|
||||
_current = null;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
* Community Board handler.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class CommunityBoardHandler implements IHandler<IParseBoardHandler, String>
|
||||
public class CommunityBoardHandler implements IHandler<IParseBoardHandler, String>
|
||||
{
|
||||
private static final Logger LOG = Logger.getLogger(CommunityBoardHandler.class.getName());
|
||||
/** The registered handlers. */
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public final class ConditionHandler
|
||||
public class ConditionHandler
|
||||
{
|
||||
private final Map<String, Function<StatsSet, ICondition>> _conditionHandlerFactories = new HashMap<>();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
/**
|
||||
* @author BiggBoss, UnAfraid
|
||||
*/
|
||||
public final class EffectHandler
|
||||
public class EffectHandler
|
||||
{
|
||||
private final Map<String, Function<StatsSet, AbstractEffect>> _effectHandlerFactories = new HashMap<>();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class SkillConditionHandler
|
||||
public class SkillConditionHandler
|
||||
{
|
||||
private final Map<String, Function<StatsSet, ISkillCondition>> _skillConditionHandlerFactories = new HashMap<>();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
|
||||
public final class AntiFeedManager
|
||||
public class AntiFeedManager
|
||||
{
|
||||
public static final int GAME_ID = 0;
|
||||
public static final int OLYMPIAD_ID = 1;
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.clan.ClanMember;
|
||||
import org.l2jmobius.gameserver.model.entity.Castle;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
|
||||
public final class CastleManager implements InstanceListManager
|
||||
public class CastleManager implements InstanceListManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CastleManager.class.getName());
|
||||
|
||||
@@ -57,12 +57,12 @@ public final class CastleManager implements InstanceListManager
|
||||
8183
|
||||
};
|
||||
|
||||
public final Castle findNearestCastle(WorldObject obj)
|
||||
public Castle findNearestCastle(WorldObject obj)
|
||||
{
|
||||
return findNearestCastle(obj, Long.MAX_VALUE);
|
||||
}
|
||||
|
||||
public final Castle findNearestCastle(WorldObject obj, long maxDistance)
|
||||
public Castle findNearestCastle(WorldObject obj, long maxDistance)
|
||||
{
|
||||
Castle nearestCastle = getCastle(obj);
|
||||
if (nearestCastle == null)
|
||||
@@ -81,12 +81,12 @@ public final class CastleManager implements InstanceListManager
|
||||
return nearestCastle;
|
||||
}
|
||||
|
||||
public final Castle getCastleById(int castleId)
|
||||
public Castle getCastleById(int castleId)
|
||||
{
|
||||
return _castles.get(castleId);
|
||||
}
|
||||
|
||||
public final Castle getCastleByOwner(Clan clan)
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
@@ -98,7 +98,7 @@ public final class CastleManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Castle getCastle(String name)
|
||||
public Castle getCastle(String name)
|
||||
{
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public final class CastleManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Castle getCastle(int x, int y, int z)
|
||||
public Castle getCastle(int x, int y, int z)
|
||||
{
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
@@ -122,12 +122,12 @@ public final class CastleManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Castle getCastle(WorldObject activeObject)
|
||||
public Castle getCastle(WorldObject activeObject)
|
||||
{
|
||||
return getCastle(activeObject.getX(), activeObject.getY(), activeObject.getZ());
|
||||
}
|
||||
|
||||
public final Collection<Castle> getCastles()
|
||||
public Collection<Castle> getCastles()
|
||||
{
|
||||
return _castles.values();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
* Castle manor system.
|
||||
* @author malyelfik
|
||||
*/
|
||||
public final class CastleManorManager implements IXmlReader, IStorable
|
||||
public class CastleManorManager implements IXmlReader, IStorable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CastleManorManager.class.getName());
|
||||
|
||||
@@ -117,14 +117,14 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void load()
|
||||
public void load()
|
||||
{
|
||||
parseDatapackFile("data/Seeds.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _seeds.size() + " seeds.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parseDocument(Document doc, File f)
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
StatsSet set;
|
||||
NamedNodeMap attrs;
|
||||
@@ -280,7 +280,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
ThreadPool.schedule(this::changeMode, (_nextModeChange.getTimeInMillis() - System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
public final void changeMode()
|
||||
public void changeMode()
|
||||
{
|
||||
switch (_mode)
|
||||
{
|
||||
@@ -431,7 +431,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
scheduleModeChange();
|
||||
}
|
||||
|
||||
public final void setNextSeedProduction(List<SeedProduction> list, int castleId)
|
||||
public void setNextSeedProduction(List<SeedProduction> list, int castleId)
|
||||
{
|
||||
_productionNext.put(castleId, list);
|
||||
if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
|
||||
@@ -467,7 +467,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final void setNextCropProcure(List<CropProcure> list, int castleId)
|
||||
public void setNextCropProcure(List<CropProcure> list, int castleId)
|
||||
{
|
||||
_procureNext.put(castleId, list);
|
||||
if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
|
||||
@@ -504,7 +504,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final void updateCurrentProduction(int castleId, Collection<SeedProduction> items)
|
||||
public void updateCurrentProduction(int castleId, Collection<SeedProduction> items)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE castle_manor_production SET amount = ? WHERE castle_id = ? AND seed_id = ? AND next_period = 0"))
|
||||
@@ -524,7 +524,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final void updateCurrentProcure(int castleId, Collection<CropProcure> items)
|
||||
public void updateCurrentProcure(int castleId, Collection<CropProcure> items)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE castle_manor_procure SET amount = ? WHERE castle_id = ? AND crop_id = ? AND next_period = 0"))
|
||||
@@ -544,12 +544,12 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final List<SeedProduction> getSeedProduction(int castleId, boolean nextPeriod)
|
||||
public List<SeedProduction> getSeedProduction(int castleId, boolean nextPeriod)
|
||||
{
|
||||
return (nextPeriod) ? _productionNext.get(castleId) : _production.get(castleId);
|
||||
}
|
||||
|
||||
public final SeedProduction getSeedProduct(int castleId, int seedId, boolean nextPeriod)
|
||||
public SeedProduction getSeedProduct(int castleId, int seedId, boolean nextPeriod)
|
||||
{
|
||||
for (SeedProduction sp : getSeedProduction(castleId, nextPeriod))
|
||||
{
|
||||
@@ -561,12 +561,12 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
return null;
|
||||
}
|
||||
|
||||
public final List<CropProcure> getCropProcure(int castleId, boolean nextPeriod)
|
||||
public List<CropProcure> getCropProcure(int castleId, boolean nextPeriod)
|
||||
{
|
||||
return (nextPeriod) ? _procureNext.get(castleId) : _procure.get(castleId);
|
||||
}
|
||||
|
||||
public final CropProcure getCropProcure(int castleId, int cropId, boolean nextPeriod)
|
||||
public CropProcure getCropProcure(int castleId, int cropId, boolean nextPeriod)
|
||||
{
|
||||
for (CropProcure cp : getCropProcure(castleId, nextPeriod))
|
||||
{
|
||||
@@ -578,7 +578,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
return null;
|
||||
}
|
||||
|
||||
public final long getManorCost(int castleId, boolean nextPeriod)
|
||||
public long getManorCost(int castleId, boolean nextPeriod)
|
||||
{
|
||||
final List<CropProcure> procure = getCropProcure(castleId, nextPeriod);
|
||||
final List<SeedProduction> production = getSeedProduction(castleId, nextPeriod);
|
||||
@@ -597,7 +597,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean storeMe()
|
||||
public boolean storeMe()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ds = con.prepareStatement("DELETE FROM castle_manor_production");
|
||||
@@ -688,7 +688,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final void resetManorData(int castleId)
|
||||
public void resetManorData(int castleId)
|
||||
{
|
||||
_procure.get(castleId).clear();
|
||||
_procureNext.get(castleId).clear();
|
||||
@@ -716,27 +716,27 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean isUnderMaintenance()
|
||||
public boolean isUnderMaintenance()
|
||||
{
|
||||
return _mode == ManorMode.MAINTENANCE;
|
||||
}
|
||||
|
||||
public final boolean isManorApproved()
|
||||
public boolean isManorApproved()
|
||||
{
|
||||
return _mode == ManorMode.APPROVED;
|
||||
}
|
||||
|
||||
public final boolean isModifiablePeriod()
|
||||
public boolean isModifiablePeriod()
|
||||
{
|
||||
return _mode == ManorMode.MODIFIABLE;
|
||||
}
|
||||
|
||||
public final String getCurrentModeName()
|
||||
public String getCurrentModeName()
|
||||
{
|
||||
return _mode.toString();
|
||||
}
|
||||
|
||||
public final String getNextModeChange()
|
||||
public String getNextModeChange()
|
||||
{
|
||||
return new SimpleDateFormat("dd/MM HH:mm:ss").format(_nextModeChange.getTime());
|
||||
}
|
||||
@@ -744,7 +744,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
// -------------------------------------------------------
|
||||
// Seed methods
|
||||
// -------------------------------------------------------
|
||||
public final List<Seed> getCrops()
|
||||
public List<Seed> getCrops()
|
||||
{
|
||||
final List<Seed> seeds = new ArrayList<>();
|
||||
final List<Integer> cropIds = new ArrayList<>();
|
||||
@@ -760,27 +760,27 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
return seeds;
|
||||
}
|
||||
|
||||
public final Set<Seed> getSeedsForCastle(int castleId)
|
||||
public Set<Seed> getSeedsForCastle(int castleId)
|
||||
{
|
||||
return _seeds.values().stream().filter(s -> s.getCastleId() == castleId).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public final Set<Integer> getSeedIds()
|
||||
public Set<Integer> getSeedIds()
|
||||
{
|
||||
return _seeds.keySet();
|
||||
}
|
||||
|
||||
public final Set<Integer> getCropIds()
|
||||
public Set<Integer> getCropIds()
|
||||
{
|
||||
return _seeds.values().stream().map(Seed::getCropId).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public final Seed getSeed(int seedId)
|
||||
public Seed getSeed(int seedId)
|
||||
{
|
||||
return _seeds.get(seedId);
|
||||
}
|
||||
|
||||
public final Seed getSeedByCrop(int cropId, int castleId)
|
||||
public Seed getSeedByCrop(int cropId, int castleId)
|
||||
{
|
||||
for (Seed s : getSeedsForCastle(castleId))
|
||||
{
|
||||
@@ -792,7 +792,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Seed getSeedByCrop(int cropId)
|
||||
public Seed getSeedByCrop(int cropId)
|
||||
{
|
||||
for (Seed s : _seeds.values())
|
||||
{
|
||||
|
||||
@@ -283,7 +283,7 @@ public class CeremonyOfChaosManager extends AbstractEventManager<CeremonyOfChaos
|
||||
}
|
||||
}
|
||||
|
||||
public final void broadcastPacket(IClientOutgoingPacket... packets)
|
||||
public void broadcastPacket(IClientOutgoingPacket... packets)
|
||||
{
|
||||
getRegisteredPlayers().forEach(member -> member.sendPacket(packets));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class CommissionManager
|
||||
public class CommissionManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CommissionManager.class.getName());
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ import org.l2jmobius.gameserver.util.Broadcast;
|
||||
* UnAfraid: TODO: Rewrite with DocumentParser
|
||||
* @author Micht
|
||||
*/
|
||||
public final class CursedWeaponsManager implements IXmlReader
|
||||
public class CursedWeaponsManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CursedWeaponsManager.class.getName());
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.model.entity.Duel;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
public final class DuelManager
|
||||
public class DuelManager
|
||||
{
|
||||
private static final int[] ARENAS =
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.l2jmobius.gameserver.instancemanager;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class EventShrineManager
|
||||
public class EventShrineManager
|
||||
{
|
||||
private static boolean ENABLE_SHRINES = false;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class FactionManager
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _playerFactions.size() + " character faction values.");
|
||||
}
|
||||
|
||||
public final int getFactionByCharId(int id)
|
||||
public int getFactionByCharId(int id)
|
||||
{
|
||||
if (id <= 0)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ public class FactionManager
|
||||
return 0; // not found
|
||||
}
|
||||
|
||||
public final boolean isSameFaction(PlayerInstance player1, PlayerInstance player2)
|
||||
public boolean isSameFaction(PlayerInstance player1, PlayerInstance player2)
|
||||
{
|
||||
// TODO: Maybe add support for multiple factions?
|
||||
return (player1.isGood() && player2.isGood()) || (player1.isEvil() && player2.isEvil());
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class FakePlayerChatManager implements IXmlReader
|
||||
public class FakePlayerChatManager implements IXmlReader
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(FakePlayerChatManager.class.getName());
|
||||
final List<FakePlayerChatHolder> MESSAGES = new ArrayList<>();
|
||||
|
||||
@@ -31,18 +31,18 @@ import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.entity.Fort;
|
||||
|
||||
public final class FortManager implements InstanceListManager
|
||||
public class FortManager implements InstanceListManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||
|
||||
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||
|
||||
public final Fort findNearestFort(WorldObject obj)
|
||||
public Fort findNearestFort(WorldObject obj)
|
||||
{
|
||||
return findNearestFort(obj, Long.MAX_VALUE);
|
||||
}
|
||||
|
||||
public final Fort findNearestFort(WorldObject obj, long maxDistance)
|
||||
public Fort findNearestFort(WorldObject obj, long maxDistance)
|
||||
{
|
||||
Fort nearestFort = getFort(obj);
|
||||
if (nearestFort == null)
|
||||
@@ -60,7 +60,7 @@ public final class FortManager implements InstanceListManager
|
||||
return nearestFort;
|
||||
}
|
||||
|
||||
public final Fort getFortById(int fortId)
|
||||
public Fort getFortById(int fortId)
|
||||
{
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public final class FortManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Fort getFortByOwner(Clan clan)
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public final class FortManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Fort getFort(String name)
|
||||
public Fort getFort(String name)
|
||||
{
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
@@ -96,7 +96,7 @@ public final class FortManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Fort getFort(int x, int y, int z)
|
||||
public Fort getFort(int x, int y, int z)
|
||||
{
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
@@ -108,12 +108,12 @@ public final class FortManager implements InstanceListManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Fort getFort(WorldObject activeObject)
|
||||
public Fort getFort(WorldObject activeObject)
|
||||
{
|
||||
return getFort(activeObject.getX(), activeObject.getY(), activeObject.getZ());
|
||||
}
|
||||
|
||||
public final Collection<Fort> getForts()
|
||||
public Collection<Fort> getForts()
|
||||
{
|
||||
return _forts.values();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public final class FortSiegeManager
|
||||
public class FortSiegeManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(FortSiegeManager.class.getName());
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class FortSiegeManager
|
||||
load();
|
||||
}
|
||||
|
||||
public final void addSiegeSkills(PlayerInstance character)
|
||||
public void addSiegeSkills(PlayerInstance character)
|
||||
{
|
||||
character.addSkill(CommonSkill.SEAL_OF_RULER.getSkill(), false);
|
||||
character.addSkill(CommonSkill.BUILD_HEADQUARTERS.getSkill(), false);
|
||||
@@ -78,7 +78,7 @@ public final class FortSiegeManager
|
||||
* @param fortid
|
||||
* @return true if the clan is registered or owner of a fort
|
||||
*/
|
||||
public final boolean checkIsRegistered(Clan clan, int fortid)
|
||||
public boolean checkIsRegistered(Clan clan, int fortid)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public final class FortSiegeManager
|
||||
return register;
|
||||
}
|
||||
|
||||
public final void removeSiegeSkills(PlayerInstance character)
|
||||
public void removeSiegeSkills(PlayerInstance character)
|
||||
{
|
||||
character.removeSkill(CommonSkill.SEAL_OF_RULER.getSkill());
|
||||
character.removeSkill(CommonSkill.BUILD_HEADQUARTERS.getSkill());
|
||||
@@ -196,42 +196,42 @@ public final class FortSiegeManager
|
||||
}
|
||||
}
|
||||
|
||||
public final List<FortSiegeSpawn> getCommanderSpawnList(int _fortId)
|
||||
public List<FortSiegeSpawn> getCommanderSpawnList(int _fortId)
|
||||
{
|
||||
return _commanderSpawnList.get(_fortId);
|
||||
}
|
||||
|
||||
public final List<CombatFlag> getFlagList(int _fortId)
|
||||
public List<CombatFlag> getFlagList(int _fortId)
|
||||
{
|
||||
return _flagList.get(_fortId);
|
||||
}
|
||||
|
||||
public final int getAttackerMaxClans()
|
||||
public int getAttackerMaxClans()
|
||||
{
|
||||
return _attackerMaxClans;
|
||||
}
|
||||
|
||||
public final int getFlagMaxCount()
|
||||
public int getFlagMaxCount()
|
||||
{
|
||||
return _flagMaxCount;
|
||||
}
|
||||
|
||||
public final boolean canRegisterJustTerritory()
|
||||
public boolean canRegisterJustTerritory()
|
||||
{
|
||||
return _justToTerritory;
|
||||
}
|
||||
|
||||
public final int getSuspiciousMerchantRespawnDelay()
|
||||
public int getSuspiciousMerchantRespawnDelay()
|
||||
{
|
||||
return _suspiciousMerchantRespawnDelay;
|
||||
}
|
||||
|
||||
public final FortSiege getSiege(WorldObject activeObject)
|
||||
public FortSiege getSiege(WorldObject activeObject)
|
||||
{
|
||||
return getSiege(activeObject.getX(), activeObject.getY(), activeObject.getZ());
|
||||
}
|
||||
|
||||
public final FortSiege getSiege(int x, int y, int z)
|
||||
public FortSiege getSiege(int x, int y, int z)
|
||||
{
|
||||
for (Fort fort : FortManager.getInstance().getForts())
|
||||
{
|
||||
@@ -243,22 +243,22 @@ public final class FortSiegeManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final int getSiegeClanMinLevel()
|
||||
public int getSiegeClanMinLevel()
|
||||
{
|
||||
return _siegeClanMinLevel;
|
||||
}
|
||||
|
||||
public final int getSiegeLength()
|
||||
public int getSiegeLength()
|
||||
{
|
||||
return _siegeLength;
|
||||
}
|
||||
|
||||
public final int getCountDownLength()
|
||||
public int getCountDownLength()
|
||||
{
|
||||
return _countDownLength;
|
||||
}
|
||||
|
||||
public final List<FortSiege> getSieges()
|
||||
public List<FortSiege> getSieges()
|
||||
{
|
||||
if (_sieges == null)
|
||||
{
|
||||
@@ -267,7 +267,7 @@ public final class FortSiegeManager
|
||||
return _sieges;
|
||||
}
|
||||
|
||||
public final void addSiege(FortSiege fortSiege)
|
||||
public void addSiege(FortSiege fortSiege)
|
||||
{
|
||||
getSieges().add(fortSiege);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.variables.AbstractVariables;
|
||||
* Global Variables Manager.
|
||||
* @author xban1x
|
||||
*/
|
||||
public final class GlobalVariablesManager extends AbstractVariables
|
||||
public class GlobalVariablesManager extends AbstractVariables
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(GlobalVariablesManager.class.getName());
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.instancemanager.tasks.UpdateSoDStateTask;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
|
||||
public final class GraciaSeedsManager
|
||||
public class GraciaSeedsManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(GraciaSeedsManager.class.getName());
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.model.interfaces.IStorable;
|
||||
* Grand Boss manager.
|
||||
* @author DaRkRaGe Revised by Emperorc
|
||||
*/
|
||||
public final class GrandBossManager implements IStorable
|
||||
public class GrandBossManager implements IStorable
|
||||
{
|
||||
// SQL queries
|
||||
private static final String UPDATE_GRAND_BOSS_DATA = "UPDATE grandboss_data set loc_x = ?, loc_y = ?, loc_z = ?, heading = ?, respawn_time = ?, currentHP = ?, currentMP = ?, status = ? where boss_id = ?";
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
* as the clearance of the participants list or liberate the arena.
|
||||
* @author BiggBoss
|
||||
*/
|
||||
public final class HandysBlockCheckerManager
|
||||
public class HandysBlockCheckerManager
|
||||
{
|
||||
// All the participants and their team classified by arena
|
||||
private static final ArenaParticipantsHolder[] _arenaPlayers = new ArenaParticipantsHolder[4];
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
* Instance manager.
|
||||
* @author evill33t, GodKratos, malyelfik
|
||||
*/
|
||||
public final class InstanceManager implements IXmlReader
|
||||
public class InstanceManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(InstanceManager.class.getName());
|
||||
// Database query
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.l2jmobius.gameserver.model.itemauction.ItemAuctionInstance;
|
||||
/**
|
||||
* @author Forsaiken
|
||||
*/
|
||||
public final class ItemAuctionManager implements IXmlReader
|
||||
public class ItemAuctionManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ItemAuctionManager.class.getName());
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class ItemAuctionManager implements IXmlReader
|
||||
}
|
||||
}
|
||||
|
||||
public final void shutdown()
|
||||
public void shutdown()
|
||||
{
|
||||
for (ItemAuctionInstance instance : _managerInstances.values())
|
||||
{
|
||||
@@ -122,12 +122,12 @@ public final class ItemAuctionManager implements IXmlReader
|
||||
}
|
||||
}
|
||||
|
||||
public final ItemAuctionInstance getManagerInstance(int instanceId)
|
||||
public ItemAuctionInstance getManagerInstance(int instanceId)
|
||||
{
|
||||
return _managerInstances.get(instanceId);
|
||||
}
|
||||
|
||||
public final int getNextAuctionId()
|
||||
public int getNextAuctionId()
|
||||
{
|
||||
return _auctionIds.getAndIncrement();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
* This class manage all items on ground.
|
||||
* @author Enforcer
|
||||
*/
|
||||
public final class ItemsOnGroundManager implements Runnable
|
||||
public class ItemsOnGroundManager implements Runnable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ItemsOnGroundManager.class.getName());
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUnReadMailCount;
|
||||
/**
|
||||
* @author Migi, DS
|
||||
*/
|
||||
public final class MailManager
|
||||
public class MailManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(MailManager.class.getName());
|
||||
|
||||
@@ -89,17 +89,17 @@ public final class MailManager
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + count + " messages.");
|
||||
}
|
||||
|
||||
public final Message getMessage(int msgId)
|
||||
public Message getMessage(int msgId)
|
||||
{
|
||||
return _messages.get(msgId);
|
||||
}
|
||||
|
||||
public final Collection<Message> getMessages()
|
||||
public Collection<Message> getMessages()
|
||||
{
|
||||
return _messages.values();
|
||||
}
|
||||
|
||||
public final boolean hasUnreadPost(PlayerInstance player)
|
||||
public boolean hasUnreadPost(PlayerInstance player)
|
||||
{
|
||||
final int objectId = player.getObjectId();
|
||||
for (Message msg : _messages.values())
|
||||
@@ -112,7 +112,7 @@ public final class MailManager
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int getInboxSize(int objectId)
|
||||
public int getInboxSize(int objectId)
|
||||
{
|
||||
int size = 0;
|
||||
for (Message msg : _messages.values())
|
||||
@@ -125,7 +125,7 @@ public final class MailManager
|
||||
return size;
|
||||
}
|
||||
|
||||
public final int getOutboxSize(int objectId)
|
||||
public int getOutboxSize(int objectId)
|
||||
{
|
||||
int size = 0;
|
||||
for (Message msg : _messages.values())
|
||||
@@ -138,7 +138,7 @@ public final class MailManager
|
||||
return size;
|
||||
}
|
||||
|
||||
public final List<Message> getInbox(int objectId)
|
||||
public List<Message> getInbox(int objectId)
|
||||
{
|
||||
final List<Message> inbox = new LinkedList<>();
|
||||
for (Message msg : _messages.values())
|
||||
@@ -151,7 +151,7 @@ public final class MailManager
|
||||
return inbox;
|
||||
}
|
||||
|
||||
public final long getUnreadCount(PlayerInstance player)
|
||||
public long getUnreadCount(PlayerInstance player)
|
||||
{
|
||||
return getInbox(player.getObjectId()).stream().filter(Message::isUnread).count();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public final class MailManager
|
||||
return count;
|
||||
}
|
||||
|
||||
public final List<Message> getOutbox(int objectId)
|
||||
public List<Message> getOutbox(int objectId)
|
||||
{
|
||||
final List<Message> outbox = new LinkedList<>();
|
||||
for (Message msg : _messages.values())
|
||||
@@ -212,7 +212,7 @@ public final class MailManager
|
||||
ThreadPool.schedule(new MessageDeletionTask(msg.getId()), msg.getExpiration() - System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public final void markAsReadInDb(int msgId)
|
||||
public void markAsReadInDb(int msgId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE messages SET isUnread = 'false' WHERE messageId = ?"))
|
||||
@@ -226,7 +226,7 @@ public final class MailManager
|
||||
}
|
||||
}
|
||||
|
||||
public final void markAsDeletedBySenderInDb(int msgId)
|
||||
public void markAsDeletedBySenderInDb(int msgId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE messages SET isDeletedBySender = 'true' WHERE messageId = ?"))
|
||||
@@ -240,7 +240,7 @@ public final class MailManager
|
||||
}
|
||||
}
|
||||
|
||||
public final void markAsDeletedByReceiverInDb(int msgId)
|
||||
public void markAsDeletedByReceiverInDb(int msgId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE messages SET isDeletedByReceiver = 'true' WHERE messageId = ?"))
|
||||
@@ -254,7 +254,7 @@ public final class MailManager
|
||||
}
|
||||
}
|
||||
|
||||
public final void removeAttachmentsInDb(int msgId)
|
||||
public void removeAttachmentsInDb(int msgId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE messages SET hasAttachments = 'false' WHERE messageId = ?"))
|
||||
@@ -268,7 +268,7 @@ public final class MailManager
|
||||
}
|
||||
}
|
||||
|
||||
public final void deleteMessageInDb(int msgId)
|
||||
public void deleteMessageInDb(int msgId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("DELETE FROM messages WHERE messageId = ?"))
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.l2jmobius.gameserver.model.zone.type.RespawnZone;
|
||||
* Map Region Manager.
|
||||
* @author Nyaran
|
||||
*/
|
||||
public final class MapRegionManager implements IXmlReader
|
||||
public class MapRegionManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(MapRegionManager.class.getName());
|
||||
|
||||
@@ -142,7 +142,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param locY
|
||||
* @return
|
||||
*/
|
||||
public final MapRegion getMapRegion(int locX, int locY)
|
||||
public MapRegion getMapRegion(int locX, int locY)
|
||||
{
|
||||
for (MapRegion region : _regions.values())
|
||||
{
|
||||
@@ -159,7 +159,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param locY
|
||||
* @return
|
||||
*/
|
||||
public final int getMapRegionLocId(int locX, int locY)
|
||||
public int getMapRegionLocId(int locX, int locY)
|
||||
{
|
||||
final MapRegion region = getMapRegion(locX, locY);
|
||||
if (region != null)
|
||||
@@ -173,7 +173,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public final MapRegion getMapRegion(WorldObject obj)
|
||||
public MapRegion getMapRegion(WorldObject obj)
|
||||
{
|
||||
return getMapRegion(obj.getX(), obj.getY());
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public final int getMapRegionLocId(WorldObject obj)
|
||||
public int getMapRegionLocId(WorldObject obj)
|
||||
{
|
||||
return getMapRegionLocId(obj.getX(), obj.getY());
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param posX
|
||||
* @return
|
||||
*/
|
||||
public final int getMapRegionX(int posX)
|
||||
public int getMapRegionX(int posX)
|
||||
{
|
||||
return (posX >> 15) + 9 + 11; // + centerTileX;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
* @param posY
|
||||
* @return
|
||||
*/
|
||||
public final int getMapRegionY(int posY)
|
||||
public int getMapRegionY(int posY)
|
||||
{
|
||||
return (posY >> 15) + 10 + 8; // + centerTileX;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public final class PcCafePointsManager
|
||||
public class PcCafePointsManager
|
||||
{
|
||||
public void givePcCafePoint(PlayerInstance player, double exp)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
* Petition Manager
|
||||
* @author Tempy
|
||||
*/
|
||||
public final class PetitionManager
|
||||
public class PetitionManager
|
||||
{
|
||||
protected static final Logger LOGGER = Logger.getLogger(PetitionManager.class.getName());
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class PunishmentManager
|
||||
public class PunishmentManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(PunishmentManager.class.getName());
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
* Quests and scripts manager.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class QuestManager
|
||||
public class QuestManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName());
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
* Sell Buffs Manager
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class SellBuffsManager implements IXmlReader
|
||||
public class SellBuffsManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SellBuffsManager.class.getName());
|
||||
private static final List<Integer> ALLOWED_BUFFS = new ArrayList<>();
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
* Siege Guard Manager.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class SiegeGuardManager
|
||||
public class SiegeGuardManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SiegeGuardManager.class.getName());
|
||||
private static final Set<ItemInstance> _droppedTickets = ConcurrentHashMap.newKeySet();
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.model.entity.Siege;
|
||||
import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
public final class SiegeManager
|
||||
public class SiegeManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SiegeManager.class.getName());
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class SiegeManager
|
||||
load();
|
||||
}
|
||||
|
||||
public final void addSiegeSkills(PlayerInstance character)
|
||||
public void addSiegeSkills(PlayerInstance character)
|
||||
{
|
||||
for (Skill sk : SkillData.getInstance().getSiegeSkills(character.getNobleLevel() > 0, character.getClan().getCastleId() > 0))
|
||||
{
|
||||
@@ -75,7 +75,7 @@ public final class SiegeManager
|
||||
* @param castleid
|
||||
* @return true if the clan is registered or owner of a castle
|
||||
*/
|
||||
public final boolean checkIsRegistered(Clan clan, int castleid)
|
||||
public boolean checkIsRegistered(Clan clan, int castleid)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ public final class SiegeManager
|
||||
return register;
|
||||
}
|
||||
|
||||
public final void removeSiegeSkills(PlayerInstance character)
|
||||
public void removeSiegeSkills(PlayerInstance character)
|
||||
{
|
||||
for (Skill sk : SkillData.getInstance().getSiegeSkills(character.getNobleLevel() > 0, character.getClan().getCastleId() > 0))
|
||||
{
|
||||
@@ -196,47 +196,47 @@ public final class SiegeManager
|
||||
}
|
||||
}
|
||||
|
||||
public final List<TowerSpawn> getControlTowers(int castleId)
|
||||
public List<TowerSpawn> getControlTowers(int castleId)
|
||||
{
|
||||
return _controlTowers.get(castleId);
|
||||
}
|
||||
|
||||
public final List<TowerSpawn> getFlameTowers(int castleId)
|
||||
public List<TowerSpawn> getFlameTowers(int castleId)
|
||||
{
|
||||
return _flameTowers.get(castleId);
|
||||
}
|
||||
|
||||
public final int getAttackerMaxClans()
|
||||
public int getAttackerMaxClans()
|
||||
{
|
||||
return _attackerMaxClans;
|
||||
}
|
||||
|
||||
public final int getAttackerRespawnDelay()
|
||||
public int getAttackerRespawnDelay()
|
||||
{
|
||||
return _attackerRespawnDelay;
|
||||
}
|
||||
|
||||
public final int getDefenderMaxClans()
|
||||
public int getDefenderMaxClans()
|
||||
{
|
||||
return _defenderMaxClans;
|
||||
}
|
||||
|
||||
public final int getFlagMaxCount()
|
||||
public int getFlagMaxCount()
|
||||
{
|
||||
return _flagMaxCount;
|
||||
}
|
||||
|
||||
public final Siege getSiege(ILocational loc)
|
||||
public Siege getSiege(ILocational loc)
|
||||
{
|
||||
return getSiege(loc.getX(), loc.getY(), loc.getZ());
|
||||
}
|
||||
|
||||
public final Siege getSiege(WorldObject activeObject)
|
||||
public Siege getSiege(WorldObject activeObject)
|
||||
{
|
||||
return getSiege(activeObject.getX(), activeObject.getY(), activeObject.getZ());
|
||||
}
|
||||
|
||||
public final Siege getSiege(int x, int y, int z)
|
||||
public Siege getSiege(int x, int y, int z)
|
||||
{
|
||||
for (Castle castle : CastleManager.getInstance().getCastles())
|
||||
{
|
||||
@@ -248,22 +248,22 @@ public final class SiegeManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final int getSiegeClanMinLevel()
|
||||
public int getSiegeClanMinLevel()
|
||||
{
|
||||
return _siegeClanMinLevel;
|
||||
}
|
||||
|
||||
public final int getSiegeLength()
|
||||
public int getSiegeLength()
|
||||
{
|
||||
return _siegeLength;
|
||||
}
|
||||
|
||||
public final int getBloodAllianceReward()
|
||||
public int getBloodAllianceReward()
|
||||
{
|
||||
return _bloodAllianceReward;
|
||||
}
|
||||
|
||||
public final List<Siege> getSieges()
|
||||
public List<Siege> getSieges()
|
||||
{
|
||||
final List<Siege> sieges = new LinkedList<>();
|
||||
for (Castle castle : CastleManager.getInstance().getCastles())
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
* This class manages walking monsters.
|
||||
* @author GKR
|
||||
*/
|
||||
public final class WalkingManager implements IXmlReader
|
||||
public class WalkingManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(WalkingManager.class.getName());
|
||||
|
||||
@@ -80,7 +80,7 @@ public final class WalkingManager implements IXmlReader
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void load()
|
||||
public void load()
|
||||
{
|
||||
parseDatapackFile("data/Routes.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _routes.size() + " walking routes.");
|
||||
|
||||
@@ -87,7 +87,7 @@ import org.l2jmobius.gameserver.model.zone.type.WaterZone;
|
||||
* This class manages the zones
|
||||
* @author durgus
|
||||
*/
|
||||
public final class ZoneManager implements IXmlReader
|
||||
public class ZoneManager implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ZoneManager.class.getName());
|
||||
|
||||
@@ -433,7 +433,7 @@ public final class ZoneManager implements IXmlReader
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void load()
|
||||
public void load()
|
||||
{
|
||||
_classZones.clear();
|
||||
_classZones.put(ArenaZone.class, new ConcurrentHashMap<>());
|
||||
@@ -726,7 +726,7 @@ public final class ZoneManager implements IXmlReader
|
||||
* @param creature the creature
|
||||
* @return the olympiad stadium
|
||||
*/
|
||||
public final OlympiadStadiumZone getOlympiadStadium(Creature creature)
|
||||
public OlympiadStadiumZone getOlympiadStadium(Creature creature)
|
||||
{
|
||||
if (creature == null)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user