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