Package l2p.gameserver.model

Examples of l2p.gameserver.model.PartyRoom


        if(activeChar.getPartyRoom() <= 0)
        {
          activeChar.sendActionFailed();
          return;
        }
        PartyRoom room = PartyRoomManager.getInstance().getRooms().get(activeChar.getPartyRoom());
        if(room == null)
        {
          activeChar.sendActionFailed();
          return;
        }
        room.broadcastPacket(cs);
        break;
      case COMMANDCHANNEL_ALL:
        if(!activeChar.isInParty() || !activeChar.getParty().isInCommandChannel())
        {
          activeChar.sendPacket(Msg.YOU_DO_NOT_HAVE_AUTHORITY_TO_USE_THE_COMMAND_CHANNEL);
View Full Code Here


    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    PartyRoom room = null;
    if(activeChar.getPartyRoom() == 0)
    {
      room = PartyRoomManager.getInstance().addRoom(_minLevel, _maxLevel, _maxMembers, _lootDist, _roomTitle, activeChar);
    }
    else if(activeChar.getPartyRoom() == _roomId)
View Full Code Here

    L2Player member = L2ObjectsStorage.getPlayer(_id);
    if(activeChar == null || member == null)
    {
      return;
    }
    PartyRoom room = PartyRoomManager.getInstance().getRoom(member.getPartyRoom());
    if(room != null)
    {
      room.removeMember(member, true);
    }
  }
View Full Code Here

    return res;
  }

  public PartyRoom addRoom(int minLevel, int maxLevel, int maxMembers, int lootDist, String title, L2Player leader)
  {
    PartyRoom room = new PartyRoom(_lastId, minLevel, maxLevel, maxMembers, lootDist, title, leader);
    _rooms.put(_lastId, room);
    removeFromWaitingList(leader);
    _lastId++;
    return room;
  }
View Full Code Here

    return room;
  }

  public PartyRoom changeRoom(Integer id, int minLevel, int maxLevel, int maxMembers, int lootDist, String title)
  {
    PartyRoom room = _rooms.get(id);
    room.setMinLevel(minLevel);
    room.setMaxLevel(maxLevel);
    room.setMaxMembers(maxMembers);
    room.setLootDist(lootDist);
    room.setTitle(title);
    return room;
  }
View Full Code Here

    return _rooms.get(id);
  }

  public void removeRoom(Integer id)
  {
    PartyRoom room = _rooms.get(id);
    _rooms.remove(id);
    L2Player member;
    for(Long storedId : room.getMembers())
    {
      if((member = L2ObjectsStorage.getAsPlayer(storedId)) != null)
      {
        member.sendPacket(new ExClosePartyRoom(), new PartyMatchDetail(member));
        member.setPartyRoom(0);
View Full Code Here

    return res;
  }

  public boolean isLeader(L2Player player)
  {
    PartyRoom room = _rooms.get(player.getPartyRoom());
    if(room == null || room.getLeader() == null)
    {
      return false;
    }
    return room.getLeader().equals(player);
  }
View Full Code Here

    return room.getLeader().equals(player);
  }

  public void joinPartyRoom(L2Player player, Integer roomId)
  {
    PartyRoom room = _rooms.get(roomId);
    if(room == null)
    {
      player.sendPacket(Msg.YOU_ARE_NOT_ALLOWED_TO_ENTER_THE_PARTY_ROOM);
      return;
    }
    if(player.getLevel() < room.getMinLevel() || player.getLevel() > room.getMaxLevel())
    {
      player.sendPacket(Msg.SINCE_YOU_DO_NOT_MEET_THE_REQUIREMENTS_YOU_ARE_NOT_ALLOWED_TO_ENTER_THE_PARTY_ROOM);
      return;
    }
    if(room.getMembersSize() >= room.getMaxMembers())
    {
      player.sendPacket(Msg.PARTY_IS_FULL);
      return;
    }
    room.addMember(player);
  }
View Full Code Here

    {
      return;
    }
    //_log.info("RequestWithdrawPartyRoom from char: " + activeChar.getName());
    //_log.info("Data received: d:" + _roomId + " d:" + _data2);
    PartyRoom room = PartyRoomManager.getInstance().getRoom(_roomId);
    if(room.getLeader() == null || room.getLeader().equals(activeChar))
    {
      PartyRoomManager.getInstance().removeRoom(_roomId);
    }
    else
    {
View Full Code Here

    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    PartyRoom room = PartyRoomManager.getInstance().getRoom(_roomId);
    if(room.getLeader() == null || room.getLeader().equals(activeChar))
    {
      PartyRoomManager.getInstance().removeRoom(_roomId);
    }
    else
    {
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.PartyRoom

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.