Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.ActionFailed


            _log.warning("possible client hacker: " + player.getName()
                + " attempting to buy from GM shop! < Ban him!");
            _log.warning("buylist id:" + val);
        }

        player.sendPacket(new ActionFailed());
    }
View Full Code Here


        player.sendPacket(new SellList(player));

        if (Config.DEBUG) _log.fine("Showing sell window");

        player.sendPacket(new ActionFailed());
    }
View Full Code Here

            html1.append("</body></html>");

            html.setHtml(html1.toString());
            player.sendPacket(html);
        }
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

    if (storeList == null) return;

        if (Config.GM_DISABLE_TRANSACTION && player.getAccessLevel() >= Config.GM_TRANSACTION_MIN && player.getAccessLevel() <= Config.GM_TRANSACTION_MAX)
        {
          player.sendMessage("Transactions are disable for your Access Level");
            sendPacket(new ActionFailed());
            return;
        }

        // FIXME: this check should be (and most probabliy is) done in the TradeList mechanics
    long priceTotal = 0;
        for(ItemRequest ir : _items)
        {
      if (ir.getCount() > Integer.MAX_VALUE || ir.getCount() < 0)
      {
              String msgErr = "[RequestPrivateStoreBuy] player "+getClient().getActiveChar().getName()+" tried an overflow exploit, ban this player!";
              Util.handleIllegalPlayerAction(getClient().getActiveChar(),msgErr,Config.DEFAULT_PUNISH);
          return;
      }
      TradeItem sellersItem = storeList.getItem(ir.getObjectId());
      if(sellersItem == null)
      {
              String msgErr = "[RequestPrivateStoreBuy] player "+getClient().getActiveChar().getName()+" tried to buy an item not sold in a private store (buy), ban this player!";
              Util.handleIllegalPlayerAction(getClient().getActiveChar(),msgErr,Config.DEFAULT_PUNISH);
          return;
      }
      if(ir.getPrice() != sellersItem.getPrice())
      {
              String msgErr = "[RequestPrivateStoreBuy] player "+getClient().getActiveChar().getName()+" tried to change the seller's price in a private store (buy), ban this player!";
              Util.handleIllegalPlayerAction(getClient().getActiveChar(),msgErr,Config.DEFAULT_PUNISH);
          return;
      }
      priceTotal += ir.getPrice() * ir.getCount();
        }

        // FIXME: this check should be (and most probabliy is) done in the TradeList mechanics
    if(priceTotal < 0 || priceTotal > Integer.MAX_VALUE)
        {
            String msgErr = "[RequestPrivateStoreBuy] player "+getClient().getActiveChar().getName()+" tried an overflow exploit, ban this player!";
            Util.handleIllegalPlayerAction(getClient().getActiveChar(),msgErr,Config.DEFAULT_PUNISH);
            return;
        }

        if (player.getAdena() < priceTotal)
    {
      sendPacket(new SystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA));
      sendPacket(new ActionFailed());
      return;
    }

        if (storePlayer.getPrivateStoreType() == L2PcInstance.STORE_PRIVATE_PACKAGE_SELL)
        {
          if (storeList.getItemCount() > _count)
          {
            String msgErr = "[RequestPrivateStoreBuy] player "+getClient().getActiveChar().getName()+" tried to buy less items then sold by package-sell, ban this player for bot-usage!";
            Util.handleIllegalPlayerAction(getClient().getActiveChar(),msgErr,Config.DEFAULT_PUNISH);
            return;
          }
        }

        if (!storeList.PrivateStoreBuy(player, _items, (int) priceTotal))
        {
            sendPacket(new ActionFailed());
            _log.warning("PrivateStore buy has failed due to invalid list or request. Player: " + player.getName() + ", Private store of: " + storePlayer.getName());
            return;
        }

    if (storeList.getItemCount() == 0)
View Full Code Here

    else
    {
            player.sendPacket(asl);
    }

    player.sendPacket(new ActionFailed());
  }
View Full Code Here

        else
        {
            player.sendPacket(esl);
        }

        player.sendPacket(new ActionFailed());
    }
View Full Code Here

          text +=
            "</body></html>";

          insertObjectIdAndShowChatWindow(player, text);
          player.sendPacket( new ActionFailed() );
        }
      }
            else
            {
        player.setSkillLearningClassId(player.getClassId());
View Full Code Here

        L2Object target = _activeChar.getTarget();

        if(!(target instanceof L2NpcInstance))
        {
            _activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
            _activeChar.sendPacket(new ActionFailed());
            return;
        }

        if ( !(target instanceof L2MonsterInstance||
            (target instanceof L2ChestInstance||
            (target instanceof L2BossInstance)   ||
            (target instanceof L2RaidBossInstance)) {
          _activeChar.sendPacket(new SystemMessage(SystemMessageId.THE_TARGET_IS_UNAVAILABLE_FOR_SEEDING));
          _activeChar.sendPacket(new ActionFailed());
          return;
        }

        _target = (L2MonsterInstance) target;

        if(_target == null || _target.isDead()) {
          _activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
          _activeChar.sendPacket(new ActionFailed());
            return;
        }

        if(_target.isSeeded()) {
          _activeChar.sendPacket(new ActionFailed());
          return;
        }

        _seedId = item.getItemId();
View Full Code Here

    L2Object target = activeChar.getTarget();

    if (!(target instanceof L2ChestInstance))
    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
      activeChar.sendPacket(new ActionFailed());
    }
    else
    {
      L2ChestInstance chest = (L2ChestInstance) target;
      if (chest.isDead() || chest.isInteracted())
      {
        activeChar.sendMessage("The chest Is empty.");
        activeChar.sendPacket(new ActionFailed());
        return;
      }
      activeChar.useMagic(skill,false,false);
    }
  }
View Full Code Here

    if (storeList == null) return;

        if (Config.GM_DISABLE_TRANSACTION && player.getAccessLevel() >= Config.GM_TRANSACTION_MIN && player.getAccessLevel() <= Config.GM_TRANSACTION_MAX)
        {
          player.sendMessage("Transactions are disable for your Access Level");
            sendPacket(new ActionFailed());
            return;
        }

        if (storePlayer.getAdena() < _price)
    {
      sendPacket(new ActionFailed());
          storePlayer.sendMessage("You have not enough adena, canceling PrivateBuy.");
      storePlayer.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE);
      storePlayer.broadcastUserInfo();
      return;
    }

        if (!storeList.PrivateStoreSell(player, _items, _price))
        {
            sendPacket(new ActionFailed());
            _log.warning("PrivateStore sell has failed due to invalid list or request. Player: " + player.getName() + ", Private store of: " + storePlayer.getName());
            return;
        }

        if (storeList.getItemCount() == 0)
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.ActionFailed

Copyright © 2018 www.massapicom. 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.