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.instance.ItemInstance;
|
||||
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.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -75,6 +76,12 @@ public class UseItem implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.JAIL))
|
||||
{
|
||||
player.sendMessage("You cannot use items while jailed.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getActiveTradeList() != null)
|
||||
{
|
||||
player.cancelActiveTrade();
|
||||
|
Reference in New Issue
Block a user