activeChar.sendPacket(Msg.MAIL_SUCCESSFULLY_SENT);
return;
}
if (!Config.ALLOW_MAIL)
{
activeChar.sendMessage(new CustomMessage("mail.Disabled", activeChar));
activeChar.sendActionFailed();
return;
}
if (activeChar.isInStoreMode())
{
activeChar.sendPacket(Msg.YOU_CANNOT_FORWARD_BECAUSE_THE_PRIVATE_SHOP_OR_WORKSHOP_IS_IN_PROGRESS);
return;
}
if (activeChar.isInTrade())
{
activeChar.sendPacket(Msg.YOU_CANNOT_FORWARD_DURING_AN_EXCHANGE);
return;
}
if (activeChar.getEnchantScroll() != null)
{
activeChar.sendPacket(Msg.YOU_CANNOT_FORWARD_DURING_AN_ITEM_ENHANCEMENT_OR_ATTRIBUTE_ENHANCEMENT);
return;
}
if (_body.length() == 0)
{
activeChar.sendMessage("Enter the body message!");
return;
}
if (activeChar.getName().equalsIgnoreCase(_recieverName))
{
activeChar.sendPacket(Msg.YOU_CANNOT_SEND_A_MAIL_TO_YOURSELF);
return;
}
if ((_count > 0) && !activeChar.isInPeaceZone())
{
activeChar.sendPacket(Msg.YOU_CANNOT_FORWARD_IN_A_NON_PEACE_ZONE_LOCATION);
return;
}
if (activeChar.isFishing())
{
activeChar.sendPacket(Msg.YOU_CANNOT_DO_THAT_WHILE_FISHING);
return;
}
if (!activeChar.antiFlood.canMail())
{
activeChar.sendPacket(Msg.THE_PREVIOUS_MAIL_WAS_FORWARDED_LESS_THAN_1_MINUTE_AGO_AND_THIS_CANNOT_BE_FORWARDED);
return;
}
if (_price > 0)
{
if (!activeChar.getPlayerAccess().UseTrade)
{
activeChar.sendPacket(Msg.THIS_ACCOUNT_CANOT_TRADE_ITEMS);
activeChar.sendActionFailed();
return;
}
String tradeBan = activeChar.getVar("tradeBan");
if ((tradeBan != null) && (tradeBan.equals("-1") || (Long.parseLong(tradeBan) >= System.currentTimeMillis())))
{
if (tradeBan.equals("-1"))
{
activeChar.sendMessage(new CustomMessage("common.TradeBannedPermanently", activeChar));
}
else
{
activeChar.sendMessage(new CustomMessage("common.TradeBanned", activeChar).addString(Util.formatTime((int) ((Long.parseLong(tradeBan) / 1000L) - (System.currentTimeMillis() / 1000L)))));
}
return;
}
}
if (activeChar.isInBlockList(_recieverName))