Examples of ActionFailed


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

    if (player == null) return;

        // Player shouldn't be able to set stores if he/she is alike dead (dead or fake death)
        if (player.isAlikeDead())
        {
            sendPacket(new ActionFailed());
            return;
        }

        if (player.isInOlympiadMode())
        {
            sendPacket(new ActionFailed());
            return;
        }
        if (player.getMountType() != 0)
        {
          return;
View Full Code Here

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

    protected boolean canTarget(L2PcInstance player)
    {
        if (player.isOutOfControl())
        {
            player.sendPacket(new ActionFailed());
            return false;
        }
        // TODO: More checks...

        return true;
View Full Code Here

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

                    // player.startAttack(this);
                }
                else
                {
                    // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
                    player.sendPacket(new ActionFailed());
                }
            }
            else if(!isAutoAttackable(player))
            {
                // Calculate the distance between the L2PcInstance and the L2NpcInstance
                if (!canInteract(player))
                {
                    // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
                    player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
                }
                else
                {
                    // Send a Server->Client packet SocialAction to the all L2PcInstance on the _knownPlayer of the L2NpcInstance
                    // to display a social action of the L2NpcInstance on their client
                    SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8));
                    broadcastPacket(sa);

                    // Open a chat window on client with the text of the L2NpcInstance
                    if(isEventMob){ L2Event.showEventHtml(player, String.valueOf(getObjectId())); }
                    else
                    {
                        Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.NPC_FIRST_TALK);
                        if ( (qlst != null) && qlst.length == 1)
                            qlst[0].notifyFirstTalk(this, player);
                        else
                            showChatWindow(player, 0);
                    }
                }
            }
            else
                player.sendPacket(new ActionFailed());
        }
    }
View Full Code Here

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

            html.setHtml(html1.toString());
            player.sendPacket(html);
        }

        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

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

    {
        //if (canInteract(player))
        {
            if (isBusy() && getBusyMessage().length()>0)
            {
                player.sendPacket( new ActionFailed() );

                NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
                html.setFile("data/html/npcbusy.htm");
                html.replace("%busymessage%", getBusyMessage());
                html.replace("%npcname%", getName());
View Full Code Here

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

        // Send a Server->Client packet NpcHtmlMessage to the L2PcInstance in order to display the message of the L2NpcInstance
        if (content != null)
            insertObjectIdAndShowChatWindow(player, content);
       
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket( new ActionFailed() );
    }
View Full Code Here

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

              continue;

          _target = (L2MonsterInstance) targetList[0];

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

          if ( _target.isDead()) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          if (_target.getSeeder() != _activeChar) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          _seedId = _target.getSeedType();
          if (_seedId == 0) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          L2ItemInstance item = _activeChar.getInventory().getItemByItemId(_seedId);
          //Consuming used seed
View Full Code Here

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

        html.replace("%prize2%", "" + Config.ALT_LOTTERY_2_AND_1_NUMBER_PRIZE);
        html.replace("%enddate%", "" + DateFormat.getDateInstance().format(Lottery.getInstance().getEndDate()));
        player.sendPacket(html);
            
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

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

      if (html != null)
      {
        NpcHtmlMessage pkDenyMsg = new NpcHtmlMessage(getObjectId());
        pkDenyMsg.setHtml(html);
        player.sendPacket(pkDenyMsg);
        player.sendPacket(new ActionFailed());
        return true;
      }

      return false;
    }
View Full Code Here

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

        html.replace("%objectId%", String.valueOf(getObjectId()));
        html.replace("%festivalMins%", SevenSignsFestival.getInstance().getTimeToNextFestivalStr());       
        player.sendPacket(html);
       
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket( new ActionFailed() );
    }
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.