Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestPrivateStoreQuitSell

package l2p.gameserver.clientpackets;

import l2p.gameserver.model.L2Player;
import l2p.gameserver.serverpackets.SendTradeDone;

public class RequestPrivateStoreQuitSell extends L2GameClientPacket
{
  @Override
  public void readImpl()
  {
  }

  @Override
  public void runImpl()
  {
    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    if(activeChar.getTradeList() != null)
    {
      activeChar.getTradeList().removeAll();
      activeChar.sendPacket(new SendTradeDone(0));
      activeChar.setTradeList(null);
      if(activeChar.isInTransaction())
      {
        activeChar.getTransaction().cancel();
      }
    }
    activeChar.setPrivateStoreType(L2Player.STORE_PRIVATE_NONE);
    activeChar.standUp();
    activeChar.broadcastUserInfo(true);
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestPrivateStoreQuitSell

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.