Some code formatting.
This commit is contained in:
@@ -101,7 +101,7 @@ public final class GameTimeController extends Thread
|
||||
* Add a L2Character to movingObjects of GameTimeController.
|
||||
* @param cha The L2Character to add to movingObjects of GameTimeController
|
||||
*/
|
||||
public final void registerMovingObject(final L2Character cha)
|
||||
public final void registerMovingObject(L2Character cha)
|
||||
{
|
||||
if (cha == null)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ThreadPoolManager
|
||||
{
|
||||
private final Runnable _r;
|
||||
|
||||
public RunnableWrapper(final Runnable r)
|
||||
public RunnableWrapper(Runnable r)
|
||||
{
|
||||
_r = r;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ public class ClanTable
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerClanDestroy(leaderMember, clan));
|
||||
}
|
||||
|
||||
public void scheduleRemoveClan(final int clanId)
|
||||
public void scheduleRemoveClan(int clanId)
|
||||
{
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(() ->
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class PlayerXpPercentLostData implements IXmlReader
|
||||
}
|
||||
}
|
||||
|
||||
public double getXpPercent(final int level)
|
||||
public double getXpPercent(int level)
|
||||
{
|
||||
if (level > _maxlevel)
|
||||
{
|
||||
|
||||
@@ -338,7 +338,7 @@ public final class BotReportTable
|
||||
* @param bot (L2PcInstance to be punished)
|
||||
* @param rcd (RepotedCharData linked to this bot)
|
||||
*/
|
||||
private void handleReport(L2PcInstance bot, final ReportedCharData rcd)
|
||||
private void handleReport(L2PcInstance bot, ReportedCharData rcd)
|
||||
{
|
||||
// Report count punishment
|
||||
punishBot(bot, _punishments.get(rcd.getReportCount()));
|
||||
@@ -596,7 +596,7 @@ public final class BotReportTable
|
||||
final Skill _punish;
|
||||
final int _systemMessageId;
|
||||
|
||||
PunishHolder(final Skill sk, final int sysMsg)
|
||||
PunishHolder(Skill sk, int sysMsg)
|
||||
{
|
||||
_punish = sk;
|
||||
_systemMessageId = sysMsg;
|
||||
|
||||
@@ -197,7 +197,7 @@ public class MerchantPriceConfigTable implements InstanceListManager
|
||||
private Castle _castle;
|
||||
private final int _zoneId;
|
||||
|
||||
public MerchantPriceConfig(final int id, final String name, final int baseTax, final int castleId, final int zoneId)
|
||||
public MerchantPriceConfig(int id, String name, int baseTax, int castleId, int zoneId)
|
||||
{
|
||||
_id = id;
|
||||
_name = name;
|
||||
|
||||
@@ -90,7 +90,7 @@ public class DocumentEngine
|
||||
return doc.getSkills();
|
||||
}
|
||||
|
||||
public void loadAllSkills(final Map<Integer, Skill> allSkills)
|
||||
public void loadAllSkills(Map<Integer, Skill> allSkills)
|
||||
{
|
||||
int count = 0;
|
||||
for (File file : _skillFiles)
|
||||
|
||||
@@ -124,7 +124,7 @@ public final class ItemAuctionManager
|
||||
}
|
||||
}
|
||||
|
||||
public final ItemAuctionInstance getManagerInstance(final int instanceId)
|
||||
public final ItemAuctionInstance getManagerInstance(int instanceId)
|
||||
{
|
||||
return _managerInstances.get(instanceId);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public final class ItemAuctionManager
|
||||
return _auctionIds.getAndIncrement();
|
||||
}
|
||||
|
||||
public static final void deleteAuction(final int auctionId)
|
||||
public static final void deleteAuction(int auctionId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class PcCafePointsManager
|
||||
{
|
||||
}
|
||||
|
||||
public void givePcCafePoint(final L2PcInstance player, final long exp)
|
||||
public void givePcCafePoint(L2PcInstance player, long exp)
|
||||
{
|
||||
if (!Config.PC_BANG_ENABLED)
|
||||
{
|
||||
|
||||
@@ -254,7 +254,7 @@ public final class WalkingManager implements IXmlReader
|
||||
* @param npc NPC to move
|
||||
* @param routeName name of route to move by
|
||||
*/
|
||||
public void startMoving(final L2Npc npc, final String routeName)
|
||||
public void startMoving(L2Npc npc, String routeName)
|
||||
{
|
||||
if (_routes.containsKey(routeName) && (npc != null) && !npc.isDead()) // check, if these route and NPC present
|
||||
{
|
||||
@@ -355,7 +355,7 @@ public final class WalkingManager implements IXmlReader
|
||||
* Resumes previously stopped moving
|
||||
* @param npc NPC to resume
|
||||
*/
|
||||
public void resumeMoving(final L2Npc npc)
|
||||
public void resumeMoving(L2Npc npc)
|
||||
{
|
||||
final WalkInfo walk = _activeRoutes.get(npc.getObjectId());
|
||||
if (walk != null)
|
||||
@@ -414,7 +414,7 @@ public final class WalkingManager implements IXmlReader
|
||||
* Manage "node arriving"-related tasks: schedule move to next node; send ON_NODE_ARRIVED event to Quest script
|
||||
* @param npc NPC to manage
|
||||
*/
|
||||
public void onArrived(final L2Npc npc)
|
||||
public void onArrived(L2Npc npc)
|
||||
{
|
||||
if (_activeRoutes.containsKey(npc.getObjectId()))
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@ public abstract class AbstractPlayerGroup
|
||||
* Broadcast a packet to every member of this group.
|
||||
* @param packet the packet to broadcast
|
||||
*/
|
||||
public void broadcastPacket(final L2GameServerPacket packet)
|
||||
public void broadcastPacket(L2GameServerPacket packet)
|
||||
{
|
||||
forEachMember(m ->
|
||||
{
|
||||
@@ -144,7 +144,7 @@ public abstract class AbstractPlayerGroup
|
||||
broadcastPacket(SystemMessage.sendString(text));
|
||||
}
|
||||
|
||||
public void broadcastCreatureSay(final CreatureSay msg, final L2PcInstance broadcaster)
|
||||
public void broadcastCreatureSay(CreatureSay msg, L2PcInstance broadcaster)
|
||||
{
|
||||
forEachMember(m ->
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ClanInfo
|
||||
private final int _total;
|
||||
private final int _online;
|
||||
|
||||
public ClanInfo(final L2Clan clan)
|
||||
public ClanInfo(L2Clan clan)
|
||||
{
|
||||
_clan = clan;
|
||||
_total = clan.getMembersCount();
|
||||
|
||||
@@ -122,7 +122,7 @@ public final class L2WorldRegion
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkEffectRangeInsidePeaceZone(Skill skill, final int x, final int y, final int z)
|
||||
public boolean checkEffectRangeInsidePeaceZone(Skill skill, int x, int y, int z)
|
||||
{
|
||||
final int range = skill.getEffectRange();
|
||||
final int up = y + range;
|
||||
|
||||
@@ -926,7 +926,7 @@ public class L2Attackable extends L2Npc
|
||||
* @param target The L2Character whose hate level must be returned
|
||||
* @return the hate level of the L2Attackable against this L2Character contained in _aggroList.
|
||||
*/
|
||||
public int getHating(final L2Character target)
|
||||
public int getHating(L2Character target)
|
||||
{
|
||||
if (_aggroList.isEmpty() || (target == null))
|
||||
{
|
||||
|
||||
@@ -462,7 +462,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
* @param zone
|
||||
* @param state
|
||||
*/
|
||||
public final void setInsideZone(ZoneId zone, final boolean state)
|
||||
public final void setInsideZone(ZoneId zone, boolean state)
|
||||
{
|
||||
synchronized (_zones)
|
||||
{
|
||||
@@ -5309,7 +5309,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
* @param weapon
|
||||
* @return the Reuse Time of Attack (used for bow delay)
|
||||
*/
|
||||
public int calculateReuseTime(final L2Weapon weapon)
|
||||
public int calculateReuseTime(L2Weapon weapon)
|
||||
{
|
||||
if (isTransformed())
|
||||
{
|
||||
@@ -6655,7 +6655,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return;
|
||||
}
|
||||
|
||||
L2Object target = getTarget();
|
||||
final L2Object target = getTarget();
|
||||
if ((target != null) && target.isNpc())
|
||||
{
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee((L2Npc) target, getActingPlayer(), id), (L2Npc) target);
|
||||
@@ -6896,7 +6896,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
* @param target
|
||||
* @param isDot
|
||||
*/
|
||||
public void notifyAttackAvoid(final L2Character target, final boolean isDot)
|
||||
public void notifyAttackAvoid(L2Character target, boolean isDot)
|
||||
{
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnCreatureAttackAvoid(this, target, isDot), target);
|
||||
}
|
||||
|
||||
@@ -1549,7 +1549,7 @@ public class L2Npc extends L2Character
|
||||
* @param paramName the parameter name to check
|
||||
* @return given AI parameter value
|
||||
*/
|
||||
public int getAIValue(final String paramName)
|
||||
public int getAIValue(String paramName)
|
||||
{
|
||||
return hasAIValue(paramName) ? NpcPersonalAIData.getInstance().getAIValue(getSpawn().getName(), paramName) : -1;
|
||||
}
|
||||
@@ -1558,7 +1558,7 @@ public class L2Npc extends L2Character
|
||||
* @param paramName the parameter name to check
|
||||
* @return {@code true} if given parameter is set for NPC, {@code false} otherwise
|
||||
*/
|
||||
public boolean hasAIValue(final String paramName)
|
||||
public boolean hasAIValue(String paramName)
|
||||
{
|
||||
return (getSpawn() != null) && (getSpawn().getName() != null) && NpcPersonalAIData.getInstance().hasAIValue(getSpawn().getName(), paramName);
|
||||
}
|
||||
|
||||
@@ -4370,7 +4370,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public final void broadcastPacket(SocialAction sa)
|
||||
{
|
||||
L2Object target = getTarget();
|
||||
final L2Object target = getTarget();
|
||||
if ((target != null) && target.isNpc())
|
||||
{
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee((L2Npc) target, getActingPlayer(), sa.getId()), (L2Npc) target);
|
||||
@@ -14410,7 +14410,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return _pcBangPoints;
|
||||
}
|
||||
|
||||
public void setPcBangPoints(final int count)
|
||||
public void setPcBangPoints(int count)
|
||||
{
|
||||
if (count < 200000)
|
||||
{
|
||||
|
||||
@@ -23,13 +23,13 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public abstract class Builder
|
||||
{
|
||||
public abstract String toString(final Object param);
|
||||
public abstract String toString(Object param);
|
||||
|
||||
public abstract String toString(final Object... params);
|
||||
public abstract String toString(Object... params);
|
||||
|
||||
public abstract int getIndex();
|
||||
|
||||
public static final Builder newBuilder(final String text)
|
||||
public static final Builder newBuilder(String text)
|
||||
{
|
||||
final ArrayList<Builder> builders = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ final class BuilderContainer extends Builder
|
||||
{
|
||||
private final Builder[] _builders;
|
||||
|
||||
BuilderContainer(final Builder[] builders)
|
||||
BuilderContainer(Builder[] builders)
|
||||
{
|
||||
_builders = builders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object param)
|
||||
public final String toString(Object param)
|
||||
{
|
||||
return toString(new Object[]
|
||||
{
|
||||
@@ -38,7 +38,7 @@ final class BuilderContainer extends Builder
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object... params)
|
||||
public final String toString(Object... params)
|
||||
{
|
||||
final int buildersLength = _builders.length;
|
||||
final int paramsLength = params.length;
|
||||
|
||||
@@ -23,7 +23,7 @@ final class BuilderObject extends Builder
|
||||
{
|
||||
private final int _index;
|
||||
|
||||
BuilderObject(final int id)
|
||||
BuilderObject(int id)
|
||||
{
|
||||
if ((id < 1) || (id > 9))
|
||||
{
|
||||
@@ -33,13 +33,13 @@ final class BuilderObject extends Builder
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object param)
|
||||
public final String toString(Object param)
|
||||
{
|
||||
return param == null ? "null" : param.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object... params)
|
||||
public final String toString(Object... params)
|
||||
{
|
||||
if ((params == null) || (params.length == 0))
|
||||
{
|
||||
|
||||
@@ -23,19 +23,19 @@ final class BuilderText extends Builder
|
||||
{
|
||||
private final String _text;
|
||||
|
||||
BuilderText(final String text)
|
||||
BuilderText(String text)
|
||||
{
|
||||
_text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object param)
|
||||
public final String toString(Object param)
|
||||
{
|
||||
return toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(final Object... params)
|
||||
public final String toString(Object... params)
|
||||
{
|
||||
return toString();
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ final class FastStringBuilder
|
||||
private final char[] _array;
|
||||
private int _len;
|
||||
|
||||
public FastStringBuilder(final int capacity)
|
||||
public FastStringBuilder(int capacity)
|
||||
{
|
||||
_array = new char[capacity];
|
||||
}
|
||||
|
||||
public final void append(final String text)
|
||||
public final void append(String text)
|
||||
{
|
||||
text.getChars(0, text.length(), _array, _len);
|
||||
_len += text.length();
|
||||
|
||||
@@ -68,7 +68,7 @@ public enum CommissionTreeType
|
||||
CommissionItemType.MAGIC_ORNAMENT,
|
||||
CommissionItemType.DYES,
|
||||
CommissionItemType.OTHER_ITEM);
|
||||
|
||||
|
||||
private final int _clientId;
|
||||
private final Set<CommissionItemType> _commissionItemTypes;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface IAmountMultiplierStrategy
|
||||
public static final IAmountMultiplierStrategy SPOIL = DEFAULT_STRATEGY(Config.RATE_CORPSE_DROP_AMOUNT_MULTIPLIER);
|
||||
public static final IAmountMultiplierStrategy STATIC = (item, victim) -> 1;
|
||||
|
||||
public static IAmountMultiplierStrategy DEFAULT_STRATEGY(final double defaultMultiplier)
|
||||
public static IAmountMultiplierStrategy DEFAULT_STRATEGY(double defaultMultiplier)
|
||||
{
|
||||
return (item, victim) ->
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public interface IChanceMultiplierStrategy
|
||||
return (Config.L2JMOD_CHAMPION_ENABLE && (victim != null) && victim.isChampion()) ? (Config.RATE_QUEST_DROP * championmult) : Config.RATE_QUEST_DROP;
|
||||
};
|
||||
|
||||
public static IChanceMultiplierStrategy DEFAULT_STRATEGY(final double defaultMultiplier)
|
||||
public static IChanceMultiplierStrategy DEFAULT_STRATEGY(double defaultMultiplier)
|
||||
{
|
||||
return (item, victim) ->
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
public ScheduledFuture<?> _siegeTask;
|
||||
public boolean _missionAccomplished = false;
|
||||
|
||||
public ClanHallSiegeEngine(String name, String descr, final int hallId)
|
||||
public ClanHallSiegeEngine(String name, String descr, int hallId)
|
||||
{
|
||||
super(-1, name, descr);
|
||||
_log = Logger.getLogger(getClass().getName());
|
||||
@@ -448,7 +448,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
return Config.CHS_FAME_FREQUENCY;
|
||||
}
|
||||
|
||||
public final void broadcastNpcSay(final L2Npc npc, final ChatType type, final NpcStringId messageId)
|
||||
public final void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId messageId)
|
||||
{
|
||||
final NpcSay npcSay = new NpcSay(npc.getObjectId(), type, npc.getId(), messageId);
|
||||
final int sourceRegion = MapRegionManager.getInstance().getMapRegionLocId(npc);
|
||||
|
||||
@@ -144,7 +144,7 @@ public final class SiegableHall extends ClanHall
|
||||
}
|
||||
}
|
||||
|
||||
public final void setSiege(final ClanHallSiegeEngine siegable)
|
||||
public final void setSiege(ClanHallSiegeEngine siegable)
|
||||
{
|
||||
_siege = siegable;
|
||||
_siegeZone.setSiegeInstance(siegable);
|
||||
@@ -175,7 +175,7 @@ public final class SiegableHall extends ClanHall
|
||||
_nextSiege.setTimeInMillis(date);
|
||||
}
|
||||
|
||||
public final void setNextSiegeDate(final Calendar c)
|
||||
public final void setNextSiegeDate(Calendar c)
|
||||
{
|
||||
_nextSiege = c;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public final class SiegableHall extends ClanHall
|
||||
updateDb();
|
||||
}
|
||||
|
||||
public final void addAttacker(final L2Clan clan)
|
||||
public final void addAttacker(L2Clan clan)
|
||||
{
|
||||
if (getSiege() != null)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ public final class SiegableHall extends ClanHall
|
||||
}
|
||||
}
|
||||
|
||||
public final void removeAttacker(final L2Clan clan)
|
||||
public final void removeAttacker(L2Clan clan)
|
||||
{
|
||||
if (getSiege() != null)
|
||||
{
|
||||
|
||||
@@ -2680,7 +2680,7 @@ public abstract class AbstractScript implements INamable
|
||||
* @param smartDrop true if to not calculate a drop, which can't be given to any player 'cause of limits
|
||||
* @return the counts of each items given to each player
|
||||
*/
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, final GroupedGeneralDropItem items, L2Character killer, L2Character victim, Function<Integer, Long> limit, boolean playSound, boolean smartDrop)
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, GroupedGeneralDropItem items, L2Character killer, L2Character victim, Function<Integer, Long> limit, boolean playSound, boolean smartDrop)
|
||||
{
|
||||
GroupedGeneralDropItem toDrop;
|
||||
if (smartDrop)
|
||||
@@ -2723,7 +2723,7 @@ public abstract class AbstractScript implements INamable
|
||||
* @param smartDrop true if to not calculate a drop, which can't be given to any player
|
||||
* @return the counts of each items given to each player
|
||||
*/
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, final GroupedGeneralDropItem items, L2Character killer, L2Character victim, Map<Integer, Long> limit, boolean playSound, boolean smartDrop)
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, GroupedGeneralDropItem items, L2Character killer, L2Character victim, Map<Integer, Long> limit, boolean playSound, boolean smartDrop)
|
||||
{
|
||||
return distributeItems(players, items, killer, victim, Util.mapToFunction(limit), playSound, smartDrop);
|
||||
}
|
||||
@@ -2739,7 +2739,7 @@ public abstract class AbstractScript implements INamable
|
||||
* @param smartDrop true if to not calculate a drop, which can't be given to any player
|
||||
* @return the counts of each items given to each player
|
||||
*/
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, final GroupedGeneralDropItem items, L2Character killer, L2Character victim, long limit, boolean playSound, boolean smartDrop)
|
||||
protected static Map<L2PcInstance, Map<Integer, Long>> distributeItems(Collection<L2PcInstance> players, GroupedGeneralDropItem items, L2Character killer, L2Character victim, long limit, boolean playSound, boolean smartDrop)
|
||||
{
|
||||
return distributeItems(players, items, killer, victim, t -> limit, playSound, smartDrop);
|
||||
}
|
||||
@@ -3058,7 +3058,7 @@ public abstract class AbstractScript implements INamable
|
||||
* @param includeCommandChannel if {@code true}, {@link #actionForEachPlayer(L2PcInstance, L2Npc, boolean)} will be called with the player's command channel members
|
||||
* @see #actionForEachPlayer(L2PcInstance, L2Npc, boolean)
|
||||
*/
|
||||
public final void executeForEachPlayer(L2PcInstance player, final L2Npc npc, final boolean isSummon, boolean includeParty, boolean includeCommandChannel)
|
||||
public final void executeForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon, boolean includeParty, boolean includeCommandChannel)
|
||||
{
|
||||
if ((includeParty || includeCommandChannel) && player.isInParty())
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ public class MinionHolder implements IIdentifiable
|
||||
* @param respawnTime the respawn time
|
||||
* @param weightPoint the weight point
|
||||
*/
|
||||
public MinionHolder(final int id, final int count, final long respawnTime, final int weightPoint)
|
||||
public MinionHolder(int id, int count, long respawnTime, int weightPoint)
|
||||
{
|
||||
_id = id;
|
||||
_count = count;
|
||||
|
||||
@@ -40,7 +40,7 @@ public final class AuctionDateGenerator
|
||||
private int _hour_of_day;
|
||||
private int _minute_of_hour;
|
||||
|
||||
public AuctionDateGenerator(final StatsSet config) throws IllegalArgumentException
|
||||
public AuctionDateGenerator(StatsSet config) throws IllegalArgumentException
|
||||
{
|
||||
_calendar = Calendar.getInstance();
|
||||
_interval = config.getInt(FIELD_INTERVAL, -1);
|
||||
@@ -55,7 +55,7 @@ public final class AuctionDateGenerator
|
||||
checkMinuteOfHour(0);
|
||||
}
|
||||
|
||||
public synchronized final long nextDate(final long date)
|
||||
public synchronized final long nextDate(long date)
|
||||
{
|
||||
_calendar.setTimeInMillis(date);
|
||||
_calendar.set(Calendar.MILLISECOND, 0);
|
||||
@@ -72,7 +72,7 @@ public final class AuctionDateGenerator
|
||||
return calcDestTime(_calendar.getTimeInMillis(), date, TimeUnit.MILLISECONDS.convert(_interval, TimeUnit.DAYS));
|
||||
}
|
||||
|
||||
private final long calcDestTime(long time, final long date, final long add)
|
||||
private final long calcDestTime(long time, long date, long add)
|
||||
{
|
||||
if (time < date)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public final class AuctionDateGenerator
|
||||
return time;
|
||||
}
|
||||
|
||||
private final void checkDayOfWeek(final int defaultValue)
|
||||
private final void checkDayOfWeek(int defaultValue)
|
||||
{
|
||||
if ((_day_of_week < 1) || (_day_of_week > 7))
|
||||
{
|
||||
@@ -101,7 +101,7 @@ public final class AuctionDateGenerator
|
||||
}
|
||||
}
|
||||
|
||||
private final void checkHourOfDay(final int defaultValue)
|
||||
private final void checkHourOfDay(int defaultValue)
|
||||
{
|
||||
if ((_hour_of_day < 0) || (_hour_of_day > 23))
|
||||
{
|
||||
@@ -113,7 +113,7 @@ public final class AuctionDateGenerator
|
||||
}
|
||||
}
|
||||
|
||||
private final void checkMinuteOfHour(final int defaultValue)
|
||||
private final void checkMinuteOfHour(int defaultValue)
|
||||
{
|
||||
if ((_minute_of_hour < 0) || (_minute_of_hour > 59))
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ public final class AuctionItem
|
||||
private final long _itemCount;
|
||||
private final StatsSet _itemExtra;
|
||||
|
||||
public AuctionItem(final int auctionItemId, final int auctionLength, final long auctionInitBid, final int itemId, final long itemCount, final StatsSet itemExtra)
|
||||
public AuctionItem(int auctionItemId, int auctionLength, long auctionInitBid, int itemId, long itemCount, StatsSet itemExtra)
|
||||
{
|
||||
_auctionItemId = auctionItemId;
|
||||
_auctionLength = auctionLength;
|
||||
|
||||
@@ -67,12 +67,12 @@ public final class ItemAuction
|
||||
private static final String DELETE_ITEM_AUCTION_BID = "DELETE FROM item_auction_bid WHERE auctionId = ? AND playerObjId = ?";
|
||||
private static final String INSERT_ITEM_AUCTION_BID = "INSERT INTO item_auction_bid (auctionId, playerObjId, playerBid) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE playerBid = ?";
|
||||
|
||||
public ItemAuction(final int auctionId, final int instanceId, final long startingTime, final long endingTime, final AuctionItem auctionItem)
|
||||
public ItemAuction(int auctionId, int instanceId, long startingTime, long endingTime, AuctionItem auctionItem)
|
||||
{
|
||||
this(auctionId, instanceId, startingTime, endingTime, auctionItem, new ArrayList<>(), ItemAuctionState.CREATED);
|
||||
}
|
||||
|
||||
public ItemAuction(final int auctionId, final int instanceId, final long startingTime, final long endingTime, final AuctionItem auctionItem, final List<ItemAuctionBid> auctionBids, final ItemAuctionState auctionState)
|
||||
public ItemAuction(int auctionId, int instanceId, long startingTime, long endingTime, AuctionItem auctionItem, List<ItemAuctionBid> auctionBids, ItemAuctionState auctionState)
|
||||
{
|
||||
_auctionId = auctionId;
|
||||
_instanceId = instanceId;
|
||||
@@ -110,7 +110,7 @@ public final class ItemAuction
|
||||
return auctionState;
|
||||
}
|
||||
|
||||
public final boolean setAuctionState(final ItemAuctionState expected, final ItemAuctionState wanted)
|
||||
public final boolean setAuctionState(ItemAuctionState expected, ItemAuctionState wanted)
|
||||
{
|
||||
synchronized (_auctionStateLock)
|
||||
{
|
||||
@@ -210,20 +210,20 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
public final int getAndSetLastBidPlayerObjectId(final int playerObjId)
|
||||
public final int getAndSetLastBidPlayerObjectId(int playerObjId)
|
||||
{
|
||||
final int lastBid = _lastBidPlayerObjId;
|
||||
_lastBidPlayerObjId = playerObjId;
|
||||
return lastBid;
|
||||
}
|
||||
|
||||
private final void updatePlayerBid(final ItemAuctionBid bid, final boolean delete)
|
||||
private final void updatePlayerBid(ItemAuctionBid bid, boolean delete)
|
||||
{
|
||||
// TODO nBd maybe move such stuff to you db updater :D
|
||||
updatePlayerBidInternal(bid, delete);
|
||||
}
|
||||
|
||||
final void updatePlayerBidInternal(final ItemAuctionBid bid, final boolean delete)
|
||||
final void updatePlayerBidInternal(ItemAuctionBid bid, boolean delete)
|
||||
{
|
||||
final String query = delete ? DELETE_ITEM_AUCTION_BID : INSERT_ITEM_AUCTION_BID;
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
@@ -244,7 +244,7 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
public final void registerBid(final L2PcInstance player, final long newBid)
|
||||
public final void registerBid(L2PcInstance player, long newBid)
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
@@ -325,7 +325,7 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
private final void onPlayerBid(final L2PcInstance player, final ItemAuctionBid bid)
|
||||
private final void onPlayerBid(L2PcInstance player, ItemAuctionBid bid)
|
||||
{
|
||||
if (_highestBid == null)
|
||||
{
|
||||
@@ -400,12 +400,12 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
public final void broadcastToAllBidders(final L2GameServerPacket packet)
|
||||
public final void broadcastToAllBidders(L2GameServerPacket packet)
|
||||
{
|
||||
ThreadPoolManager.getInstance().executeGeneral(() -> broadcastToAllBiddersInternal(packet));
|
||||
}
|
||||
|
||||
public final void broadcastToAllBiddersInternal(final L2GameServerPacket packet)
|
||||
public final void broadcastToAllBiddersInternal(L2GameServerPacket packet)
|
||||
{
|
||||
for (int i = _auctionBids.size(); i-- > 0;)
|
||||
{
|
||||
@@ -421,7 +421,7 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean cancelBid(final L2PcInstance player)
|
||||
public final boolean cancelBid(L2PcInstance player)
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
@@ -508,7 +508,7 @@ public final class ItemAuction
|
||||
}
|
||||
}
|
||||
|
||||
private final boolean reduceItemCount(final L2PcInstance player, final long count)
|
||||
private final boolean reduceItemCount(L2PcInstance player, long count)
|
||||
{
|
||||
if (!player.reduceAdena("ItemAuction", count, player, true))
|
||||
{
|
||||
@@ -518,7 +518,7 @@ public final class ItemAuction
|
||||
return true;
|
||||
}
|
||||
|
||||
private final void increaseItemCount(final L2PcInstance player, final long count)
|
||||
private final void increaseItemCount(L2PcInstance player, long count)
|
||||
{
|
||||
player.addAdena("ItemAuction", count, player, true);
|
||||
}
|
||||
@@ -528,19 +528,19 @@ public final class ItemAuction
|
||||
* @param player The player that made the bid
|
||||
* @return The last bid the player made or -1
|
||||
*/
|
||||
public final long getLastBid(final L2PcInstance player)
|
||||
public final long getLastBid(L2PcInstance player)
|
||||
{
|
||||
final ItemAuctionBid bid = getBidFor(player.getObjectId());
|
||||
return bid != null ? bid.getLastBid() : -1L;
|
||||
}
|
||||
|
||||
public final ItemAuctionBid getBidFor(final int playerObjId)
|
||||
public final ItemAuctionBid getBidFor(int playerObjId)
|
||||
{
|
||||
final int index = getBidIndexFor(playerObjId);
|
||||
return index != -1 ? _auctionBids.get(index) : null;
|
||||
}
|
||||
|
||||
private final int getBidIndexFor(final int playerObjId)
|
||||
private final int getBidIndexFor(int playerObjId)
|
||||
{
|
||||
for (int i = _auctionBids.size(); i-- > 0;)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public final class ItemAuctionBid
|
||||
private final int _playerObjId;
|
||||
private long _lastBid;
|
||||
|
||||
public ItemAuctionBid(final int playerObjId, final long lastBid)
|
||||
public ItemAuctionBid(int playerObjId, long lastBid)
|
||||
{
|
||||
_playerObjId = playerObjId;
|
||||
_lastBid = lastBid;
|
||||
@@ -43,7 +43,7 @@ public final class ItemAuctionBid
|
||||
return _lastBid;
|
||||
}
|
||||
|
||||
final void setLastBid(final long lastBid)
|
||||
final void setLastBid(long lastBid)
|
||||
{
|
||||
_lastBid = lastBid;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public final class ItemAuctionInstance
|
||||
private ItemAuction _nextAuction;
|
||||
private ScheduledFuture<?> _stateTask;
|
||||
|
||||
public ItemAuctionInstance(final int instanceId, final AtomicInteger auctionIds, final Node node) throws Exception
|
||||
public ItemAuctionInstance(int instanceId, AtomicInteger auctionIds, Node node) throws Exception
|
||||
{
|
||||
_instanceId = instanceId;
|
||||
_auctionIds = auctionIds;
|
||||
@@ -219,7 +219,7 @@ public final class ItemAuctionInstance
|
||||
}
|
||||
}
|
||||
|
||||
private final AuctionItem getAuctionItem(final int auctionItemId)
|
||||
private final AuctionItem getAuctionItem(int auctionItemId)
|
||||
{
|
||||
for (int i = _items.size(); i-- > 0;)
|
||||
{
|
||||
@@ -344,12 +344,12 @@ public final class ItemAuctionInstance
|
||||
}
|
||||
}
|
||||
|
||||
public final ItemAuction getAuction(final int auctionId)
|
||||
public final ItemAuction getAuction(int auctionId)
|
||||
{
|
||||
return _auctions.get(auctionId);
|
||||
}
|
||||
|
||||
public final ItemAuction[] getAuctionsByBidder(final int bidderObjId)
|
||||
public final ItemAuction[] getAuctionsByBidder(int bidderObjId)
|
||||
{
|
||||
final Collection<ItemAuction> auctions = getAuctions();
|
||||
final ArrayList<ItemAuction> stack = new ArrayList<>(auctions.size());
|
||||
@@ -383,7 +383,7 @@ public final class ItemAuctionInstance
|
||||
{
|
||||
private final ItemAuction _auction;
|
||||
|
||||
public ScheduleAuctionTask(final ItemAuction auction)
|
||||
public ScheduleAuctionTask(ItemAuction auction)
|
||||
{
|
||||
_auction = auction;
|
||||
}
|
||||
@@ -479,7 +479,7 @@ public final class ItemAuctionInstance
|
||||
}
|
||||
}
|
||||
|
||||
final void onAuctionFinished(final ItemAuction auction)
|
||||
final void onAuctionFinished(ItemAuction auction)
|
||||
{
|
||||
auction.broadcastToAllBiddersInternal(SystemMessage.getSystemMessage(SystemMessageId.S1_S_AUCTION_HAS_ENDED).addInt(auction.getAuctionId()));
|
||||
|
||||
@@ -514,7 +514,7 @@ public final class ItemAuctionInstance
|
||||
}
|
||||
}
|
||||
|
||||
final void setStateTask(final ScheduledFuture<?> future)
|
||||
final void setStateTask(ScheduledFuture<?> future)
|
||||
{
|
||||
final ScheduledFuture<?> stateTask = _stateTask;
|
||||
if (stateTask != null)
|
||||
@@ -525,7 +525,7 @@ public final class ItemAuctionInstance
|
||||
_stateTask = future;
|
||||
}
|
||||
|
||||
private final ItemAuction createAuction(final long after)
|
||||
private final ItemAuction createAuction(long after)
|
||||
{
|
||||
final AuctionItem auctionItem = _items.get(Rnd.get(_items.size()));
|
||||
final long startingTime = _dateGenerator.nextDate(after);
|
||||
@@ -535,7 +535,7 @@ public final class ItemAuctionInstance
|
||||
return auction;
|
||||
}
|
||||
|
||||
private final ItemAuction loadAuction(final int auctionId) throws SQLException
|
||||
private final ItemAuction loadAuction(int auctionId) throws SQLException
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public enum ItemAuctionState
|
||||
|
||||
private final byte _stateId;
|
||||
|
||||
private ItemAuctionState(final byte stateId)
|
||||
private ItemAuctionState(byte stateId)
|
||||
{
|
||||
_stateId = stateId;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public enum ItemAuctionState
|
||||
return _stateId;
|
||||
}
|
||||
|
||||
public static final ItemAuctionState stateForStateId(final byte stateId)
|
||||
public static final ItemAuctionState stateForStateId(byte stateId)
|
||||
{
|
||||
for (ItemAuctionState state : ItemAuctionState.values())
|
||||
{
|
||||
|
||||
@@ -2469,7 +2469,7 @@ public final class L2ItemInstance extends L2Object
|
||||
final int slot_id = rs.getInt("slot_id");
|
||||
if (effect_id != 0)
|
||||
{
|
||||
SoulCrystalOption sco = SoulCrystalOptionsData.getInstance().getByEffectId(effect_id);
|
||||
final SoulCrystalOption sco = SoulCrystalOptionsData.getInstance().getByEffectId(effect_id);
|
||||
sco.setSlot(slot_id);
|
||||
|
||||
if (sco.isSpecial())
|
||||
@@ -2495,7 +2495,7 @@ public final class L2ItemInstance extends L2Object
|
||||
|
||||
public void applySoulCrystalOptionEffect()
|
||||
{
|
||||
L2PcInstance owner = getActingPlayer();
|
||||
final L2PcInstance owner = getActingPlayer();
|
||||
if ((owner == null) || (!isEquipped()))
|
||||
{
|
||||
return;
|
||||
@@ -2519,7 +2519,7 @@ public final class L2ItemInstance extends L2Object
|
||||
|
||||
public void removeSoulCrystalOptionEffect()
|
||||
{
|
||||
L2PcInstance owner = getActingPlayer();
|
||||
final L2PcInstance owner = getActingPlayer();
|
||||
if ((owner == null) || (isEquipped()))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -1030,7 +1030,7 @@ public final class Skill implements IIdentifiable
|
||||
* @param player the player
|
||||
* @return {@code true} if the player can use this skill, {@code false} otherwise
|
||||
*/
|
||||
public boolean canBeUseWhileRiding(final L2PcInstance player)
|
||||
public boolean canBeUseWhileRiding(L2PcInstance player)
|
||||
{
|
||||
return (_rideState == null) || _rideState.contains(player.getMountType());
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
*/
|
||||
public class L2HqZone extends L2ZoneType
|
||||
{
|
||||
public L2HqZone(final int id)
|
||||
public L2HqZone(int id)
|
||||
{
|
||||
super(id);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class L2HqZone extends L2ZoneType
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onEnter(final L2Character character)
|
||||
protected void onEnter(L2Character character)
|
||||
{
|
||||
if (character.isPlayer())
|
||||
{
|
||||
@@ -66,7 +66,7 @@ public class L2HqZone extends L2ZoneType
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExit(final L2Character character)
|
||||
protected void onExit(L2Character character)
|
||||
{
|
||||
if (character.isPlayer())
|
||||
{
|
||||
|
||||
@@ -26,13 +26,13 @@ import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
*/
|
||||
public class L2NoStoreZone extends L2ZoneType
|
||||
{
|
||||
public L2NoStoreZone(final int id)
|
||||
public L2NoStoreZone(int id)
|
||||
{
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onEnter(final L2Character character)
|
||||
protected void onEnter(L2Character character)
|
||||
{
|
||||
if (character.isPlayer())
|
||||
{
|
||||
@@ -41,7 +41,7 @@ public class L2NoStoreZone extends L2ZoneType
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExit(final L2Character character)
|
||||
protected void onExit(L2Character character)
|
||||
{
|
||||
if (character.isPlayer())
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GameCrypt
|
||||
System.arraycopy(key, 0, _outKey, 0, 16);
|
||||
}
|
||||
|
||||
public void decrypt(byte[] raw, final int offset, final int size)
|
||||
public void decrypt(byte[] raw, int offset, int size)
|
||||
{
|
||||
if (!_isEnabled)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ public class GameCrypt
|
||||
_inKey[11] = (byte) ((old >> 0x18) & 0xff);
|
||||
}
|
||||
|
||||
public void encrypt(byte[] raw, final int offset, final int size)
|
||||
public void encrypt(byte[] raw, int offset, int size)
|
||||
{
|
||||
if (!_isEnabled)
|
||||
{
|
||||
|
||||
@@ -197,7 +197,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean encrypt(final ByteBuffer buf, final int size)
|
||||
public boolean encrypt(ByteBuffer buf, int size)
|
||||
{
|
||||
_crypt.encrypt(buf.array(), buf.position(), size);
|
||||
buf.position(buf.position() + size);
|
||||
|
||||
@@ -36264,7 +36264,7 @@ public final class NpcStringId
|
||||
}
|
||||
}
|
||||
|
||||
private static final int parseMessageParameters(final String name)
|
||||
private static final int parseMessageParameters(String name)
|
||||
{
|
||||
int paramCount = 0;
|
||||
char c1, c2;
|
||||
@@ -36284,23 +36284,23 @@ public final class NpcStringId
|
||||
return paramCount;
|
||||
}
|
||||
|
||||
public static final NpcStringId getNpcStringId(final int id)
|
||||
public static final NpcStringId getNpcStringId(int id)
|
||||
{
|
||||
return getNpcStringIdOrDefault(id, new NpcStringId(id));
|
||||
}
|
||||
|
||||
public static final NpcStringId getNpcStringIdOrDefault(final int id, NpcStringId defaultValue)
|
||||
public static final NpcStringId getNpcStringIdOrDefault(int id, NpcStringId defaultValue)
|
||||
{
|
||||
final NpcStringId nsi = getNpcStringIdInternal(id);
|
||||
return nsi == null ? defaultValue : nsi;
|
||||
}
|
||||
|
||||
private static final NpcStringId getNpcStringIdInternal(final int id)
|
||||
private static final NpcStringId getNpcStringIdInternal(int id)
|
||||
{
|
||||
return VALUES.get(id);
|
||||
}
|
||||
|
||||
public static final NpcStringId getNpcStringId(final String name)
|
||||
public static final NpcStringId getNpcStringId(String name)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -36415,7 +36415,7 @@ public final class NpcStringId
|
||||
private NSLocalisation[] _localisations;
|
||||
private ExShowScreenMessage _staticScreenMessage;
|
||||
|
||||
protected NpcStringId(final int id)
|
||||
protected NpcStringId(int id)
|
||||
{
|
||||
_id = id;
|
||||
_localisations = EMPTY_NSL_ARRAY;
|
||||
@@ -36426,7 +36426,7 @@ public final class NpcStringId
|
||||
return _id;
|
||||
}
|
||||
|
||||
private final void setName(final String name)
|
||||
private final void setName(String name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
@@ -36445,7 +36445,7 @@ public final class NpcStringId
|
||||
* You better don`t touch this!
|
||||
* @param params
|
||||
*/
|
||||
public final void setParamCount(final int params)
|
||||
public final void setParamCount(int params)
|
||||
{
|
||||
if (params < 0)
|
||||
{
|
||||
@@ -36465,7 +36465,7 @@ public final class NpcStringId
|
||||
_params = (byte) params;
|
||||
}
|
||||
|
||||
public final NSLocalisation getLocalisation(final String lang)
|
||||
public final NSLocalisation getLocalisation(String lang)
|
||||
{
|
||||
NSLocalisation nsl;
|
||||
for (int i = _localisations.length; i-- > 0;)
|
||||
@@ -36479,7 +36479,7 @@ public final class NpcStringId
|
||||
return null;
|
||||
}
|
||||
|
||||
public final void attachLocalizedText(final String lang, final String text)
|
||||
public final void attachLocalizedText(String lang, String text)
|
||||
{
|
||||
final int length = _localisations.length;
|
||||
final NSLocalisation[] localisations = Arrays.copyOf(_localisations, length + 1);
|
||||
@@ -36497,7 +36497,7 @@ public final class NpcStringId
|
||||
return _staticScreenMessage;
|
||||
}
|
||||
|
||||
public final void setStaticSystemMessage(final ExShowScreenMessage ns)
|
||||
public final void setStaticSystemMessage(ExShowScreenMessage ns)
|
||||
{
|
||||
_staticScreenMessage = ns;
|
||||
}
|
||||
@@ -36513,7 +36513,7 @@ public final class NpcStringId
|
||||
private final String _lang;
|
||||
private final Builder _builder;
|
||||
|
||||
public NSLocalisation(final String lang, final String text)
|
||||
public NSLocalisation(String lang, String text)
|
||||
{
|
||||
_lang = lang;
|
||||
_builder = Builder.newBuilder(text);
|
||||
@@ -36524,7 +36524,7 @@ public final class NpcStringId
|
||||
return _lang;
|
||||
}
|
||||
|
||||
public final String getLocalisation(final Object... params)
|
||||
public final String getLocalisation(Object... params)
|
||||
{
|
||||
return _builder.toString(params);
|
||||
}
|
||||
|
||||
@@ -15206,7 +15206,7 @@ public final class SystemMessageId
|
||||
}
|
||||
}
|
||||
|
||||
private static final int parseMessageParameters(final String name)
|
||||
private static final int parseMessageParameters(String name)
|
||||
{
|
||||
int paramCount = 0;
|
||||
char c1, c2;
|
||||
@@ -15226,18 +15226,18 @@ public final class SystemMessageId
|
||||
return paramCount;
|
||||
}
|
||||
|
||||
public static final SystemMessageId getSystemMessageId(final int id)
|
||||
public static final SystemMessageId getSystemMessageId(int id)
|
||||
{
|
||||
final SystemMessageId smi = getSystemMessageIdInternal(id);
|
||||
return smi == null ? new SystemMessageId(id) : smi;
|
||||
}
|
||||
|
||||
private static final SystemMessageId getSystemMessageIdInternal(final int id)
|
||||
private static final SystemMessageId getSystemMessageIdInternal(int id)
|
||||
{
|
||||
return VALUES.get(id);
|
||||
}
|
||||
|
||||
public static final SystemMessageId getSystemMessageId(final String name)
|
||||
public static final SystemMessageId getSystemMessageId(String name)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -15352,7 +15352,7 @@ public final class SystemMessageId
|
||||
private SMLocalisation[] _localisations;
|
||||
private SystemMessage _staticSystemMessage;
|
||||
|
||||
private SystemMessageId(final int id)
|
||||
private SystemMessageId(int id)
|
||||
{
|
||||
_id = id;
|
||||
_localisations = EMPTY_SML_ARRAY;
|
||||
@@ -15363,7 +15363,7 @@ public final class SystemMessageId
|
||||
return _id;
|
||||
}
|
||||
|
||||
private final void setName(final String name)
|
||||
private final void setName(String name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
@@ -15382,7 +15382,7 @@ public final class SystemMessageId
|
||||
* You better don`t touch this!
|
||||
* @param params
|
||||
*/
|
||||
public final void setParamCount(final int params)
|
||||
public final void setParamCount(int params)
|
||||
{
|
||||
if (params < 0)
|
||||
{
|
||||
@@ -15402,7 +15402,7 @@ public final class SystemMessageId
|
||||
_params = (byte) params;
|
||||
}
|
||||
|
||||
public final SMLocalisation getLocalisation(final String lang)
|
||||
public final SMLocalisation getLocalisation(String lang)
|
||||
{
|
||||
SMLocalisation sml;
|
||||
for (int i = _localisations.length; i-- > 0;)
|
||||
@@ -15416,7 +15416,7 @@ public final class SystemMessageId
|
||||
return null;
|
||||
}
|
||||
|
||||
public final void attachLocalizedText(final String lang, final String text)
|
||||
public final void attachLocalizedText(String lang, String text)
|
||||
{
|
||||
final int length = _localisations.length;
|
||||
final SMLocalisation[] localisations = Arrays.copyOf(_localisations, length + 1);
|
||||
@@ -15434,7 +15434,7 @@ public final class SystemMessageId
|
||||
return _staticSystemMessage;
|
||||
}
|
||||
|
||||
public final void setStaticSystemMessage(final SystemMessage sm)
|
||||
public final void setStaticSystemMessage(SystemMessage sm)
|
||||
{
|
||||
_staticSystemMessage = sm;
|
||||
}
|
||||
@@ -15450,7 +15450,7 @@ public final class SystemMessageId
|
||||
private final String _lang;
|
||||
private final Builder _builder;
|
||||
|
||||
public SMLocalisation(final String lang, final String text)
|
||||
public SMLocalisation(String lang, String text)
|
||||
{
|
||||
_lang = lang;
|
||||
_builder = Builder.newBuilder(text);
|
||||
@@ -15461,7 +15461,7 @@ public final class SystemMessageId
|
||||
return _lang;
|
||||
}
|
||||
|
||||
public final String getLocalisation(final Object... params)
|
||||
public final String getLocalisation(Object... params)
|
||||
{
|
||||
return _builder.toString(params);
|
||||
}
|
||||
|
||||
@@ -1656,7 +1656,7 @@ public final class RequestActionUse extends L2GameClientPacket
|
||||
* Perform a couple social action.
|
||||
* @param id the couple social action Id
|
||||
*/
|
||||
private void useCoupleSocial(final int id)
|
||||
private void useCoupleSocial(int id)
|
||||
{
|
||||
final L2PcInstance requester = getActiveChar();
|
||||
if (requester == null)
|
||||
|
||||
@@ -281,7 +281,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket
|
||||
player.sendPacket(iu);
|
||||
}
|
||||
|
||||
private int addElement(final L2PcInstance player, final L2ItemInstance stone, final L2ItemInstance item, byte elementToAdd)
|
||||
private int addElement(L2PcInstance player, L2ItemInstance stone, L2ItemInstance item, byte elementToAdd)
|
||||
{
|
||||
final Elementals oldElement = item.getElemental(elementToAdd);
|
||||
final int elementValue = oldElement == null ? 0 : oldElement.getValue();
|
||||
|
||||
@@ -108,7 +108,7 @@ public final class RequestRestartPoint extends L2GameClientPacket
|
||||
portPlayer(activeChar);
|
||||
}
|
||||
|
||||
protected final void portPlayer(final L2PcInstance activeChar)
|
||||
protected final void portPlayer(L2PcInstance activeChar)
|
||||
{
|
||||
Location loc = null;
|
||||
Castle castle = null;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class RequestItemEnsoul extends L2GameClientPacket
|
||||
final int SCObjectId = readD(); // Soul Crystal objectId
|
||||
final int effectId = readD(); // EffectId
|
||||
|
||||
SoulCrystalOption sco = SoulCrystalOptionsData.getInstance().getByEffectId(effectId);
|
||||
final SoulCrystalOption sco = SoulCrystalOptionsData.getInstance().getByEffectId(effectId);
|
||||
sco.setSoulCrystalObjectId(SCObjectId);
|
||||
sco.setSpecial(special);
|
||||
sco.setSlot(slot);
|
||||
|
||||
@@ -57,7 +57,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
private final byte _type;
|
||||
private final Object _value;
|
||||
|
||||
public SMParam(final byte type, final Object value)
|
||||
public SMParam(byte type, Object value)
|
||||
{
|
||||
_type = type;
|
||||
_value = value;
|
||||
@@ -148,7 +148,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
_params[_paramIndex++] = param;
|
||||
}
|
||||
|
||||
public final T addString(final String text)
|
||||
public final T addString(String text)
|
||||
{
|
||||
append(new SMParam(TYPE_TEXT, text));
|
||||
return (T) this;
|
||||
@@ -173,25 +173,25 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
* @param number the conquerable entity
|
||||
* @return the system message with the proper parameter
|
||||
*/
|
||||
public final T addCastleId(final int number)
|
||||
public final T addCastleId(int number)
|
||||
{
|
||||
append(new SMParam(TYPE_CASTLE_NAME, number));
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public final T addInt(final int number)
|
||||
public final T addInt(int number)
|
||||
{
|
||||
append(new SMParam(TYPE_INT_NUMBER, number));
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public final T addLong(final long number)
|
||||
public final T addLong(long number)
|
||||
{
|
||||
append(new SMParam(TYPE_LONG_NUMBER, number));
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public final T addCharName(final L2Character cha)
|
||||
public final T addCharName(L2Character cha)
|
||||
{
|
||||
if (cha.isNpc())
|
||||
{
|
||||
@@ -223,7 +223,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return addString(cha.getName());
|
||||
}
|
||||
|
||||
public final T addPcName(final L2PcInstance pc)
|
||||
public final T addPcName(L2PcInstance pc)
|
||||
{
|
||||
append(new SMParam(TYPE_PLAYER_NAME, pc.getAppearance().getVisibleName()));
|
||||
return (T) this;
|
||||
@@ -245,12 +245,12 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return addNpcName(npc.getTemplate());
|
||||
}
|
||||
|
||||
public final T addNpcName(final L2Summon npc)
|
||||
public final T addNpcName(L2Summon npc)
|
||||
{
|
||||
return addNpcName(npc.getId());
|
||||
}
|
||||
|
||||
public final T addNpcName(final L2NpcTemplate template)
|
||||
public final T addNpcName(L2NpcTemplate template)
|
||||
{
|
||||
if (template.isUsingServerSideName())
|
||||
{
|
||||
@@ -259,23 +259,23 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return addNpcName(template.getId());
|
||||
}
|
||||
|
||||
public final T addNpcName(final int id)
|
||||
public final T addNpcName(int id)
|
||||
{
|
||||
append(new SMParam(TYPE_NPC_NAME, 1000000 + id));
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public T addItemName(final L2ItemInstance item)
|
||||
public T addItemName(L2ItemInstance item)
|
||||
{
|
||||
return addItemName(item.getId());
|
||||
}
|
||||
|
||||
public T addItemName(final L2Item item)
|
||||
public T addItemName(L2Item item)
|
||||
{
|
||||
return addItemName(item.getId());
|
||||
}
|
||||
|
||||
public final T addItemName(final int id)
|
||||
public final T addItemName(int id)
|
||||
{
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item.getDisplayId() != id)
|
||||
@@ -287,7 +287,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public final T addZoneName(final int x, final int y, final int z)
|
||||
public final T addZoneName(int x, int y, int z)
|
||||
{
|
||||
append(new SMParam(TYPE_ZONE_NAME, new int[]
|
||||
{
|
||||
@@ -298,7 +298,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public final T addSkillName(final Skill skill)
|
||||
public final T addSkillName(Skill skill)
|
||||
{
|
||||
if (skill.getId() != skill.getDisplayId())
|
||||
{
|
||||
@@ -307,12 +307,12 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
return addSkillName(skill.getId(), skill.getLevel());
|
||||
}
|
||||
|
||||
public final T addSkillName(final int id)
|
||||
public final T addSkillName(int id)
|
||||
{
|
||||
return addSkillName(id, 1);
|
||||
}
|
||||
|
||||
public final T addSkillName(final int id, final int lvl)
|
||||
public final T addSkillName(int id, int lvl)
|
||||
{
|
||||
append(new SMParam(TYPE_SKILL_NAME, new int[]
|
||||
{
|
||||
@@ -327,7 +327,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public final T addElemental(final int type)
|
||||
public final T addElemental(int type)
|
||||
{
|
||||
append(new SMParam(TYPE_ELEMENT_NAME, type));
|
||||
return (T) this;
|
||||
@@ -338,7 +338,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public final T addSystemString(final int type)
|
||||
public final T addSystemString(int type)
|
||||
{
|
||||
append(new SMParam(TYPE_SYSTEM_STRING, type));
|
||||
return (T) this;
|
||||
@@ -349,7 +349,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public final T addClassId(final int type)
|
||||
public final T addClassId(int type)
|
||||
{
|
||||
append(new SMParam(TYPE_CLASS_ID, type));
|
||||
return (T) this;
|
||||
@@ -371,7 +371,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
* @param type id of instance
|
||||
* @return
|
||||
*/
|
||||
public final T addInstanceName(final int type)
|
||||
public final T addInstanceName(int type)
|
||||
{
|
||||
append(new SMParam(TYPE_INSTANCE_NAME, type));
|
||||
return (T) this;
|
||||
@@ -530,7 +530,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>e
|
||||
}
|
||||
}
|
||||
|
||||
public final T getLocalizedMessage(final String lang)
|
||||
public final T getLocalizedMessage(String lang)
|
||||
{
|
||||
if (!Config.L2JMOD_MULTILANG_SM_ENABLE || (getSystemMessageId() == SystemMessageId.S13))
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public final class CSShowComBoard extends L2GameServerPacket
|
||||
{
|
||||
private final byte[] _html;
|
||||
|
||||
public CSShowComBoard(final byte[] html)
|
||||
public CSShowComBoard(byte[] html)
|
||||
{
|
||||
_html = html;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public final class ExBasicActionList extends L2GameServerPacket
|
||||
|
||||
private final int[] _actionIds;
|
||||
|
||||
public ExBasicActionList(final int[] actionIds)
|
||||
public ExBasicActionList(int[] actionIds)
|
||||
{
|
||||
_actionIds = actionIds;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class ExItemAuctionInfoPacket extends AbstractItemPacket
|
||||
private final ItemAuction _currentAuction;
|
||||
private final ItemAuction _nextAuction;
|
||||
|
||||
public ExItemAuctionInfoPacket(final boolean refresh, final ItemAuction currentAuction, final ItemAuction nextAuction)
|
||||
public ExItemAuctionInfoPacket(boolean refresh, ItemAuction currentAuction, ItemAuction nextAuction)
|
||||
{
|
||||
if (currentAuction == null)
|
||||
{
|
||||
|
||||
@@ -23,12 +23,12 @@ import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
*/
|
||||
public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
||||
{
|
||||
private SystemMessage(final SystemMessageId smId)
|
||||
private SystemMessage(SystemMessageId smId)
|
||||
{
|
||||
super(smId);
|
||||
}
|
||||
|
||||
public static final SystemMessage sendString(final String text)
|
||||
public static final SystemMessage sendString(String text)
|
||||
{
|
||||
if (text == null)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
||||
return sm;
|
||||
}
|
||||
|
||||
public static final SystemMessage getSystemMessage(final SystemMessageId smId)
|
||||
public static final SystemMessage getSystemMessage(SystemMessageId smId)
|
||||
{
|
||||
SystemMessage sm = smId.getStaticSystemMessage();
|
||||
if (sm != null)
|
||||
@@ -73,7 +73,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
private SystemMessage(final int id)
|
||||
private SystemMessage(int id)
|
||||
{
|
||||
this(SystemMessageId.getSystemMessageId(id));
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ExBRBuyProduct extends L2GameServerPacket
|
||||
|
||||
private final int _reply;
|
||||
|
||||
public ExBRBuyProduct(final ExBrProductReplyType type)
|
||||
public ExBRBuyProduct(ExBrProductReplyType type)
|
||||
{
|
||||
_reply = type.getId();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ExBRGamePoint extends L2GameServerPacket
|
||||
private final int _charId;
|
||||
private final int _charPoints;
|
||||
|
||||
public ExBRGamePoint(final L2PcInstance player)
|
||||
public ExBRGamePoint(L2PcInstance player)
|
||||
{
|
||||
_charId = player.getObjectId();
|
||||
_charPoints = player.getPrimePoints();
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class FloodProtectorAction
|
||||
* @param client the game client for which flood protection is being created
|
||||
* @param config flood protector configuration
|
||||
*/
|
||||
public FloodProtectorAction(final L2GameClient client, final FloodProtectorConfig config)
|
||||
public FloodProtectorAction(L2GameClient client, FloodProtectorConfig config)
|
||||
{
|
||||
super();
|
||||
_client = client;
|
||||
@@ -81,7 +81,7 @@ public final class FloodProtectorAction
|
||||
* @param command command issued or short command description
|
||||
* @return true if action is allowed, otherwise false
|
||||
*/
|
||||
public boolean tryPerformAction(final String command)
|
||||
public boolean tryPerformAction(String command)
|
||||
{
|
||||
final int curTick = GameTimeController.getInstance().getGameTicks();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class FloodProtectorConfig
|
||||
* Creates new instance of FloodProtectorConfig.
|
||||
* @param floodProtectorType {@link #FLOOD_PROTECTOR_TYPE}
|
||||
*/
|
||||
public FloodProtectorConfig(final String floodProtectorType)
|
||||
public FloodProtectorConfig(String floodProtectorType)
|
||||
{
|
||||
super();
|
||||
FLOOD_PROTECTOR_TYPE = floodProtectorType;
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class FloodProtectors
|
||||
* Creates new instance of FloodProtectors.
|
||||
* @param client game client for which the collection of flood protectors is being created.
|
||||
*/
|
||||
public FloodProtectors(final L2GameClient client)
|
||||
public FloodProtectors(L2GameClient client)
|
||||
{
|
||||
super();
|
||||
_useItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ITEM);
|
||||
|
||||
@@ -71,7 +71,7 @@ public class MinionList
|
||||
* <BR>
|
||||
* @param minions
|
||||
*/
|
||||
public final void spawnMinions(final List<MinionHolder> minions)
|
||||
public final void spawnMinions(List<MinionHolder> minions)
|
||||
{
|
||||
if (_master.isAlikeDead())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user