Sync with L2JServer Jan 30th 2015.

This commit is contained in:
mobius
2015-01-31 03:47:34 +00:00
parent acf0c17ba4
commit e7005fbedd
148 changed files with 1922 additions and 1672 deletions

View File

@@ -20,7 +20,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.AuctionManager.Auctions;
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;
@@ -119,28 +119,6 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
}
}
public void writeAuctionItem(Auctions auction)
{
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
}
protected static final int calculateMask(ItemInfo item)
{
int mask = 0;
@@ -225,4 +203,26 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
writeH(0x00);
}
}
public void writeAuctionItem(Auctions auction)
{
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
}
}

View File

@@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import com.l2jserver.gameserver.instancemanager.InstanceManager;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -49,8 +50,9 @@ public class ExInzoneWaiting extends L2GameServerPacket
writeD(_instanceTimes.size());
for (Entry<Integer, Long> entry : _instanceTimes.entrySet())
{
final long instanceTime = TimeUnit.MILLISECONDS.toMinutes(entry.getValue() - System.currentTimeMillis());
writeD(entry.getKey());
writeD((int) (entry.getValue() / 1000));
writeD((int) instanceTime);
}
}
}

View File

@@ -85,7 +85,7 @@ public final class RelationChanged extends L2GameServerPacket
{
if (activeChar.isInvisible())
{
_log.severe("Cannot add insivisble character to multi relation packet");
_log.severe("Cannot add invisible character to multi relation packet.");
return;
}
Relation r = new Relation();

View File

@@ -12,10 +12,11 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.instancemanager.AuctionManager.Auctions;
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys

View File

@@ -12,7 +12,9 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys

View File

@@ -12,7 +12,9 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys

View File

@@ -12,10 +12,11 @@
* 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;
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

View File

@@ -12,10 +12,11 @@
* 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;
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

View File

@@ -12,12 +12,13 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.instancemanager.AuctionManager;
import com.l2jserver.gameserver.instancemanager.AuctionManager.Auctions;
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
@@ -31,7 +32,7 @@ public class ExResponseCommissionList extends AbstractItemPacket
int _grade;
String _search;
boolean _yourAuction;
AuctionManager _am;
AuctionHouseManager _am;
int _yourAuctionsSize = 0;
int _categories[][] =
{
@@ -115,14 +116,14 @@ public class ExResponseCommissionList extends AbstractItemPacket
_grade = grade;
_search = searchName;
_yourAuction = false;
_am = AuctionManager.getInstance();
_am = AuctionHouseManager.getInstance();
}
public ExResponseCommissionList(L2PcInstance player)
{
_player = player;
_yourAuction = true;
_am = AuctionManager.getInstance();
_am = AuctionHouseManager.getInstance();
for (Auctions auction : _am.getAuctions())
{
if (auction.getPlayerID() == player.getObjectId())

View File

@@ -12,7 +12,9 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Erlandys

View File

@@ -12,7 +12,9 @@
* 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;
package com.l2jserver.gameserver.network.serverpackets.auctionhouse;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author mrTJO