Package l2p.gameserver.model.base

Examples of l2p.gameserver.model.base.Transaction.cancel()


      L2Player requestor;
      if(transaction == null || (requestor = transaction.getOtherPlayer(activeChar)) == null)
      {
        if(transaction != null)
        {
          transaction.cancel();
        }
        activeChar.sendPacket(SendTradeDone.Fail, Msg.ActionFail);
        return;
      }
      if(activeChar.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE || requestor.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE)
View Full Code Here


        activeChar.sendPacket(SendTradeDone.Fail, Msg.ActionFail);
        return;
      }
      if(activeChar.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE || requestor.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE)
      {
        transaction.cancel();
        activeChar.sendPacket(SendTradeDone.Fail, Msg.ActionFail);
        activeChar.sendPacket(Msg.WHILE_OPERATING_A_PRIVATE_STORE_OR_WORKSHOP_YOU_CANNOT_DISCARD_DESTROY_OR_TRADE_AN_ITEM);
        requestor.sendPacket(Msg.WHILE_OPERATING_A_PRIVATE_STORE_OR_WORKSHOP_YOU_CANNOT_DISCARD_DESTROY_OR_TRADE_AN_ITEM);
        return;
      }
View Full Code Here

        requestor.sendPacket(Msg.WHILE_OPERATING_A_PRIVATE_STORE_OR_WORKSHOP_YOU_CANNOT_DISCARD_DESTROY_OR_TRADE_AN_ITEM);
        return;
      }
      if(!transaction.isTypeOf(TransactionType.TRADE))
      {
        transaction.cancel();
        activeChar.sendPacket(SendTradeDone.Fail, Msg.ActionFail, new SystemMessage("Something wrong. Maybe, cheater?"));
        requestor.sendPacket(SendTradeDone.Fail, Msg.ActionFail, new SystemMessage("Something wrong. Maybe, cheater?"));
        return;
      }
      if(_response == 1)
View Full Code Here

          return;
        }
        //Can't exchange on a big distance
        if(!activeChar.isInRange(requestor, 1000))
        {
          transaction.cancel();
          activeChar.sendPacket(SendTradeDone.Fail, new SystemMessage(SystemMessage.C1_HAS_CANCELLED_THE_TRADE).addString(requestor.getName()));
          requestor.sendPacket(SendTradeDone.Fail, new SystemMessage(SystemMessage.C1_HAS_CANCELLED_THE_TRADE).addString(activeChar.getName()));
          return;
        }
        boolean trade1Valid = L2TradeList.validateTrade(activeChar, transaction.getExchangeList(activeChar));
View Full Code Here

      else
      {
        activeChar.sendPacket(SendTradeDone.Fail);
        requestor.sendPacket(SendTradeDone.Fail, new SystemMessage(SystemMessage.C1_HAS_CANCELLED_THE_TRADE).addString(activeChar.getName()));
      }
      transaction.cancel();
    }
  }
}
View Full Code Here

    {
      return;
    }
    if(!transaction.isValid() || !transaction.isTypeOf(TransactionType.TRADE_REQUEST))
    {
      transaction.cancel();
      if(_response == 1)
      {
        activeChar.sendPacket(Msg.THAT_PLAYER_IS_NOT_ONLINE, Msg.ActionFail);
      }
      else
View Full Code Here

    }
    L2Player requestor = transaction.getOtherPlayer(activeChar);
    if(_response != 1 || activeChar.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE)
    {
      requestor.sendPacket(new SystemMessage(SystemMessage.C1_HAS_DENIED_YOUR_REQUEST_TO_TRADE).addString(activeChar.getName()), Msg.ActionFail);
      transaction.cancel();
      if(activeChar.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE)
      {
        activeChar.sendPacket(Msg.WHILE_OPERATING_A_PRIVATE_STORE_OR_WORKSHOP_YOU_CANNOT_DISCARD_DESTROY_OR_TRADE_AN_ITEM);
      }
      return;
View Full Code Here

      {
        activeChar.sendPacket(Msg.WHILE_OPERATING_A_PRIVATE_STORE_OR_WORKSHOP_YOU_CANNOT_DISCARD_DESTROY_OR_TRADE_AN_ITEM);
      }
      return;
    }
    transaction.cancel();
    new Transaction(TransactionType.TRADE, activeChar, requestor);
    requestor.sendPacket(new SystemMessage(SystemMessage.YOU_BEGIN_TRADING_WITH_C1).addString(activeChar.getName()), new TradeStart(requestor, activeChar));
    activeChar.sendPacket(new SystemMessage(SystemMessage.YOU_BEGIN_TRADING_WITH_C1).addString(requestor.getName()), new TradeStart(activeChar, requestor));
  }
}
View Full Code Here

    {
      return;
    }
    if(!transaction.isValid() || !transaction.isTypeOf(TransactionType.TRADE))
    {
      transaction.cancel();
      activeChar.sendPacket(Msg.TIME_EXPIRED, Msg.ActionFail);
      return;
    }
    L2Player requestor = transaction.getOtherPlayer(activeChar);
    if(transaction.isConfirmed(activeChar) || transaction.isConfirmed(requestor))
View Full Code Here

    {
      return;
    }
    if(!transaction.isValid() || !transaction.isTypeOf(TransactionType.PARTY_ROOM))
    {
      transaction.cancel();
      activeChar.sendPacket(Msg.TIME_EXPIRED, Msg.ActionFail);
      return;
    }
    L2Player requestor = transaction.getOtherPlayer(activeChar);
    transaction.cancel();
View Full Code Here

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.