コード例 #1
0
ファイル: L2PartyRoom.java プロジェクト: rean1m5/lucera2
 public void addMembers(L2Party party) {
   for (L2PcInstance player : party.getPartyMembersWithoutLeader()) {
     getMembers().add(player);
     player.setPartyRoom(this);
   }
   updateRoomStatus(true);
 }
コード例 #2
0
ファイル: L2PartyRoom.java プロジェクト: rean1m5/lucera2
  public void addMember(L2PcInstance player) {
    if (getMembers().contains(player)) return;

    PartyRoomManager.getInstance().removeFromWaitingList(player);
    broadcastPacket(new ExManagePartyRoomMember(ExManagePartyRoomMember.ADDED, player));
    broadcastPacket(new SystemMessage(SystemMessageId.S1_ENTERED_PARTY_ROOM).addPcName(player));
    updateRoomStatus(false);
    getMembers().add(player);
    player.setPartyRoom(this);
    player.sendPacket(new PartyMatchDetail(this));
    player.sendPacket(new ExPartyRoomMember(this, getMemberCount() == 1));
  }
コード例 #3
0
ファイル: L2PartyRoom.java プロジェクト: rean1m5/lucera2
  public void removeMember(L2PcInstance member, boolean oust) {
    // the last member (leader) cannot be removed
    if (getMemberCount() == 1 || !getMembers().remove(member)) return;

    member.setPartyRoom(null);
    member.sendPacket(ExClosePartyRoom.STATIC_PACKET);
    if (oust) member.sendPacket(SystemMessageId.OUSTED_FROM_PARTY_ROOM);
    else member.sendPacket(SystemMessageId.PARTY_ROOM_EXITED);

    SystemMessage sm;
    if (oust) sm = new SystemMessage(SystemMessageId.S1_KICKED_FROM_PARTY_ROOM);
    else sm = new SystemMessage(SystemMessageId.S1_LEFT_PARTY_ROOM);
    sm.addPcName(member);
    broadcastPacket(new ExManagePartyRoomMember(ExManagePartyRoomMember.REMOVED, member));
    broadcastPacket(sm);
    updateRoomStatus(false);
  }