Sync with L2JServer Jan 28th 2015.
This commit is contained in:
@ -71,8 +71,6 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
|
||||
protected void writeTradeItem(TradeItem item)
|
||||
{
|
||||
// final int mask = calculateMask(item);
|
||||
// writeC(mask);
|
||||
writeH(item.getItem().getType1());
|
||||
writeD(item.getObjectId()); // ObjectId
|
||||
writeD(item.getItem().getDisplayId()); // ItemId
|
||||
@ -117,7 +115,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
if (containsMask(mask, ItemListType.VISUAL_ID))
|
||||
{
|
||||
writeD(item.getAppearanceId()); // Item remodel visual ID
|
||||
writeD(item.getVisualId()); // Item remodel visual ID
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,11 +177,10 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
}
|
||||
|
||||
if (item.getAppearanceId() > 0)
|
||||
if (item.getVisualId() > 0)
|
||||
{
|
||||
mask |= ItemListType.VISUAL_ID.getMask();
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
@ -145,15 +145,10 @@ public class CharInfo extends L2GameServerPacket
|
||||
|
||||
writeC(_armorEnchant);
|
||||
|
||||
writeD(0x00); // rhand item visual id
|
||||
writeD(0x00); // lhand item visual id
|
||||
writeD(0x00); // lrhand item visual id
|
||||
writeD(0x00); // gloves item visual id
|
||||
writeD(0x00); // chest item visual id
|
||||
writeD(0x00); // legs item visual id
|
||||
writeD(0x00); // feet item visual id
|
||||
writeD(0x00); // hair item visual id
|
||||
writeD(0x00); // hair 2 item visual id
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
writeD(_activeChar.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
writeC(_activeChar.getPvpFlag());
|
||||
writeD(_activeChar.getKarma());
|
||||
|
@ -83,7 +83,7 @@ public class ExUserInfoEquipSlot extends AbstractMaskPacket<InventorySlot>
|
||||
writeD(inventory.getPaperdollObjectId(slot.getSlot()));
|
||||
writeD(inventory.getPaperdollItemId(slot.getSlot()));
|
||||
writeD(inventory.getPaperdollAugmentationId(slot.getSlot()));
|
||||
writeD(inventory.getPaperdollVisualId(slot.getSlot()));
|
||||
writeD(inventory.getPaperdollItemVisualId(slot.getSlot()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public class ExBRBuyProduct extends L2GameServerPacket
|
||||
{
|
||||
public enum ExBrProductReplyType implements IIdentifiable
|
||||
{
|
||||
SUCCESS(1),
|
||||
LACK_OF_POINT(-1),
|
||||
INVALID_PRODUCT(-2),
|
||||
USER_CANCEL(-3),
|
||||
INVENTROY_OVERFLOW(-4),
|
||||
CLOSED_PRODUCT(-5),
|
||||
SERVER_ERROR(-6),
|
||||
BEFORE_SALE_DATE(-7),
|
||||
AFTER_SALE_DATE(-8),
|
||||
INVALID_USER(-9),
|
||||
INVALID_ITEM(-10),
|
||||
INVALID_USER_STATE(-11),
|
||||
NOT_DAY_OF_WEEK(-12),
|
||||
NOT_TIME_OF_DAY(-13),
|
||||
SOLD_OUT(-14);
|
||||
private final int _id;
|
||||
|
||||
private ExBrProductReplyType(int id)
|
||||
{
|
||||
_id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
}
|
||||
|
||||
private final int _reply;
|
||||
|
||||
public ExBRBuyProduct(final ExBrProductReplyType type)
|
||||
{
|
||||
_reply = type.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD9);
|
||||
writeD(_reply);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public class ExBRGamePoint extends L2GameServerPacket
|
||||
{
|
||||
private final int _charId;
|
||||
private final int _charPoints;
|
||||
|
||||
public ExBRGamePoint(final L2PcInstance player)
|
||||
{
|
||||
_charId = player.getObjectId();
|
||||
_charPoints = player.getPrimePoints();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD6);
|
||||
writeD(_charId);
|
||||
writeQ(_charPoints);
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
@ -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.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup;
|
||||
import com.l2jserver.gameserver.model.primeshop.PrimeShopItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik
|
||||
*/
|
||||
public class ExBRProductInfo extends L2GameServerPacket
|
||||
{
|
||||
private final PrimeShopGroup _item;
|
||||
|
||||
public ExBRProductInfo(PrimeShopGroup item)
|
||||
{
|
||||
_item = item;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD8);
|
||||
writeD(_item.getBrId());
|
||||
writeD(_item.getPrice());
|
||||
writeD(_item.getItems().size());
|
||||
for (PrimeShopItem item : _item.getItems())
|
||||
{
|
||||
writeD(item.getId());
|
||||
writeD((int) item.getCount());
|
||||
writeD(item.getWeight());
|
||||
writeD(item.isTradable());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.primeshop;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup;
|
||||
import com.l2jserver.gameserver.model.primeshop.PrimeShopItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExBRProductList extends L2GameServerPacket
|
||||
{
|
||||
private final L2PcInstance _activeChar;
|
||||
private final int _type;
|
||||
private final Collection<PrimeShopGroup> _primeList;
|
||||
|
||||
public ExBRProductList(L2PcInstance activeChar, int type, Collection<PrimeShopGroup> items)
|
||||
{
|
||||
_activeChar = activeChar;
|
||||
_type = type;
|
||||
_primeList = items;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD7);
|
||||
writeQ(_activeChar.getAdena()); // Adena
|
||||
writeQ(0x00); // Hero coins
|
||||
writeC(_type); // Type 0 - Home, 1 - History, 2 - Favorites
|
||||
writeD(_primeList.size());
|
||||
for (PrimeShopGroup brItem : _primeList)
|
||||
{
|
||||
writeD(brItem.getBrId());
|
||||
writeC(brItem.getCat());
|
||||
writeC(brItem.getPaymentType()); // Payment Type: 0 - Prime Points, 1 - Adena, 2 - Hero Coins
|
||||
writeD(brItem.getPrice());
|
||||
writeC(brItem.getPanelType()); // Item Panel Type: 0 - None, 1 - Event, 2 - Sale, 3 - New, 4 - Best
|
||||
writeD(brItem.getRecommended()); // Recommended: (bit flags) 1 - Top, 2 - Left, 4 - Right
|
||||
writeD(brItem.getStartSale());
|
||||
writeD(brItem.getEndSale());
|
||||
writeC(brItem.getDaysOfWeek());
|
||||
writeC(brItem.getStartHour());
|
||||
writeC(brItem.getStartMinute());
|
||||
writeC(brItem.getStopHour());
|
||||
writeC(brItem.getStopMinute());
|
||||
writeD(brItem.getStock());
|
||||
writeD(brItem.getTotal());
|
||||
writeC(brItem.getSalePercent());
|
||||
writeC(brItem.getMinLevel());
|
||||
writeC(brItem.getMaxLevel());
|
||||
writeD(brItem.getMinBirthday());
|
||||
writeD(brItem.getMaxBirthday());
|
||||
writeD(brItem.getRestrictionDay());
|
||||
writeD(brItem.getAvailableCount());
|
||||
writeC(brItem.getItems().size());
|
||||
for (PrimeShopItem item : brItem.getItems())
|
||||
{
|
||||
writeD(item.getId());
|
||||
writeD((int) item.getCount());
|
||||
writeD(item.getWeight());
|
||||
writeD(item.isTradable());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user