Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Party


      L2Player pc = killer.getPlayer();
      if(pc == null)
      {
        return;
      }
      L2Party party = pc.getParty();
      if(party != null)
      {
        for(L2Player partyMember : party.getPartyMembers())
        {
          if(partyMember != null && pc.isInRange(partyMember, 5000) && partyMember.getInventory().getItemByItemId(VALAKAS_CIRCLET) == null)
          {
            partyMember.getInventory().addItem(VALAKAS_CIRCLET, 1);
          }
View Full Code Here


  {
    if(id != COMMAND_IDS[0])
    {
      return false;
    }
    L2Party playerParty = activeChar.getParty();
    if(!activeChar.isInParty())
    {
      return false;
    }
    L2Player partyLeader = playerParty.getPartyLeader();
    if(partyLeader == null)
    {
      return false;
    }
    int memberCount = playerParty.getMemberCount();
    int lootDistribution = playerParty.getLootDistribution();
    activeChar.sendPacket(Msg._PARTY_INFORMATION_);
    switch(lootDistribution)
    {
      case L2Party.ITEM_LOOTER:
        activeChar.sendPacket(Msg.LOOTING_METHOD_FINDERS_KEEPERS);
View Full Code Here

          }
          // Закрываем СС, если в СС 1 партия и лидер нажал Quit
          channel.disbandChannel();
          return true;
        }
        L2Party party = activeChar.getParty();
        channel.removeParty(party);
        party.broadcastToPartyMembers(Msg.YOU_HAVE_QUIT_THE_COMMAND_CHANNEL);
        channel.broadcastToChannelMembers(new SystemMessage(SystemMessage.S1_PARTY_HAS_LEFT_THE_COMMAND_CHANNEL).addString(activeChar.getName()));
        break;
      case 97: //channelinfo
        if(!activeChar.isInParty() || !activeChar.getParty().isInCommandChannel())
        {
View Full Code Here

    if(args.length != 1)
    {
      return;
    }
    Location loc = teleports[Integer.parseInt(args[0]) - 1];
    L2Party party = player.getParty();
    if(party == null)
    {
      player.teleToLocation(loc);
    }
    else
    {
      for(L2Player member : party.getPartyMembers())
      {
        if(member != null && member.isInRange(player, 1000))
        {
          member.teleToLocation(loc);
        }
View Full Code Here

      L2Player pc = killer.getPlayer();
      if(pc == null)
      {
        return;
      }
      L2Party party = pc.getParty();
      if(party != null)
      {
        for(L2Player partyMember : party.getPartyMembers())
        {
          if(partyMember != null && pc.isInRange(partyMember, 5000) && partyMember.getInventory().getItemByItemId(ANTHARAS_CIRCLET) == null)
          {
            partyMember.getInventory().addItem(ANTHARAS_CIRCLET, 1);
          }
View Full Code Here

      RewardInfo reward = e.getValue();
      if(attacker == null || attacker.isDead() || reward == null)
      {
        continue;
      }
      L2Party party = attacker.getParty();
      int maxHp = getMaxHp();
      if(party == null)
      {
        int damage = Math.min(reward._dmg, maxHp);
        if(damage > 0)
        {
          double[] xpsp = calculateExpAndSp(attacker, attacker.getLevel(), damage);
          double neededExp = attacker.calcStat(Stats.SOULS_CONSUME_EXP, 0, this, null); // Начисление душ камаэлянам
          if(neededExp > 0 && xpsp[0] > neededExp)
          {
            broadcastPacket(new SpawnEmitter(this, attacker));
            ThreadPoolManager.getInstance().scheduleGeneral(new SoulConsumeTask(attacker), 1000);
          }
          xpsp[0] = applyOverhit(killer, xpsp[0]);
          xpsp = attacker.applyVitality(this, xpsp[0], xpsp[1], 1.0);
          attacker.addExpAndSp((long) xpsp[0], (long) xpsp[1], false, true);
        }
        rewards.remove(attacker);
      }
      else
      {
        int partyDmg = 0;
        int partylevel = 1;
        GArray<L2Player> rewardedMembers = new GArray<L2Player>();
        for(L2Player partyMember : party.getPartyMembers())
        {
          RewardInfo ai = rewards.remove(partyMember);
          if(partyMember.isDead() || !partyMember.isInRange(lastAttacker, Config.ALT_PARTY_DISTRIBUTION_RANGE))
          {
            continue;
          }
          if(ai != null)
          {
            partyDmg += ai._dmg;
          }
          rewardedMembers.add(partyMember);
          if(partyMember.getLevel() > partylevel)
          {
            partylevel = partyMember.getLevel();
          }
        }
        partyDmg = Math.min(partyDmg, maxHp);
        if(partyDmg > 0)
        {
          double[] xpsp = calculateExpAndSp(attacker, partylevel, partyDmg);
          double partyMul = (double) partyDmg / maxHp;
          xpsp[0] *= partyMul;
          xpsp[1] *= partyMul;
          xpsp[0] = applyOverhit(killer, xpsp[0]);
          party.distributeXpAndSp(xpsp[0], xpsp[1], rewardedMembers, lastAttacker, this);
        }
      }
    }
    // Check the drop of a cursed weapon
    CursedWeaponsManager.getInstance().dropAttackable(this, killer);
View Full Code Here

    if(player == null)
    {
      return;
    }
    int count = 1;
    L2Party party = player.getParty();
    if(party != null)
    {
      count = party.getMemberCount();
    }
    // Снимаем неуязвимость
    if(_scale_count >= count)
    {
      _scale_count = 0;
View Full Code Here

    {
      return;
    }
    if(_penaltyMobsNotSpawned && attacker.isPlayable() && attacker.getPlayer() != null)
    {
      L2Party party = attacker.getPlayer().getParty();
      if(party != null && party.getMemberCount() > 2)
      {
        _penaltyMobsNotSpawned = false;
        for(int i = 0; i < 2; i++)
        {
          L2MonsterInstance npc = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(PENALTY_MOBS[Rnd.get(PENALTY_MOBS.length)]));
View Full Code Here

    _InvadeTask = ThreadPoolManager.getInstance().scheduleGeneral(new Invade(), 10000);
  }

  private static void doInvade()
  {
    L2Party party = _commander.getParty();
    if(party == null)
    {
      _commander = null;
      return;
    }
    L2CommandChannel channel = party.getCommandChannel();
    if(channel == null)
    {
      _commander = null;
      return;
    }
View Full Code Here

  }

  public GArray<L2Player> getPartyMembers(int state, int maxrange, L2Object rangefrom)
  {
    GArray<L2Player> result = new GArray<L2Player>();
    L2Party party = getPlayer().getParty();
    if(party == null)
    {
      if(checkPartyMember(getPlayer(), state, maxrange, rangefrom))
      {
        result.add(getPlayer());
      }
      return result;
    }
    for(L2Player _member : party.getPartyMembers())
    {
      if(checkPartyMember(_member, state, maxrange, rangefrom))
      {
        result.add(getPlayer());
      }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2Party

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.