Package lineage2.gameserver.model.matching

Examples of lineage2.gameserver.model.matching.MatchingRoom


    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room.getId() != _roomId) || (room.getType() != MatchingRoom.PARTY_MATCHING))
    {
      return;
    }
    if (room.getLeader() == player)
    {
      return;
    }
    room.removeMember(player, false);
  }
View Full Code Here


    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room.getId() != _roomId) || (room.getType() != MatchingRoom.PARTY_MATCHING))
    {
      return;
    }
    if (room.getLeader() != player)
    {
      return;
    }
    room.disband();
  }
View Full Code Here

      activeChar.sendActionFailed();
      return;
    }
    try
    {
      MatchingRoom room = requestor.getMatchingRoom();
      if ((room == null) || (room.getType() != MatchingRoom.PARTY_MATCHING))
      {
        return;
      }
      room.addMember(activeChar);
    }
    finally
    {
      request.done();
    }
View Full Code Here

    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getType() != MatchingRoom.CC_MATCHING))
    {
      return;
    }
    if (room.getLeader() == player)
    {
      return;
    }
    room.removeMember(player, false);
  }
View Full Code Here

    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getType() != MatchingRoom.CC_MATCHING))
    {
      return;
    }
    if (room.getLeader() != player)
    {
      return;
    }
    Player member = GameObjectsStorage.getPlayer(_objectId);
    if (member == null)
    {
      return;
    }
    if (member == room.getLeader())
    {
      return;
    }
    room.removeMember(member, true);
  }
View Full Code Here

        {
          activeChar.getParty().broadCast(cs);
        }
        break;
      case PARTY_ROOM:
        MatchingRoom r = activeChar.getMatchingRoom();
        if ((r != null) && (r.getType() == MatchingRoom.PARTY_MATCHING))
        {
          r.broadCast(cs);
        }
        break;
      case COMMANDCHANNEL_ALL:
        if (!activeChar.isInParty() || !activeChar.getParty().isInCommandChannel())
        {
          activeChar.sendPacket(Msg.YOU_DO_NOT_HAVE_AUTHORITY_TO_USE_THE_COMMAND_CHANNEL);
          return;
        }
        if (activeChar.getParty().getCommandChannel().getChannelLeader() == activeChar)
        {
          activeChar.getParty().getCommandChannel().broadCast(cs);
        }
        else
        {
          activeChar.sendPacket(Msg.ONLY_CHANNEL_OPENER_CAN_GIVE_ALL_COMMAND);
        }
        break;
      case COMMANDCHANNEL_COMMANDER:
        if (!activeChar.isInParty() || !activeChar.getParty().isInCommandChannel())
        {
          activeChar.sendPacket(Msg.YOU_DO_NOT_HAVE_AUTHORITY_TO_USE_THE_COMMAND_CHANNEL);
          return;
        }
        if (activeChar.getParty().isLeader(activeChar))
        {
          activeChar.getParty().getCommandChannel().broadcastToChannelPartyLeaders(cs);
        }
        else
        {
          activeChar.sendPacket(Msg.ONLY_A_PARTY_LEADER_CAN_ACCESS_THE_COMMAND_CHANNEL);
        }
        break;
      case HERO_VOICE:
        boolean PremiumHeroChat = false;
        if (Config.PREMIUM_HEROCHAT && (activeChar.getNetConnection().getBonus() > 1))
        {
          long endtime = activeChar.getNetConnection().getBonusExpire();
          if (endtime >= 0)
          {
            PremiumHeroChat = true;
          }
        }
        if (activeChar.isHero() || activeChar.getPlayerAccess().CanAnnounce || PremiumHeroChat)
        {
          if (!activeChar.getPlayerAccess().CanAnnounce)
          {
            if (!activeChar.antiFlood.canHero(_text))
            {
              activeChar.sendMessage("Hero chat is allowed once per 10 seconds.");
              return;
            }
          }
          for (Player player : GameObjectsStorage.getAllPlayersForIterate())
          {
            if (!player.isInBlockList(activeChar) && !player.isBlockAll())
            {
              player.sendPacket(cs);
            }
          }
        }
        break;
      case PETITION_PLAYER:
      case PETITION_GM:
        if (!PetitionManager.getInstance().isPlayerInConsultation(activeChar))
        {
          activeChar.sendPacket(new SystemMessage(SystemMessage.YOU_ARE_CURRENTLY_NOT_IN_A_PETITION_CHAT));
          return;
        }
        PetitionManager.getInstance().sendActivePetitionMessage(activeChar, _text);
        break;
      case BATTLEFIELD:
        if (activeChar.getBattlefieldChatId() == 0)
        {
          return;
        }
        for (Player player : GameObjectsStorage.getAllPlayersForIterate())
        {
          if (!player.isInBlockList(activeChar) && !player.isBlockAll() && (player.getBattlefieldChatId() == activeChar.getBattlefieldChatId()))
          {
            player.sendPacket(cs);
          }
        }
        break;
      case MPCC_ROOM:
        MatchingRoom r2 = activeChar.getMatchingRoom();
        if ((r2 != null) && (r2.getType() == MatchingRoom.CC_MATCHING))
        {
          r2.broadCast(cs);
        }
        break;
      default:
        _log.warn("Character " + activeChar.getName() + " used unknown chat type: " + _type.ordinal() + ".");
    }
View Full Code Here

    {
      return;
    }
    if (_roomId > 0)
    {
      MatchingRoom room = MatchingRoomManager.getInstance().getMatchingRoom(MatchingRoom.PARTY_MATCHING, _roomId);
      if (room == null)
      {
        return;
      }
      room.addMember(player);
    }
    else
    {
      for (MatchingRoom room : MatchingRoomManager.getInstance().getMatchingRooms(MatchingRoom.PARTY_MATCHING, _locations, _level == 1, player))
      {
        if (room.addMember(player))
        {
          break;
        }
      }
    }
View Full Code Here

    if (player == null)
    {
      return;
    }
   
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getType() != MatchingRoom.CC_MATCHING))
    {
      return;
    }
   
    Set<String> set = new HashSet<>();
    for (Player $member : room.getPlayers())
    {
      if ($member.getParty() != null)
      {
        set.add($member.getParty().getPartyLeader().getName());
      }
View Full Code Here

    }
    if (CursedWeaponsManager.getInstance().getCursedWeapon(getCursedWeaponEquippedId()) != null)
    {
      CursedWeaponsManager.getInstance().getCursedWeapon(getCursedWeaponEquippedId()).setPlayer(null);
    }
    MatchingRoom room = getMatchingRoom();
    if (room != null)
    {
      if (room.getLeader() == this)
      {
        room.disband();
      }
      else
      {
        room.removeMember(this, false);
      }
    }
    setMatchingRoom(null);
    MatchingRoomManager.getInstance().removeFromWaitingList(this);
    destroyAllTraps();
View Full Code Here

      Player player = cha.getPlayer();
     
      QuestState qs = player.getQuestState(_10301_ShadowOfTerrorBlackishRedFog.class);
      if(qs != null && qs.getCond() == 3 && player.getVar("instance10301") == null)
      {
        Quest q = QuestManager.getQuest(10301);
        player.processQuestEvent(q.getName(), "enterInstance", null);
        //player.setVar("instance10301", "true", -1);
        return;
      }
      if (!player.getVarB("@25_20_telzone_to_magmeld"))
      {
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.matching.MatchingRoom

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.