Example #1
0
  /**
   * Method removeParty.
   *
   * @param party Party
   */
  public void removeParty(Party party) {
    _commandChannelParties.remove(party);
    refreshLevel();
    party.setCommandChannel(null);
    party.broadCast(ExMPCCClose.STATIC);
    Reflection reflection = getReflection();

    if (reflection != null) {
      for (Player player : party.getPartyMembers()) {
        player.teleToLocation(reflection.getReturnLoc(), 0);
      }
    }

    if (_commandChannelParties.size() < 2) {
      disbandChannel();
    } else {
      for (Player $member : party) {
        $member.sendPacket(new ExMPCCPartyInfoUpdate(party, 0));

        if (_matchingRoom != null) {
          _matchingRoom.broadcastPlayerUpdate($member);
        }
      }
    }
  }
Example #2
0
  /** Method disbandChannel. */
  public void disbandChannel() {
    broadCast(new SystemMessage(SystemMessage.THE_COMMAND_CHANNEL_HAS_BEEN_DISBANDED));

    for (Party party : _commandChannelParties) {
      party.setCommandChannel(null);
      party.broadCast(ExMPCCClose.STATIC);

      if (isInReflection()) {
        party.broadCast(
            new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(1));
      }
    }

    Reflection reflection = getReflection();

    if (reflection != null) {
      reflection.startCollapseTimer(60000L);
      setReflection(null);
    }

    if (_matchingRoom != null) {
      _matchingRoom.disband();
    }

    _commandChannelParties.clear();
    _commandChannelLeader = null;
  }
Example #3
0
  /**
   * Method addParty.
   *
   * @param party Party
   */
  public void addParty(Party party) {
    broadCast(new ExMPCCPartyInfoUpdate(party, 1));
    _commandChannelParties.add(party);
    refreshLevel();
    party.setCommandChannel(this);

    for (Player $member : party) {
      $member.sendPacket(ExMPCCOpen.STATIC);

      if (_matchingRoom != null) {
        _matchingRoom.broadcastPlayerUpdate($member);
      }
    }
  }