Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git aCis_game/java/net/sf/l2j/gameserver/model/actor/Player.java aCis_game/java/net/sf/l2j/gameserver/model/actor/Player.java
- index 023516a..46f58e3 100644
- --- aCis_game/java/net/sf/l2j/gameserver/model/actor/Player.java
- +++ aCis_game/java/net/sf/l2j/gameserver/model/actor/Player.java
- @@ -163,6 +164,8 @@
- import net.sf.l2j.gameserver.network.serverpackets.ExServerPrimitive;
- import net.sf.l2j.gameserver.network.serverpackets.ExSetCompassZoneCode;
- import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount;
- +import net.sf.l2j.gameserver.network.serverpackets.GMHennaInfo;
- +import net.sf.l2j.gameserver.network.serverpackets.GMViewItemList;
- import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle;
- import net.sf.l2j.gameserver.network.serverpackets.HennaInfo;
- import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
- @@ -2291,6 +2295,21 @@
- @Override
- public void onAction(Player player, boolean isCtrlPressed, boolean isShiftPressed)
- {
- + if (!isDead() && isShiftPressed)
- + {
- + if (!player.isGM())
- + {
- + if (!isGM())
- + player.sendPacket(new GMViewItemList(this, true));
- + else
- + player.sendMessage("You can't use it on GMs!");
- + }
- + else
- + player.sendPacket(new GMViewItemList(this));
- + player.sendPacket(new GMHennaInfo(this));
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;
- + }
- if (player.getTarget() != this)
- player.setTarget(this);
- else
- diff --git aCis_game/java/net/sf/l2j/gameserver/network/serverpackets/GMViewItemList.java aCis_game/java/net/sf/l2j/gameserver/network/serverpackets/GMViewItemList.java
- index 3a9980d..223c11e 100644
- --- aCis_game/java/net/sf/l2j/gameserver/network/serverpackets/GMViewItemList.java
- +++ aCis_game/java/net/sf/l2j/gameserver/network/serverpackets/GMViewItemList.java
- @@ -12,6 +12,7 @@
- private final Set<ItemInstance> _items;
- private final int _limit;
- private final String _playerName;
- + private boolean noGM = false;
- public GMViewItemList(Player player)
- {
- @@ -20,6 +21,14 @@
- _limit = player.getStatus().getInventoryLimit();
- }
- + public GMViewItemList(Player player, boolean noGM)
- + {
- + this.noGM = noGM;
- + _items = player.getInventory().getItems();
- + _playerName = player.getName();
- + _limit = player.getStatus().getInventoryLimit();
- + }
- +
- public GMViewItemList(Pet pet)
- {
- _items = pet.getInventory().getItems();
- @@ -39,6 +48,8 @@
- for (ItemInstance temp : _items)
- {
- Item item = temp.getItem();
- + if (noGM && !temp.isEquipped())
- + continue;
- writeH(item.getType1());
- writeD(temp.getObjectId());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement