Package net.sf.l2j.gameserver.serverpackets

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


            UserInfo info2 = new UserInfo((L2PcInstance)player);
            player.sendPacket(info2);
          }
          else if(player instanceof L2NpcInstance)
          {
            NpcInfo info1 = new NpcInfo((L2NpcInstance)player, null);
            player.broadcastPacket(info1);
          }
          activeChar.sendMessage("Changed name from "+ oldName +" to "+ name +".");
        }
        catch (Exception e){}
View Full Code Here


                getActiveChar().sendPacket(new StaticObject((L2StaticObjectInstance) object));
            }
            else if (object instanceof L2NpcInstance)
            {
                if (Config.CHECK_KNOWN) getActiveChar().sendMessage("Added NPC: "+((L2NpcInstance) object).getName());
                getActiveChar().sendPacket(new NpcInfo((L2NpcInstance) object, getActiveChar()));
            }
            else if (object instanceof L2Summon)
            {
                L2Summon summon = (L2Summon) object;

                // Check if the L2PcInstance is the owner of the Pet
                if (getActiveChar().equals(summon.getOwner()))
                {
                    getActiveChar().sendPacket(new PetInfo(summon));
                    // The PetInfo packet wipes the PartySpelled (list of active  spells' icons).  Re-add them
                    summon.updateEffectIcons(true);
                    if (summon instanceof L2PetInstance)
                    {
                        getActiveChar().sendPacket(new PetItemList((L2PetInstance) summon));
                    }
                }
                else
                    getActiveChar().sendPacket(new NpcInfo(summon, getActiveChar()));
            }
            else if (object instanceof L2PcInstance)
            {
                L2PcInstance otherPlayer = (L2PcInstance) object;
                if(otherPlayer.isInBoat())
View Full Code Here

          activeChar.sendPacket(new SystemMessage(SystemMessageId.NAMING_PETNAME_CONTAINS_INVALID_CHARS));
      return;
    }

    pet.setName(_name);
    pet.broadcastPacket(new NpcInfo(pet, activeChar));
    activeChar.sendPacket(new PetInfo(pet));
    // The PetInfo packet wipes the PartySpelled (list of active spells' icons).  Re-add them
    pet.updateEffectIcons(true);

    // set the flag on the control item to say that the pet has a name
View Full Code Here

  @Override
  public void updateAbnormalEffect()
    {
    for (L2PcInstance player : getKnownList().getKnownPlayers().values())
      player.sendPacket(new NpcInfo(this, player));
    }
View Full Code Here

        //broadcastPacket(info);

        // Send a Server->Client packet NpcInfo with state of abnormal effect to all L2PcInstance in the _KnownPlayers of the L2NpcInstance
        for (L2PcInstance player : getKnownList().getKnownPlayers().values())
            if (player != null)
                player.sendPacket(new NpcInfo(this, player));
    }
View Full Code Here

      {
        for (L2PcInstance player : getKnownList().getKnownPlayers().values())
        {
          if (player != null)
          {
            player.sendPacket(new NpcInfo((L2NpcInstance) this, player));
          }
        }
      }
      else if (su != null)
      {
        broadcastPacket(su);
      }
    }
    else if (this instanceof L2Summon)
    {
      if (broadcastFull)
      {
        for (L2PcInstance player : getKnownList().getKnownPlayers().values())
        {
          if (player != null)
          {
            player.sendPacket(new NpcInfo((L2Summon) this, player));
          }
        }
      }
      else if (su != null)
      {
View Full Code Here

          }
         
          if ((this instanceof L2PcInstance) && (target instanceof L2Summon))
          {
            ((L2Summon) target).getOwner().sendPacket(new PetInfo((L2Summon) target));
            sendPacket(new NpcInfo((L2Summon) target, this));
           
            // The PetInfo packet wipes the PartySpelled (list of active spells' icons). Re-add them
            ((L2Summon) target).updateEffectIcons(true);
          }
        }
View Full Code Here

          }
        }
        else if (object instanceof L2StaticObjectInstance)
          _activeChar.sendPacket(new StaticObject((L2StaticObjectInstance) object));
        else if (object instanceof L2NpcInstance)
          _activeChar.sendPacket(new NpcInfo((L2NpcInstance) object, _activeChar));
        else if (object instanceof L2Summon)
        {
          L2Summon summon = (L2Summon) object;

          // Check if the L2PcInstance is the owner of the Pet
          if (_activeChar.equals(summon.getOwner()))
          {
            _activeChar.sendPacket(new PetInfo(summon));

            if (summon instanceof L2PetInstance)
              _activeChar.sendPacket(new PetItemList((L2PetInstance) summon));
          }
          else
            _activeChar.sendPacket(new NpcInfo(summon, _activeChar));

          // The PetInfo packet wipes the PartySpelled (list of active spells' icons).  Re-add them
          summon.updateEffectIcons(true);
        }
               else if (object instanceof L2PcInstance)
View Full Code Here

      if (owner != null)
      {
          _owner = owner;
        setTitle(owner.getName());
        // broadcast the new title
        broadcastPacket( new NpcInfo(this, owner) );

        owner.setTrainedBeast(this);

        // always and automatically follow the owner.
        getAI().startFollow(_owner,100);
View Full Code Here

TOP

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

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.