@TheEnd
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package eu.l2eminence.gameserver.handler.playerbypasscommandhandlers;
import eu.l2eminence.gameserver.handler.IPlayerBypassCommandHandler;
import eu.l2eminence.gameserver.model.actor.instance.L2PcInstance;
import eu.l2eminence.gameserver.network.SystemMessageId;
import eu.l2eminence.gameserver.network.serverpackets.ExShowVariationCancelWindow;
import eu.l2eminence.gameserver.network.serverpackets.ExShowVariationMakeWindow;
import eu.l2eminence.gameserver.network.serverpackets.SystemMessage;
/**
*
* @author Nik
*/
public class PlayerBypassAugment implements IPlayerBypassCommandHandler
{
private static final String[] PLAYERBYPASS_COMMANDS = { "playerbypass_augment" };
public boolean usePlayerBypassCommand(String command, L2PcInstance activeChar)
{
if (command.startsWith("playerbypass_augment "))
{
try
{
String subcom = command.substring(14);
if (subcom.equalsIgnoreCase("add"))
{
activeChar.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED));
activeChar.sendPacket(new ExShowVariationMakeWindow());
}
else if (subcom.equalsIgnoreCase("remove"))
{
activeChar.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_FROM_WHICH_YOU_WISH_TO_REMOVE_AUGMENTATION));
activeChar.sendPacket(new ExShowVariationCancelWindow());
}
else
return false;
}
catch (StringIndexOutOfBoundsException e)
{
}
}
return true;
}
public String[] getPlayerBypassCommandList()
{
return PLAYERBYPASS_COMMANDS;
}
}
Its not tested, but it should work.