Package net.sf.l2j.gameserver.model

Examples of net.sf.l2j.gameserver.model.L2Character.sendPacket()


      activeChar.sendPacket(new SystemMessage(SystemMessageId.NAMING_YOU_CANNOT_SET_NAME_OF_THE_PET));
      return;
    }
    else if (PetNameTable.getInstance().doesPetNameExist(_name, pet.getTemplate().npcId))
    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.NAMING_ALREADY_IN_USE_BY_ANOTHER_PET));
      return;
    }
        else if ((_name.length() < 3) || (_name.length() > 16))
    {
            SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
View Full Code Here


        else if ((_name.length() < 3) || (_name.length() > 16))
    {
            SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
            sm.addString("Your pet's name can be up to 16 characters.");
      // SystemMessage sm = new SystemMessage(SystemMessage.NAMING_PETNAME_UP_TO_8CHARS);
          activeChar.sendPacket(sm);
          sm = null;

      return;
    }
        else if (!PetNameTable.getInstance().isValidPetName(_name))
View Full Code Here

      return;
    }
        else if (!PetNameTable.getInstance().isValidPetName(_name))
    {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.NAMING_PETNAME_CONTAINS_INVALID_CHARS));
      return;
    }

    pet.setName(_name);
    pet.broadcastPacket(new NpcInfo(pet, activeChar));
View Full Code Here

      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
    if (pet instanceof L2PetInstance)
View Full Code Here

      {
        controlItem.setCustomType2(1);
        controlItem.updateDatabase();
        InventoryUpdate iu = new InventoryUpdate();
        iu.addModifiedItem(controlItem);
        activeChar.sendPacket(iu);
      }
    }
  }

  @Override
View Full Code Here

    List<Integer> list = new FastList<Integer>();
    for (int id : CursedWeaponsManager.getInstance().getCursedWeaponsIds())
    {
      list.add(id);
    }
    activeChar.sendPacket(new ExCursedWeaponList(list));
  }
 
  @Override
  public String getType()
  {
View Full Code Here

      target.setCurrentHp(hp + target.getCurrentHp());
      target.setLastHealAmount((int)hp);
      StatusUpdate su = new StatusUpdate(target.getObjectId());
      su.addAttribute(StatusUpdate.CUR_HP, (int)target.getCurrentHp());
      target.sendPacket(su);

      if (target instanceof L2PcInstance)
      {
                if (skill.getId() == 4051)
                {
View Full Code Here

      if (target instanceof L2PcInstance)
      {
                if (skill.getId() == 4051)
                {
                    SystemMessage sm = new SystemMessage(SystemMessageId.REJUVENATING_HP);
                    target.sendPacket(sm);
                }
                else
                {
                    if (activeChar instanceof L2PcInstance && activeChar != target)
                    {
View Full Code Here

                    if (activeChar instanceof L2PcInstance && activeChar != target)
                    {
                        SystemMessage sm = new SystemMessage(SystemMessageId.S2_HP_RESTORED_BY_S1);
                        sm.addString(activeChar.getName());
                        sm.addNumber((int)hp);
                        target.sendPacket(sm);
                    }
                    else
                    {
                        SystemMessage sm = new SystemMessage(SystemMessageId.S1_HP_RESTORED);
                        sm.addNumber((int)hp);
View Full Code Here

                    }
                    else
                    {
                        SystemMessage sm = new SystemMessage(SystemMessageId.S1_HP_RESTORED);
                        sm.addNumber((int)hp);
                        target.sendPacket(sm);
                    }
                }
      }
    }
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.