Fixed GMViewWarehouseWithdrawList clientpacket.

This commit is contained in:
MobiusDevelopment 2019-09-15 16:49:06 +00:00
parent 234e9a6a8f
commit 886453b46d
14 changed files with 175 additions and 70 deletions

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }

View File

@ -103,12 +103,14 @@ public class RequestGMCommand implements IClientIncomingPacket
// gm warehouse view to be implemented // gm warehouse view to be implemented
if (player != null) if (player != null)
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(player)); client.sendPacket(new GMViewWarehouseWithdrawList(1, player));
client.sendPacket(new GMViewWarehouseWithdrawList(2, player));
// clan warehouse // clan warehouse
} }
else else
{ {
client.sendPacket(new GMViewWarehouseWithdrawList(clan)); client.sendPacket(new GMViewWarehouseWithdrawList(1, clan));
client.sendPacket(new GMViewWarehouseWithdrawList(2, clan));
} }
break; break;
} }

View File

@ -26,19 +26,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewWarehouseWithdrawList extends AbstractItemPacket public class GMViewWarehouseWithdrawList extends AbstractItemPacket
{ {
private final int _sendType;
private final Collection<ItemInstance> _items; private final Collection<ItemInstance> _items;
private final String _playerName; private final String _playerName;
private final long _money; private final long _money;
public GMViewWarehouseWithdrawList(PlayerInstance player) public GMViewWarehouseWithdrawList(int sendType, PlayerInstance player)
{ {
_sendType = sendType;
_items = player.getWarehouse().getItems(); _items = player.getWarehouse().getItems();
_playerName = player.getName(); _playerName = player.getName();
_money = player.getWarehouse().getAdena(); _money = player.getWarehouse().getAdena();
} }
public GMViewWarehouseWithdrawList(Clan clan) public GMViewWarehouseWithdrawList(int sendType, Clan clan)
{ {
_sendType = sendType;
_playerName = clan.getLeaderName(); _playerName = clan.getLeaderName();
_items = clan.getWarehouse().getItems(); _items = clan.getWarehouse().getItems();
_money = clan.getWarehouse().getAdena(); _money = clan.getWarehouse().getAdena();
@ -48,13 +51,23 @@ public class GMViewWarehouseWithdrawList extends AbstractItemPacket
public boolean write(PacketWriter packet) public boolean write(PacketWriter packet)
{ {
OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet); OutgoingPackets.GM_VIEW_WAREHOUSE_WITHDRAW_LIST.writeId(packet);
packet.writeS(_playerName);
packet.writeQ(_money); packet.writeC(_sendType);
packet.writeH(_items.size()); if (_sendType == 2)
for (ItemInstance item : _items)
{ {
writeItem(packet, item); packet.writeD(_items.size());
packet.writeD(item.getObjectId()); packet.writeD(_items.size());
for (ItemInstance item : _items)
{
writeItem(packet, item);
packet.writeD(item.getObjectId());
}
}
else
{
packet.writeS(_playerName);
packet.writeQ(_money);
packet.writeD(_items.size());
} }
return true; return true;
} }