Some code formatting.
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user