Code style changes.
This commit is contained in:
@@ -125,7 +125,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
}
|
||||
|
||||
protected static final int calculateMask(ItemInfo item)
|
||||
protected static int calculateMask(ItemInfo item)
|
||||
{
|
||||
int mask = 0;
|
||||
if (item.getAugmentationBonus() > 0)
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0x09); // packet id
|
||||
final int size = (_characterPackages.size());
|
||||
final int size = _characterPackages.size();
|
||||
writeD(size); // How many char there is on this account
|
||||
|
||||
// Can prevent players from creating new characters (if 0); (if 1, the client will ask if chars may be created (0x13) Response: (0x0D) )
|
||||
|
||||
@@ -107,20 +107,17 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V3;
|
||||
}
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V3;
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
@@ -131,20 +128,17 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
@@ -155,20 +149,17 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
@@ -179,20 +170,17 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V3;
|
||||
}
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V3;
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ExEnchantSkillResult extends L2GameServerPacket
|
||||
private static final ExEnchantSkillResult STATIC_PACKET_TRUE = new ExEnchantSkillResult(true);
|
||||
private static final ExEnchantSkillResult STATIC_PACKET_FALSE = new ExEnchantSkillResult(false);
|
||||
|
||||
public static final ExEnchantSkillResult valueOf(boolean result)
|
||||
public static ExEnchantSkillResult valueOf(boolean result)
|
||||
{
|
||||
return result ? STATIC_PACKET_TRUE : STATIC_PACKET_FALSE;
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@ package com.l2jmobius.gameserver.network.serverpackets;
|
||||
*/
|
||||
public class ExMagicAttackInfo extends L2GameServerPacket
|
||||
{
|
||||
public final static int CRITICAL = 1;
|
||||
public final static int CRITICAL_HEAL = 2;
|
||||
public final static int OVERHIT = 3;
|
||||
public final static int EVADED = 4;
|
||||
public final static int BLOCKED = 5;
|
||||
public final static int RESISTED = 6;
|
||||
public final static int IMMUNE = 7;
|
||||
public static final int CRITICAL = 1;
|
||||
public static final int CRITICAL_HEAL = 2;
|
||||
public static final int OVERHIT = 3;
|
||||
public static final int EVADED = 4;
|
||||
public static final int BLOCKED = 5;
|
||||
public static final int RESISTED = 6;
|
||||
public static final int IMMUNE = 7;
|
||||
|
||||
private final int _caster;
|
||||
private final int _target;
|
||||
|
||||
@@ -56,16 +56,13 @@ public class ExManagePartyRoomMember extends L2GameServerPacket
|
||||
{
|
||||
writeD(1);
|
||||
}
|
||||
else if (_room.getOwner().isInParty() && _activeChar.isInParty() && (_room.getOwner().getParty().getLeaderObjectId() == _activeChar.getParty().getLeaderObjectId()))
|
||||
{
|
||||
writeD(0x02);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((_room.getOwner().isInParty() && _activeChar.isInParty()) && (_room.getOwner().getParty().getLeaderObjectId() == _activeChar.getParty().getLeaderObjectId()))
|
||||
{
|
||||
writeD(0x02);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
writeD(0x00);
|
||||
}
|
||||
writeD(0x00); // TODO: instance reuse time size
|
||||
// TODO: for size writeD(instanceId)
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ExNoticePostArrived extends L2GameServerPacket
|
||||
private static final ExNoticePostArrived STATIC_PACKET_TRUE = new ExNoticePostArrived(true);
|
||||
private static final ExNoticePostArrived STATIC_PACKET_FALSE = new ExNoticePostArrived(false);
|
||||
|
||||
public static final ExNoticePostArrived valueOf(boolean result)
|
||||
public static ExNoticePostArrived valueOf(boolean result)
|
||||
{
|
||||
return result ? STATIC_PACKET_TRUE : STATIC_PACKET_FALSE;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ExNoticePostSent extends L2GameServerPacket
|
||||
private static final ExNoticePostSent STATIC_PACKET_TRUE = new ExNoticePostSent(true);
|
||||
private static final ExNoticePostSent STATIC_PACKET_FALSE = new ExNoticePostSent(false);
|
||||
|
||||
public static final ExNoticePostSent valueOf(boolean result)
|
||||
public static ExNoticePostSent valueOf(boolean result)
|
||||
{
|
||||
return result ? STATIC_PACKET_TRUE : STATIC_PACKET_FALSE;
|
||||
}
|
||||
|
||||
@@ -51,16 +51,13 @@ public class ExPartyRoomMember extends L2GameServerPacket
|
||||
{
|
||||
writeD(0x01);
|
||||
}
|
||||
else if (_room.getOwner().isInParty() && member.isInParty() && (_room.getOwner().getParty().getLeaderObjectId() == member.getParty().getLeaderObjectId()))
|
||||
{
|
||||
writeD(0x02);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((_room.getOwner().isInParty() && member.isInParty()) && (_room.getOwner().getParty().getLeaderObjectId() == member.getParty().getLeaderObjectId()))
|
||||
{
|
||||
writeD(0x02);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
writeD(0x00);
|
||||
}
|
||||
writeD(0x00); // TODO: Instance datas there is more if that is not 0!
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ import com.l2jmobius.gameserver.model.clan.entry.PledgeRecruitInfo;
|
||||
public class ExPledgeRecruitBoardSearch extends L2GameServerPacket
|
||||
{
|
||||
final List<PledgeRecruitInfo> _clanList;
|
||||
final private int _currentPage;
|
||||
final private int _totalNumberOfPage;
|
||||
final private int _clanOnCurrentPage;
|
||||
final private int _startIndex;
|
||||
final private int _endIndex;
|
||||
private final int _currentPage;
|
||||
private final int _totalNumberOfPage;
|
||||
private final int _clanOnCurrentPage;
|
||||
private final int _startIndex;
|
||||
private final int _endIndex;
|
||||
|
||||
final static int CLAN_PER_PAGE = 12;
|
||||
static final int CLAN_PER_PAGE = 12;
|
||||
|
||||
public ExPledgeRecruitBoardSearch(List<PledgeRecruitInfo> clanList, int currentPage)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ExPutItemResultForVariationCancel extends L2GameServerPacket
|
||||
_itemObjId = item.getObjectId();
|
||||
_itemId = item.getDisplayId();
|
||||
_price = price;
|
||||
_itemAug1 = ((short) item.getAugmentation().getAugmentationId());
|
||||
_itemAug1 = (short) item.getAugmentation().getAugmentationId();
|
||||
_itemAug2 = item.getAugmentation().getAugmentationId() >> 16;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ public class ExResponseBeautyList extends L2GameServerPacket
|
||||
private final int _type;
|
||||
private final Map<Integer, BeautyItem> _beautyItem;
|
||||
|
||||
public final static int SHOW_FACESHAPE = 1;
|
||||
public final static int SHOW_HAIRSTYLE = 0;
|
||||
public static final int SHOW_FACESHAPE = 1;
|
||||
public static final int SHOW_HAIRSTYLE = 0;
|
||||
|
||||
public ExResponseBeautyList(L2PcInstance activeChar, int type)
|
||||
{
|
||||
|
||||
@@ -27,11 +27,11 @@ public class ExResponseBeautyRegistReset extends L2GameServerPacket
|
||||
private final int _type;
|
||||
private final int _result;
|
||||
|
||||
public final static int FAILURE = 0;
|
||||
public final static int SUCCESS = 1;
|
||||
public static final int FAILURE = 0;
|
||||
public static final int SUCCESS = 1;
|
||||
|
||||
public final static int CHANGE = 0;
|
||||
public final static int RESTORE = 1;
|
||||
public static final int CHANGE = 0;
|
||||
public static final int RESTORE = 1;
|
||||
|
||||
public ExResponseBeautyRegistReset(L2PcInstance activeChar, int type, int result)
|
||||
{
|
||||
|
||||
@@ -26,8 +26,8 @@ public class ExShowBeautyMenu extends L2GameServerPacket
|
||||
private final L2PcInstance _activeChar;
|
||||
private final int _type;
|
||||
|
||||
public final static int MODIFY_APPEARANCE = 0;
|
||||
public final static int RESTORE_APPEARANCE = 1;
|
||||
public static final int MODIFY_APPEARANCE = 0;
|
||||
public static final int RESTORE_APPEARANCE = 1;
|
||||
|
||||
public ExShowBeautyMenu(L2PcInstance activeChar, int type)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ExShowFortressSiegeInfo extends L2GameServerPacket
|
||||
_fortId = fort.getResidenceId();
|
||||
_size = fort.getFortSize();
|
||||
final List<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(_fortId);
|
||||
_csize = ((commanders == null) ? 0 : commanders.size());
|
||||
_csize = (commanders == null) ? 0 : commanders.size();
|
||||
_csize2 = fort.getSiege().getCommanders().size();
|
||||
}
|
||||
|
||||
|
||||
@@ -220,15 +220,12 @@ public class ExShowScreenMessage extends L2GameServerPacket
|
||||
writeS(_text);
|
||||
exsize--;
|
||||
}
|
||||
else
|
||||
else if (_parameters != null)
|
||||
{
|
||||
if (_parameters != null)
|
||||
for (String s : _parameters)
|
||||
{
|
||||
for (String s : _parameters)
|
||||
{
|
||||
writeS(s);
|
||||
exsize--;
|
||||
}
|
||||
writeS(s);
|
||||
exsize--;
|
||||
}
|
||||
}
|
||||
for (int i = 1; i < exsize; i++)
|
||||
|
||||
@@ -54,7 +54,7 @@ public class HennaEquipList extends L2GameServerPacket
|
||||
{
|
||||
// Player must have at least one dye in inventory
|
||||
// to be able to see the Henna that can be applied with it.
|
||||
if ((_player.getInventory().getItemByItemId(henna.getDyeItemId())) != null)
|
||||
if (_player.getInventory().getItemByItemId(henna.getDyeItemId()) != null)
|
||||
{
|
||||
writeD(henna.getDyeId()); // dye Id
|
||||
writeD(henna.getDyeItemId()); // item Id of the dye
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PledgeReceiveMemberInfo extends L2GameServerPacket
|
||||
// clan or subpledge name
|
||||
if (_member.getPledgeType() != 0)
|
||||
{
|
||||
writeS((_member.getClan().getSubPledge(_member.getPledgeType())).getName());
|
||||
writeS(_member.getClan().getSubPledge(_member.getPledgeType()).getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ public final class PledgeShowMemberListAdd extends L2GameServerPacket
|
||||
_name = player.getName();
|
||||
_lvl = player.getLevel();
|
||||
_classId = player.getClassId().getId();
|
||||
_isOnline = (player.isOnline() ? player.getObjectId() : 0);
|
||||
_isOnline = player.isOnline() ? player.getObjectId() : 0;
|
||||
_pledgeType = player.getPledgeType();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class PledgeShowMemberListAdd extends L2GameServerPacket
|
||||
_name = cm.getName();
|
||||
_lvl = cm.getLevel();
|
||||
_classId = cm.getClassId();
|
||||
_isOnline = (cm.isOnline() ? cm.getObjectId() : 0);
|
||||
_isOnline = cm.isOnline() ? cm.getObjectId() : 0;
|
||||
_pledgeType = cm.getPledgeType();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PledgeShowMemberListAll extends L2GameServerPacket
|
||||
|
||||
private void writePledge(SubPledge pledge, String name, String ldname)
|
||||
{
|
||||
_pledgeType = (pledge == null ? 0x00 : pledge.getId());
|
||||
_pledgeType = pledge == null ? 0x00 : pledge.getId();
|
||||
writeC(0x5a);
|
||||
|
||||
String _name = "";
|
||||
@@ -74,7 +74,7 @@ public class PledgeShowMemberListAll extends L2GameServerPacket
|
||||
{
|
||||
_name = subPledge.getName();
|
||||
}
|
||||
writeD((_name.equals("")) || (_name.equals(name)) ? 0 : 1);
|
||||
writeD(_name.equals("") || _name.equals(name) ? 0 : 1);
|
||||
writeD(_clan.getId());
|
||||
writeD(Config.SERVER_ID);
|
||||
writeD(_pledgeType);
|
||||
|
||||
@@ -21,7 +21,7 @@ public final class RestartResponse extends L2GameServerPacket
|
||||
private static final RestartResponse STATIC_PACKET_TRUE = new RestartResponse(true);
|
||||
private static final RestartResponse STATIC_PACKET_FALSE = new RestartResponse(false);
|
||||
|
||||
public static final RestartResponse valueOf(boolean result)
|
||||
public static RestartResponse valueOf(boolean result)
|
||||
{
|
||||
return result ? STATIC_PACKET_TRUE : STATIC_PACKET_FALSE;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,6 @@ public class ShopPreviewInfo extends L2GameServerPacket
|
||||
|
||||
private int getFromList(int key)
|
||||
{
|
||||
return (_itemlist.containsKey(key) ? _itemlist.get(key) : 0);
|
||||
return _itemlist.containsKey(key) ? _itemlist.get(key) : 0;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class SiegeInfo extends L2GameServerPacket
|
||||
|
||||
final int ownerId = _castle.getOwnerId();
|
||||
|
||||
writeD(((ownerId == activeChar.getClanId()) && (activeChar.isClanLeader())) ? 0x01 : 0x00);
|
||||
writeD(((ownerId == activeChar.getClanId()) && activeChar.isClanLeader()) ? 0x01 : 0x00);
|
||||
writeD(ownerId);
|
||||
if (ownerId > 0)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public class SiegeInfo extends L2GameServerPacket
|
||||
|
||||
final int ownerId = _hall.getOwnerId();
|
||||
|
||||
writeD(((ownerId == activeChar.getClanId()) && (activeChar.isClanLeader())) ? 0x01 : 0x00);
|
||||
writeD(((ownerId == activeChar.getClanId()) && activeChar.isClanLeader()) ? 0x01 : 0x00);
|
||||
writeD(ownerId);
|
||||
if (ownerId > 0)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ public class SiegeInfo extends L2GameServerPacket
|
||||
}
|
||||
|
||||
writeD((int) (Calendar.getInstance().getTimeInMillis() / 1000));
|
||||
writeD((int) ((CHSiegeManager.getInstance().getSiegableHall(_hall.getId()).getNextSiegeTime()) / 1000));
|
||||
writeD((int) (CHSiegeManager.getInstance().getSiegableHall(_hall.getId()).getNextSiegeTime() / 1000));
|
||||
writeD(0x00); // number of choices?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,15 +297,15 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
{
|
||||
if ((o1.getType2() == L2Item.TYPE2_MONEY) && (o2.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
if ((o2.getType2() == L2Item.TYPE2_MONEY) && (o1.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
final String s1 = o1.getItemName();
|
||||
final String s2 = o2.getItemName();
|
||||
return (order == A2Z ? s1.compareTo(s2) : s2.compareTo(s1));
|
||||
return order == A2Z ? s1.compareTo(s2) : s2.compareTo(s1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,13 +329,13 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
{
|
||||
if ((o1.getType2() == L2Item.TYPE2_MONEY) && (o2.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
if ((o2.getType2() == L2Item.TYPE2_MONEY) && (o1.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
if ((o1.isEtcItem() && (o1.getItemType() == EtcItemType.RECIPE)) && (o2.isEtcItem() && (o2.getItemType() == EtcItemType.RECIPE)))
|
||||
if (o1.isEtcItem() && (o1.getItemType() == EtcItemType.RECIPE) && o2.isEtcItem() && (o2.getItemType() == EtcItemType.RECIPE))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -344,17 +344,17 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
|
||||
if (rp1 == null)
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
if (rp2 == null)
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
|
||||
final Integer i1 = rp1.getLevel();
|
||||
final Integer i2 = rp2.getLevel();
|
||||
|
||||
return (order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1));
|
||||
return order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -364,7 +364,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
|
||||
final String s1 = o1.getItemName();
|
||||
final String s2 = o2.getItemName();
|
||||
return (order == A2Z ? s1.compareTo(s2) : s2.compareTo(s1));
|
||||
return order == A2Z ? s1.compareTo(s2) : s2.compareTo(s1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,15 +385,15 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
{
|
||||
if ((o1.getType2() == L2Item.TYPE2_MONEY) && (o2.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
if ((o2.getType2() == L2Item.TYPE2_MONEY) && (o1.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
final Integer i1 = o1.getBodyPart();
|
||||
final Integer i2 = o2.getBodyPart();
|
||||
return (order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1));
|
||||
return order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,15 +414,15 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
{
|
||||
if ((o1.getType2() == L2Item.TYPE2_MONEY) && (o2.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
if ((o2.getType2() == L2Item.TYPE2_MONEY) && (o1.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
final CrystalType i1 = o1.getItemGrade();
|
||||
final CrystalType i2 = o2.getItemGrade();
|
||||
return (order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1));
|
||||
return order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,17 +443,17 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
{
|
||||
if ((o1.getType2() == L2Item.TYPE2_MONEY) && (o2.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? Z2A : A2Z);
|
||||
return order == A2Z ? Z2A : A2Z;
|
||||
}
|
||||
if ((o2.getType2() == L2Item.TYPE2_MONEY) && (o1.getType2() != L2Item.TYPE2_MONEY))
|
||||
{
|
||||
return (order == A2Z ? A2Z : Z2A);
|
||||
return order == A2Z ? A2Z : Z2A;
|
||||
}
|
||||
try
|
||||
{
|
||||
final MaterialType i1 = o1.getItem().getMaterialType();
|
||||
final MaterialType i2 = o2.getItem().getMaterialType();
|
||||
return (order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1));
|
||||
return order == A2Z ? i1.compareTo(i2) : i2.compareTo(i1);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -595,7 +595,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
final List<L2WarehouseItem> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item.isEtcItem() && (item.getItemName().toUpperCase().startsWith("AMULET"))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
if ((item.isEtcItem() && item.getItemName().toUpperCase().startsWith("AMULET")) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
{
|
||||
if (list.size() >= MAX_SORT_LIST_ITEMS)
|
||||
{
|
||||
@@ -619,7 +619,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
final List<L2WarehouseItem> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item.isEtcItem() && (!item.getItemName().toUpperCase().startsWith("AMULET"))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
if ((item.isEtcItem() && !item.getItemName().toUpperCase().startsWith("AMULET")) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
{
|
||||
if (list.size() >= MAX_SORT_LIST_ITEMS)
|
||||
{
|
||||
@@ -739,7 +739,7 @@ public class SortedWareHouseWithdrawalList extends AbstractItemPacket
|
||||
final List<L2WarehouseItem> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item.isEtcItem() && ((item.getEtcItem().getItemType() != EtcItemType.MATERIAL) && (item.getEtcItem().getItemType() != EtcItemType.RECIPE) && (item.getEtcItem().getItemType() != EtcItemType.SCROLL) && (item.getEtcItem().getItemType() != EtcItemType.SHOT))) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
if ((item.isEtcItem() && (item.getEtcItem().getItemType() != EtcItemType.MATERIAL) && (item.getEtcItem().getItemType() != EtcItemType.RECIPE) && (item.getEtcItem().getItemType() != EtcItemType.SCROLL) && (item.getEtcItem().getItemType() != EtcItemType.SHOT)) || (item.getItem().getType2() == L2Item.TYPE2_MONEY))
|
||||
{
|
||||
if (list.size() >= MAX_SORT_LIST_ITEMS)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
||||
super(smId);
|
||||
}
|
||||
|
||||
public static final SystemMessage sendString(String text)
|
||||
public static 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(SystemMessageId smId)
|
||||
public static SystemMessage getSystemMessage(SystemMessageId smId)
|
||||
{
|
||||
SystemMessage sm = smId.getStaticSystemMessage();
|
||||
if (sm != null)
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class TradeStart extends AbstractItemPacket
|
||||
{
|
||||
_activeChar = player;
|
||||
_partner = player.getActiveTradeList().getPartner();
|
||||
_itemList = _activeChar.getInventory().getAvailableItems(true, (_activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS) && Config.GM_TRADE_RESTRICTED_ITEMS), false);
|
||||
_itemList = _activeChar.getInventory().getAvailableItems(true, _activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS) && Config.GM_TRADE_RESTRICTED_ITEMS, false);
|
||||
|
||||
if (_partner == null)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
*/
|
||||
public class ExAlchemySkillList extends L2GameServerPacket
|
||||
{
|
||||
private final static int ALCHEMY_CUBE_SKILL = 17943;
|
||||
private static final int ALCHEMY_CUBE_SKILL = 17943;
|
||||
private final List<Skill> _skills = new ArrayList<>();
|
||||
|
||||
public ExAlchemySkillList(L2PcInstance player)
|
||||
|
||||
@@ -65,7 +65,6 @@ public class ExFriendDetailInfo extends L2GameServerPacket
|
||||
writeC(createDate.get(Calendar.MONTH) + 1);
|
||||
writeC(createDate.get(Calendar.DAY_OF_MONTH));
|
||||
writeD((int) ((System.currentTimeMillis() - friend.getLastLogin()) / 1000));
|
||||
writeS(friend.getMemo()); // memo
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -84,7 +83,7 @@ public class ExFriendDetailInfo extends L2GameServerPacket
|
||||
writeC(createDate.get(Calendar.MONTH) + 1);
|
||||
writeC(createDate.get(Calendar.DAY_OF_MONTH));
|
||||
writeD(player.isOnline() ? -1 : (int) ((System.currentTimeMillis() - player.getLastAccess()) / 1000));
|
||||
writeS(friend.getMemo()); // memo
|
||||
}
|
||||
writeS(friend.getMemo()); // memo
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public class FriendList extends L2GameServerPacket
|
||||
writeD(player.getObjectId());
|
||||
writeD(player.getLevel());
|
||||
writeD(player.getClassId().getId());
|
||||
writeS("testing");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -60,8 +59,8 @@ public class FriendList extends L2GameServerPacket
|
||||
writeD(0x00);
|
||||
writeD(friend.getLevel());
|
||||
writeD(friend.getClassId());
|
||||
writeS("testing");
|
||||
}
|
||||
writeS("testing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ExBettingLuckyGameResult extends L2GameServerPacket
|
||||
}
|
||||
|
||||
// Check inventory capacity
|
||||
if ((rewards.size() > 0) && ((!_activeChar.getInventory().validateCapacity(rewards.size())) || (!_activeChar.getInventory().validateWeight(totalWeight))))
|
||||
if ((rewards.size() > 0) && (!_activeChar.getInventory().validateCapacity(rewards.size()) || !_activeChar.getInventory().validateWeight(totalWeight)))
|
||||
{
|
||||
_activeChar.sendPacket(new ExStartLuckyGame(_type));
|
||||
_activeChar.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_EITHER_FULL_OR_OVERWEIGHT);
|
||||
@@ -109,25 +109,21 @@ public class ExBettingLuckyGameResult extends L2GameServerPacket
|
||||
writeD(0x02); // normal = 1, rare = 2 (forcing 2)
|
||||
writeD(reward.getId());
|
||||
writeD((int) reward.getCount());
|
||||
|
||||
final SystemMessage sm;
|
||||
if (_type == 2)
|
||||
{
|
||||
_activeChar.addItem("LuxuryFortuneTelling", reward, _activeChar, false);
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.CONGRATULATIONS_C1_HAS_OBTAINED_S2_OF_S3_IN_THE_LUXURY_FORTUNE_READING);
|
||||
sm.addPcName(_activeChar);
|
||||
sm.addLong(reward.getCount());
|
||||
sm.addItemName(new L2ItemInstance(reward.getId()));
|
||||
_activeChar.broadcastPacket(sm, 1000);
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.CONGRATULATIONS_C1_HAS_OBTAINED_S2_OF_S3_IN_THE_LUXURY_FORTUNE_READING);
|
||||
}
|
||||
else
|
||||
{
|
||||
_activeChar.addItem("FortuneTelling", reward, _activeChar, false);
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.CONGRATULATIONS_C1_HAS_OBTAINED_S2_OF_S3_THROUGH_FORTUNE_READING);
|
||||
sm.addPcName(_activeChar);
|
||||
sm.addLong(reward.getCount());
|
||||
sm.addItemName(new L2ItemInstance(reward.getId()));
|
||||
_activeChar.broadcastPacket(sm, 1000);
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.CONGRATULATIONS_C1_HAS_OBTAINED_S2_OF_S3_THROUGH_FORTUNE_READING);
|
||||
}
|
||||
sm.addPcName(_activeChar);
|
||||
sm.addLong(reward.getCount());
|
||||
sm.addItemName(new L2ItemInstance(reward.getId()));
|
||||
_activeChar.broadcastPacket(sm, 1000);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user