Fixed Talking Island and Faeron Village scrolls of escape.
Dropped Batalion Zone due to lack of further development. Added Various missing syncs from L2jServer Ertheia.
This commit is contained in:
@@ -18,9 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.enums.ItemListType;
|
||||
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions;
|
||||
import com.l2jserver.gameserver.model.ItemInfo;
|
||||
import com.l2jserver.gameserver.model.TradeItem;
|
||||
import com.l2jserver.gameserver.model.buylist.Product;
|
||||
@@ -204,25 +202,16 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
}
|
||||
|
||||
public void writeAuctionItem(Auctions auction)
|
||||
protected void writeCommissionItem(ItemInfo item)
|
||||
{
|
||||
writeQ(auction.getAuctionId()); // Auction id
|
||||
writeQ(auction.getPrice()); // Price
|
||||
writeD(auction.getCategory()); // Category
|
||||
writeD(auction.getDuration()); // Duration / maybe in days???
|
||||
writeD((int) auction.getFinishTime()); // Time when this item will vanish from auction (in seconds)(example (currentTime+60=after 1 minute))
|
||||
writeS(CharNameTable.getInstance().getNameById(auction.getPlayerID())); // Name
|
||||
writeD(0);
|
||||
ItemInfo it = new ItemInfo(auction.getItem());
|
||||
writeD(auction.getItem().getId()); // Item ID
|
||||
writeQ(auction.getItem().getCount()); // Count
|
||||
writeH(auction.getItem().getItem().getType2()); // item.getItem().getType2()
|
||||
writeD(auction.getItem().getItem().getBodyPart()); // item.getItem().getBodyPart()
|
||||
writeH(auction.getItem().getCustomType2()); // item.getCustomType2()
|
||||
writeH(0x00); // ???
|
||||
writeD(auction.getItem().getEnchantLevel());
|
||||
writeItemElemental(it);
|
||||
writeItemEnchantEffect(it);
|
||||
writeD(0x00); // Item remodel visual ID
|
||||
writeD(0); // Always 0
|
||||
writeD(item.getItem().getId());
|
||||
writeQ(item.getCount());
|
||||
writeH(item.getItem().getType2());
|
||||
writeQ(item.getItem().getBodyPart());
|
||||
writeH(item.getEnchant());
|
||||
writeH(item.getCustomType2());
|
||||
writeItemElementalAndEnchant(item);
|
||||
writeD(item.getVisualId());
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FortManager;
|
||||
@@ -32,7 +31,6 @@ import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.entity.Castle;
|
||||
import com.l2jserver.gameserver.model.entity.Fort;
|
||||
import com.l2jserver.gameserver.model.entity.clanhall.SiegableHall;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
/**
|
||||
* @author UnAfraid, Nos
|
||||
@@ -83,16 +81,6 @@ public class Die extends L2GameServerPacket
|
||||
_toFortress = ((clan != null) && (clan.getFortId() > 0)) || isInFortDefense;
|
||||
}
|
||||
|
||||
if (activeChar.isInsideZone(ZoneId.BATTALION) && !Config.BTZ_REVIVE)
|
||||
{
|
||||
_toVillage = false;
|
||||
_toClanHall = false;
|
||||
_toCastle = false;
|
||||
_toOutpost = false;
|
||||
_useFeather = false;
|
||||
_toFortress = false;
|
||||
}
|
||||
|
||||
_isSweepable = activeChar.isAttackable() && activeChar.isSweepActive();
|
||||
}
|
||||
|
||||
|
@@ -55,10 +55,10 @@ public class ExReplyReceivedPost extends AbstractItemPacket
|
||||
writeC(0xFE);
|
||||
writeH(0xAC);
|
||||
writeD(_msg.getMailType().ordinal()); // GOD
|
||||
if (_msg.getMailType() == MailType.SYSTEM)
|
||||
if (_msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)
|
||||
{
|
||||
writeD(_msg.getSystemMessage1());
|
||||
writeD(_msg.getSystemMessage2());
|
||||
writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId());
|
||||
writeD(SystemMessageId.THE_AUCTION_HOUSE_REGISTRATION_PERIOD_HAS_EXPIRED_AND_THE_CORRESPONDING_ITEM_IS_BEING_FORWARDED.getId());
|
||||
}
|
||||
else if (_msg.getMailType() == MailType.COMMISSION_ITEM_SOLD)
|
||||
{
|
||||
|
@@ -53,9 +53,9 @@ public class ExShowReceivedPostList extends L2GameServerPacket
|
||||
{
|
||||
writeD(SystemMessageId.THE_ITEM_YOU_REGISTERED_HAS_BEEN_SOLD.getId());
|
||||
}
|
||||
else if (msg.getMailType() == MailType.SYSTEM)
|
||||
else if (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)
|
||||
{
|
||||
writeD(msg.getSystemMessage1());
|
||||
writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId());
|
||||
}
|
||||
writeD(msg.getId());
|
||||
writeS(msg.getSubject());
|
||||
@@ -63,7 +63,7 @@ public class ExShowReceivedPostList extends L2GameServerPacket
|
||||
writeD(msg.isLocked() ? 0x01 : 0x00);
|
||||
writeD(msg.getExpirationSeconds());
|
||||
writeD(msg.isUnread() ? 0x01 : 0x00);
|
||||
writeD(((msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) || (msg.getMailType() == MailType.SYSTEM)) ? 0 : 1);
|
||||
writeD(((msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) || (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)) ? 0 : 1);
|
||||
writeD(msg.hasAttachments() ? 0x01 : 0x00);
|
||||
writeD(msg.isReturned() ? 0x01 : 0x00);
|
||||
writeD(0x00); // SysString in some case it seems
|
||||
|
@@ -21,16 +21,18 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExDivideAdenaCancel extends L2GameServerPacket
|
||||
{
|
||||
public static final ExDivideAdenaCancel STATIC_PACKET = new ExDivideAdenaCancel();
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x15C);
|
||||
|
||||
writeC(0x00); // TODO: Find me
|
||||
}
|
||||
}
|
||||
|
@@ -21,33 +21,34 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExDivideAdenaDone extends L2GameServerPacket
|
||||
{
|
||||
private final int _friendsCount;
|
||||
private final long _count;
|
||||
private final long _dividedCount;
|
||||
private final String _name;
|
||||
private final long _adenaCount;
|
||||
private final long _distributedAdenaCount;
|
||||
private final int _memberCount;
|
||||
private final String _distributorName;
|
||||
|
||||
public ExDivideAdenaDone(int friendsCount, long count, long dividedCount, String name)
|
||||
public ExDivideAdenaDone(long adenaCount, long distributedAdenaCount, int memberCount, String distributorName)
|
||||
{
|
||||
_friendsCount = friendsCount;
|
||||
_count = count;
|
||||
_dividedCount = dividedCount;
|
||||
_name = name;
|
||||
_adenaCount = adenaCount;
|
||||
_distributedAdenaCount = distributedAdenaCount;
|
||||
_memberCount = memberCount;
|
||||
_distributorName = distributorName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x15D);
|
||||
writeC(0x01); // Always 1
|
||||
writeC(0x00); // Always 0
|
||||
writeD(_friendsCount); // Friends count
|
||||
writeQ(_dividedCount); // Divided count
|
||||
writeQ(_count); // Whole count
|
||||
writeS(_name); // Giver name
|
||||
|
||||
writeC(0x00); // TODO: Find me / type ??
|
||||
writeC(0x00); // TODO: Find me
|
||||
writeD(_memberCount);
|
||||
writeQ(_distributedAdenaCount);
|
||||
writeQ(_adenaCount);
|
||||
writeS(_distributorName);
|
||||
}
|
||||
}
|
||||
|
@@ -21,16 +21,16 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExDivideAdenaStart extends L2GameServerPacket
|
||||
{
|
||||
public static final ExDivideAdenaStart STATIC_PACKET = new ExDivideAdenaStart();
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x15B);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionBuyInfo extends L2GameServerPacket
|
||||
{
|
||||
private final Auctions _auction;
|
||||
|
||||
public ExResponseCommissionBuyInfo(Auctions auction)
|
||||
{
|
||||
_auction = auction;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF8);
|
||||
|
||||
writeD(0x01); // Unknown
|
||||
|
||||
final L2ItemInstance item = _auction.getItem();
|
||||
|
||||
writeQ(_auction.getPrice());
|
||||
writeD(_auction.getCategory());
|
||||
writeD(0x00); // Unkown
|
||||
writeD(item.getId());
|
||||
writeQ(item.getCount());
|
||||
writeH(item.getItem().getType2());
|
||||
writeD(item.getItem().getBodyPart());
|
||||
writeH(item.getEnchantLevel());
|
||||
writeH(item.getCustomType2());
|
||||
writeD(item.getAugmentation() != null ? item.getAugmentation().getAugmentationId() : 0x00);
|
||||
writeH(item.getAttackElementType());
|
||||
writeH(item.getAttackElementPower());
|
||||
for (byte d = 0; d < 6; d++)
|
||||
{
|
||||
writeH(item.getElementDefAttr(d));
|
||||
}
|
||||
|
||||
writeH(0); // unknown
|
||||
writeH(0); // unknown
|
||||
writeH(0); // unknown
|
||||
}
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionBuyItem extends L2GameServerPacket
|
||||
{
|
||||
public static final ExResponseCommissionBuyItem STATIC_PACKET = new ExResponseCommissionBuyItem();
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF8);
|
||||
writeD(1); // unk
|
||||
writeD(0); // unk
|
||||
writeD(58); // Item ID
|
||||
writeQ(1); // count
|
||||
}
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionDelete extends L2GameServerPacket
|
||||
{
|
||||
private final boolean success;
|
||||
|
||||
public ExResponseCommissionDelete(boolean _success)
|
||||
{
|
||||
success = _success;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xd3);
|
||||
writeD(success ? 0x01 : 0x00);
|
||||
}
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionInfo extends L2GameServerPacket
|
||||
{
|
||||
L2PcInstance player;
|
||||
L2ItemInstance item;
|
||||
boolean success;
|
||||
|
||||
public ExResponseCommissionInfo(L2PcInstance _player, int _itemOID, boolean _success)
|
||||
{
|
||||
player = _player;
|
||||
item = player.getInventory().getItemByObjectId(_itemOID);
|
||||
success = _success;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF4);
|
||||
writeD(success ? 0x01 : 0x00); // TODO: Success
|
||||
writeD(0x00); // ItemID
|
||||
writeD(0x00); // TODO: Price
|
||||
writeQ(0x00); // TODO: Count
|
||||
writeD(0x00); // TODO: Duration
|
||||
writeD(-0x01); // TODO: Unknown
|
||||
writeD(0x00); // TODO: Unknown
|
||||
}
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionItemList extends AbstractItemPacket
|
||||
{
|
||||
private final L2PcInstance _player;
|
||||
|
||||
public ExResponseCommissionItemList(L2PcInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF3);
|
||||
|
||||
writeD(_player.getInventory().getSize(false));
|
||||
|
||||
for (L2ItemInstance item : _player.getInventory().getItems())
|
||||
{
|
||||
if (!item.isSellable() || !item.isTradeable() || item.isEquipped() || (item.getId() == 57) || item.isQuestItem())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
writeItem(item);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,266 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager;
|
||||
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionList extends AbstractItemPacket
|
||||
{
|
||||
L2PcInstance _player;
|
||||
L2ItemInstance _item;
|
||||
long _category;
|
||||
int _type;
|
||||
int _grade;
|
||||
String _search;
|
||||
boolean _yourAuction;
|
||||
AuctionHouseManager _am;
|
||||
int _yourAuctionsSize = 0;
|
||||
int _categories[][] =
|
||||
{
|
||||
{
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18
|
||||
},
|
||||
{
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28
|
||||
},
|
||||
{
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34
|
||||
},
|
||||
{
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
40
|
||||
},
|
||||
{
|
||||
41,
|
||||
42
|
||||
},
|
||||
{
|
||||
43,
|
||||
44,
|
||||
45,
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
50,
|
||||
51,
|
||||
52,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58
|
||||
}
|
||||
};
|
||||
|
||||
public ExResponseCommissionList(L2PcInstance player, long category, int type, int grade, String searchName)
|
||||
{
|
||||
_player = player;
|
||||
_category = category;
|
||||
_type = type;
|
||||
_grade = grade;
|
||||
_search = searchName;
|
||||
_yourAuction = false;
|
||||
_am = AuctionHouseManager.getInstance();
|
||||
}
|
||||
|
||||
public ExResponseCommissionList(L2PcInstance player)
|
||||
{
|
||||
_player = player;
|
||||
_yourAuction = true;
|
||||
_am = AuctionHouseManager.getInstance();
|
||||
for (Auctions auction : _am.getAuctions())
|
||||
{
|
||||
if (auction.getPlayerID() == player.getObjectId())
|
||||
{
|
||||
_yourAuctionsSize++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF7);
|
||||
if (_yourAuction)
|
||||
{
|
||||
writeD(_yourAuctionsSize <= 0 ? -2 : 0x02);
|
||||
writeD((int) (System.currentTimeMillis() / 1000));
|
||||
writeD(0x00);
|
||||
writeD(_yourAuctionsSize);
|
||||
for (Auctions auction : _am.getAuctions())
|
||||
{
|
||||
if (auction.getPlayerID() == _player.getObjectId())
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD((_search != null) && (_category == 100) && (_am.getAuctionsSizeById(_grade, _search) > 0) ? 3 : (_am.getAuctionsSizeById(_grade, _search) <= 0) || (_am.getAuctionsSizeById(_category, _grade, _search) <= 0) ? -1 : 3);
|
||||
writeD((int) (System.currentTimeMillis() / 1000));
|
||||
writeD(0x00);
|
||||
if (((_category > 60) && (_category < 66)) || (_category == 101))
|
||||
{
|
||||
writeD(_am.getAuctionsSizeById(_category, _grade, _search));
|
||||
for (Auctions auction : _am.getAuctions())
|
||||
{
|
||||
int cat = _category == 101 ? 0 : (int) (_category % 60);
|
||||
for (int ID : _categories[cat])
|
||||
{
|
||||
if ((_grade == -1) && _search.equals(""))
|
||||
{
|
||||
if (auction.getCategory() == ID)
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
else if (_grade != -1)
|
||||
{
|
||||
if (_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == ID) && (_grade == auction.getItem().getItem().getCrystalType().getId()))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
if (!_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == ID) && (_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == ID) && auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_category < 60)
|
||||
{
|
||||
writeD(_am.getAuctionsSizeById(_category, _grade, _search)); // Auction count, maybe items putted in auction???
|
||||
for (Auctions auction : _am.getAuctions())
|
||||
{
|
||||
if ((_grade == -1) && _search.equals(""))
|
||||
{
|
||||
if (auction.getCategory() == _category)
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
else if (_grade != -1)
|
||||
{
|
||||
if (_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == _category) && (_grade == auction.getItem().getItem().getCrystalType().getId()))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
if (!_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == _category) && (_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!_search.equals(""))
|
||||
{
|
||||
if ((auction.getCategory() == _category) && auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_search != null)
|
||||
{
|
||||
writeD(_am.getAuctionsSizeById(_grade, _search)); // Auction count, maybe items putted in auction???
|
||||
for (Auctions auction : _am.getAuctions())
|
||||
{
|
||||
if (_grade == -1)
|
||||
{
|
||||
if (auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
if (_grade != -1)
|
||||
{
|
||||
if ((_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search))
|
||||
{
|
||||
writeAuctionItem(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ExResponseCommissionRegister extends L2GameServerPacket
|
||||
{
|
||||
private final boolean success;
|
||||
|
||||
public ExResponseCommissionRegister(boolean _success)
|
||||
{
|
||||
success = _success;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xd3);
|
||||
writeD(success ? 1 : 0); // Success
|
||||
}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author mrTJO
|
||||
*/
|
||||
public class ExShowCommission extends L2GameServerPacket
|
||||
{
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF2);
|
||||
writeD(0x01); // Just for showing window...
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExCloseCommission extends L2GameServerPacket
|
||||
{
|
||||
public static final ExCloseCommission STATIC_PACKET = new ExCloseCommission();
|
||||
|
||||
private ExCloseCommission()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x112);
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.model.commission.CommissionItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionBuyInfo extends AbstractItemPacket
|
||||
{
|
||||
public static final ExResponseCommissionBuyInfo FAILED = new ExResponseCommissionBuyInfo(null);
|
||||
|
||||
private final CommissionItem _commissionItem;
|
||||
|
||||
public ExResponseCommissionBuyInfo(CommissionItem commissionItem)
|
||||
{
|
||||
_commissionItem = commissionItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF8);
|
||||
writeD(_commissionItem != null ? 1 : 0);
|
||||
if (_commissionItem != null)
|
||||
{
|
||||
writeQ(_commissionItem.getPricePerUnit());
|
||||
writeQ(_commissionItem.getCommissionId());
|
||||
writeD(0); // CommissionItemType seems client does not really need it.
|
||||
writeCommissionItem(_commissionItem.getItemInfo());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.model.ItemInfo;
|
||||
import com.l2jserver.gameserver.model.commission.CommissionItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionBuyItem extends L2GameServerPacket
|
||||
{
|
||||
public static final ExResponseCommissionBuyItem FAILED = new ExResponseCommissionBuyItem(null);
|
||||
|
||||
private final CommissionItem _commissionItem;
|
||||
|
||||
public ExResponseCommissionBuyItem(CommissionItem commissionItem)
|
||||
{
|
||||
_commissionItem = commissionItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF9);
|
||||
writeD(_commissionItem != null ? 1 : 0);
|
||||
if (_commissionItem != null)
|
||||
{
|
||||
final ItemInfo itemInfo = _commissionItem.getItemInfo();
|
||||
writeD(itemInfo.getEnchant());
|
||||
writeD(itemInfo.getItem().getId());
|
||||
writeQ(itemInfo.getCount());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionDelete extends L2GameServerPacket
|
||||
{
|
||||
public static final ExResponseCommissionDelete SUCCEED = new ExResponseCommissionDelete(1);
|
||||
public static final ExResponseCommissionDelete FAILED = new ExResponseCommissionDelete(0);
|
||||
|
||||
private final int _result;
|
||||
|
||||
private ExResponseCommissionDelete(int result)
|
||||
{
|
||||
_result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF6);
|
||||
writeD(_result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionInfo extends L2GameServerPacket
|
||||
{
|
||||
public static final ExResponseCommissionInfo EMPTY = new ExResponseCommissionInfo();
|
||||
|
||||
private final int _result;
|
||||
private final int _itemId;
|
||||
private final long _presetPricePerUnit;
|
||||
private final long _presetAmount;
|
||||
private final int _presetDurationType;
|
||||
|
||||
private ExResponseCommissionInfo()
|
||||
{
|
||||
_result = 0;
|
||||
_itemId = 0;
|
||||
_presetPricePerUnit = 0;
|
||||
_presetAmount = 0;
|
||||
_presetDurationType = -1;
|
||||
}
|
||||
|
||||
public ExResponseCommissionInfo(int itemId, long presetPricePerUnit, long presetAmount, int presetDurationType)
|
||||
{
|
||||
_result = 1;
|
||||
_itemId = itemId;
|
||||
_presetPricePerUnit = presetPricePerUnit;
|
||||
_presetAmount = presetAmount;
|
||||
_presetDurationType = presetDurationType;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF4);
|
||||
writeD(_result);
|
||||
writeD(_itemId);
|
||||
writeQ(_presetPricePerUnit);
|
||||
writeQ(_presetAmount);
|
||||
writeD(_presetDurationType);
|
||||
}
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionItemList extends AbstractItemPacket
|
||||
{
|
||||
private final List<L2ItemInstance> _items;
|
||||
|
||||
public ExResponseCommissionItemList(List<L2ItemInstance> items)
|
||||
{
|
||||
_items = items;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF3);
|
||||
writeD(_items.size());
|
||||
for (L2ItemInstance itemInstance : _items)
|
||||
{
|
||||
writeItem(itemInstance);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.model.commission.CommissionItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionList extends AbstractItemPacket
|
||||
{
|
||||
public static final int MAX_CHUNK_SIZE = 120;
|
||||
|
||||
private final CommissionListReplyType _replyType;
|
||||
private final List<CommissionItem> _items;
|
||||
private final int _chunkId;
|
||||
private final int _listIndexStart;
|
||||
|
||||
public ExResponseCommissionList(CommissionListReplyType replyType)
|
||||
{
|
||||
this(replyType, Collections.emptyList(), 0);
|
||||
}
|
||||
|
||||
public ExResponseCommissionList(CommissionListReplyType replyType, List<CommissionItem> items)
|
||||
{
|
||||
this(replyType, items, 0);
|
||||
}
|
||||
|
||||
public ExResponseCommissionList(CommissionListReplyType replyType, List<CommissionItem> items, int chunkId)
|
||||
{
|
||||
this(replyType, items, chunkId, 0);
|
||||
}
|
||||
|
||||
public ExResponseCommissionList(CommissionListReplyType replyType, List<CommissionItem> items, int chunkId, int listIndexStart)
|
||||
{
|
||||
_replyType = replyType;
|
||||
_items = items;
|
||||
_chunkId = chunkId;
|
||||
_listIndexStart = listIndexStart;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF7);
|
||||
writeD(_replyType.getClientId());
|
||||
switch (_replyType)
|
||||
{
|
||||
case PLAYER_AUCTIONS:
|
||||
case AUCTIONS:
|
||||
{
|
||||
writeD((int) Instant.now().getEpochSecond());
|
||||
writeD(_chunkId);
|
||||
|
||||
int chunkSize = _items.size() - _listIndexStart;
|
||||
if (chunkSize > MAX_CHUNK_SIZE)
|
||||
{
|
||||
chunkSize = MAX_CHUNK_SIZE;
|
||||
}
|
||||
|
||||
writeD(chunkSize);
|
||||
for (int i = _listIndexStart; i < (_listIndexStart + chunkSize); i++)
|
||||
{
|
||||
final CommissionItem commissionItem = _items.get(i);
|
||||
writeQ(commissionItem.getCommissionId());
|
||||
writeQ(commissionItem.getPricePerUnit());
|
||||
writeD(0); // CommissionItemType seems client does not really need it.
|
||||
writeD((commissionItem.getDurationInDays() - 1) / 2);
|
||||
writeD((int) commissionItem.getEndTime().getEpochSecond());
|
||||
writeS(null); // Seller Name its not displayed somewhere so i am not sending it to decrease traffic.
|
||||
writeCommissionItem(commissionItem.getItemInfo());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CommissionListReplyType
|
||||
{
|
||||
PLAYER_AUCTIONS_EMPTY(-2),
|
||||
ITEM_DOES_NOT_EXIST(-1),
|
||||
PLAYER_AUCTIONS(2),
|
||||
AUCTIONS(3);
|
||||
|
||||
private final int _clientId;
|
||||
|
||||
private CommissionListReplyType(int clientId)
|
||||
{
|
||||
_clientId = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
* @return the client id
|
||||
*/
|
||||
public int getClientId()
|
||||
{
|
||||
return _clientId;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExResponseCommissionRegister extends L2GameServerPacket
|
||||
{
|
||||
public static final ExResponseCommissionRegister SUCCEED = new ExResponseCommissionRegister(1);
|
||||
public static final ExResponseCommissionRegister FAILED = new ExResponseCommissionRegister(0);
|
||||
|
||||
private final int _result;
|
||||
|
||||
private ExResponseCommissionRegister(int result)
|
||||
{
|
||||
_result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF5);
|
||||
writeD(_result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.commission;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author NosBit
|
||||
*/
|
||||
public class ExShowCommission extends L2GameServerPacket
|
||||
{
|
||||
public static final ExShowCommission STATIC_PACKET = new ExShowCommission();
|
||||
|
||||
private ExShowCommission()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xF2);
|
||||
writeD(1);
|
||||
}
|
||||
}
|
@@ -20,23 +20,27 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantFail extends L2GameServerPacket
|
||||
{
|
||||
private final int _itemId1;
|
||||
private final int _itemId2;
|
||||
public static final ExEnchantFail STATIC_PACKET = new ExEnchantFail(0, 0);
|
||||
private final int _itemOne;
|
||||
private final int _itemTwo;
|
||||
|
||||
public ExEnchantFail(int itemId1, int itemId2)
|
||||
public ExEnchantFail(int itemOne, int itemTwo)
|
||||
{
|
||||
_itemId1 = itemId1;
|
||||
_itemId2 = itemId2;
|
||||
_itemOne = itemOne;
|
||||
_itemTwo = itemTwo;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x171);
|
||||
writeD(_itemId1);
|
||||
writeD(_itemId2);
|
||||
writeD(_itemOne);
|
||||
writeD(_itemTwo);
|
||||
}
|
||||
}
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantOneFail extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantOneFail STATIC_PACKET = new ExEnchantOneFail();
|
||||
|
||||
private ExEnchantOneFail()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x169);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantOneOK extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantOneOK STATIC_PACKET = new ExEnchantOneOK();
|
||||
public static ExEnchantOneOK STATIC_PACKET = new ExEnchantOneOK();
|
||||
|
||||
private ExEnchantOneOK()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x168);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantOneRemoveFail extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantOneRemoveFail STATIC_PACKET = new ExEnchantOneRemoveFail();
|
||||
|
||||
private ExEnchantOneRemoveFail()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16B);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantOneRemoveOK extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantOneRemoveOK STATIC_PACKET = new ExEnchantOneRemoveOK();
|
||||
|
||||
private ExEnchantOneRemoveOK()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16A);
|
||||
|
@@ -20,20 +20,23 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantSucess extends L2GameServerPacket
|
||||
{
|
||||
int _newItemId;
|
||||
private final int _itemId;
|
||||
|
||||
public ExEnchantSucess(int newItemId)
|
||||
public ExEnchantSucess(int itemId)
|
||||
{
|
||||
_newItemId = newItemId;
|
||||
_itemId = itemId;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x170);
|
||||
writeD(_newItemId);
|
||||
writeD(_itemId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantTwoFail extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantTwoFail STATIC_PACKET = new ExEnchantTwoFail();
|
||||
|
||||
private ExEnchantTwoFail()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16D);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantTwoOK extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantTwoOK STATIC_PACKET = new ExEnchantTwoOK();
|
||||
|
||||
private ExEnchantTwoOK()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16C);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantTwoRemoveFail extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantTwoRemoveFail STATIC_PACKET = new ExEnchantTwoRemoveFail();
|
||||
|
||||
private ExEnchantTwoRemoveFail()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16F);
|
||||
|
@@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound;
|
||||
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExEnchantTwoRemoveOK extends L2GameServerPacket
|
||||
{
|
||||
public static final ExEnchantTwoRemoveOK STATIC_PACKET = new ExEnchantTwoRemoveOK();
|
||||
|
||||
private ExEnchantTwoRemoveOK()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x16E);
|
||||
|
Reference in New Issue
Block a user