Prohibit using items while jailed.
Contributed by Sero.
This commit is contained in:
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -77,6 +78,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
|||||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
@@ -115,6 +116,13 @@ public class UseItem extends GameClientPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.isStunned() || player.isConfused() || player.isParalyzed() || player.isSleeping())
|
if (player.isStunned() || player.isConfused() || player.isParalyzed() || player.isSleeping())
|
||||||
{
|
{
|
||||||
player.sendMessage("You cannot use items right now.");
|
player.sendMessage("You cannot use items right now.");
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
|||||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
import org.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||||
@@ -116,6 +117,13 @@ public class UseItem extends GameClientPacket
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.isStunned() || player.isConfused() || player.isParalyzed() || player.isSleeping())
|
if (player.isStunned() || player.isConfused() || player.isParalyzed() || player.isSleeping())
|
||||||
{
|
{
|
||||||
player.sendMessage("You cannot use items right now.");
|
player.sendMessage("You cannot use items right now.");
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|||||||
import org.l2jmobius.gameserver.model.items.type.ArmorType;
|
import org.l2jmobius.gameserver.model.items.type.ArmorType;
|
||||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -78,6 +79,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|||||||
import org.l2jmobius.gameserver.model.items.type.ArmorType;
|
import org.l2jmobius.gameserver.model.items.type.ArmorType;
|
||||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -78,6 +79,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
|||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -76,6 +77,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.items.Item;
|
import org.l2jmobius.gameserver.model.items.Item;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||||
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -77,6 +78,12 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.isInsideZone(ZoneId.JAIL))
|
||||||
|
{
|
||||||
|
player.sendMessage("You cannot use items while jailed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getActiveTradeList() != null)
|
if (player.getActiveTradeList() != null)
|
||||||
{
|
{
|
||||||
player.cancelActiveTrade();
|
player.cancelActiveTrade();
|
||||||
|
|||||||
Reference in New Issue
Block a user