Esempio n. 1
0
 @Override
 public final void teleportPlayer(L2PcInstance player, Location loc, int instanceId) {
   giveBuffs(player);
   final L2Summon pet = player.getPet();
   if (pet != null) {
     giveBuffs(pet);
   }
   player
       .getServitors()
       .values()
       .forEach(
           s -> {
             giveBuffs(s);
           });
   super.teleportPlayer(player, loc, instanceId);
 }
Esempio n. 2
0
  @Override
  public L2Object[] getTargetList(
      Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target) {
    final List<L2Character> targetList = new ArrayList<>();
    final int radius = skill.getAffectRange();
    if (activeChar.getParty() != null) {
      final List<L2PcInstance> partyList = activeChar.getParty().getMembers();
      for (L2PcInstance partyMember : partyList) {
        if (partyMember == activeChar) {
          continue;
        } else if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE, activeChar, partyMember, true)) {
          continue;
        } else {
          if (Skill.addPet(activeChar, partyMember, radius, false)) {
            targetList.add(partyMember.getPet());
          }

          partyMember
              .getServitors()
              .values()
              .forEach(
                  s -> {
                    if (Skill.addCharacter(activeChar, s, radius, false)) {
                      targetList.add(s);
                    }
                  });

          if (Skill.addCharacter(activeChar, partyMember, radius, false)) {
            targetList.add(partyMember);
          }

          targetList.add(partyMember);
        }
      }
    }
    return targetList.toArray(new L2Character[targetList.size()]);
  }