Package lineage2.gameserver.model.matching

Examples of lineage2.gameserver.model.matching.MatchingRoom


   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if (_firstTimeAttacked)
    {
      Functions.npcSay(actor, "A non-permitted target has been discovered.");
      Functions.npcSay(actor, "Starting intruder removal system.");
      _firstTimeAttacked = false;
View Full Code Here


   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
      final NpcInstance cubic1 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic1.setReflection(actor.getReflection());
      cubic1.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic1.spawnMe(CUBIC_1_POSITION);
      final NpcInstance cubic2 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic2.setReflection(actor.getReflection());
      cubic2.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic2.spawnMe(CUBIC_2_POSITION);
      ThreadPoolManager.getInstance().schedule(new DeSpawnScheduleTimerTask(cubic1, cubic2), CUBIC_DESPAWN_TIME);
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

   */
  @Override
  protected void onEvtSpawn()
  {
    super.onEvtSpawn();
    final NpcInstance actor = getActor();
    if (Rnd.chance(50))
    {
      actor.setNpcState(1);
    }
    ThreadPoolManager.getInstance().scheduleAtFixedRate(new Switch(), 5 * 60 * 1000L, 5 * 60 * 1000L);
  }
 
View Full Code Here

     * Method runImpl.
     */
    @Override
    public void runImpl()
    {
      final NpcInstance actor = getActor();
      if (actor.getNpcState() == 1)
      {
        actor.setNpcState(2);
      }
      else
      {
        actor.setNpcState(1);
      }
    }
View Full Code Here

    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if (room == null)
    {
      new PartyMatchingRoom(player, _minLevel, _maxLevel, _maxMembers, _lootDist, _roomTitle);
    }
    else if ((room.getId() == _roomId) && (room.getType() == MatchingRoom.PARTY_MATCHING) && (room.getLeader() == player))
    {
      room.setMinLevel(_minLevel);
      room.setMaxLevel(_maxLevel);
      room.setMaxMemberSize(_maxMembers);
      room.setTopic(_roomTitle);
      room.setLootType(_lootDist);
      room.broadCast(room.infoRoomPacket());
    }
  }
View Full Code Here

    }
    if (player.getMatchingRoom() != null)
    {
      return;
    }
    MatchingRoom room = MatchingRoomManager.getInstance().getMatchingRoom(MatchingRoom.CC_MATCHING, _roomId);
    if (room == null)
    {
      return;
    }
    room.addMember(player);
  }
View Full Code Here

   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getType() != MatchingRoom.PARTY_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

    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.disband();
  }
View Full Code Here

    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getId() != _id) || (room.getType() != MatchingRoom.CC_MATCHING))
    {
      return;
    }
    if (room.getLeader() != player)
    {
      return;
    }
    room.setTopic(_topic);
    room.setMaxMemberSize(_memberSize);
    room.setMinLevel(_minLevel);
    room.setMaxLevel(_maxLevel);
    room.broadCast(room.infoRoomPacket());
    player.sendPacket(SystemMsg.THE_COMMAND_CHANNEL_MATCHING_ROOM_INFORMATION_WAS_EDITED);
  }
View Full Code Here

    }
    if (targetPlayer.getMatchingRoom() != null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if ((room == null) || (room.getType() != MatchingRoom.PARTY_MATCHING))
    {
      return;
    }
    if (room.getLeader() != player)
    {
      player.sendPacket(SystemMsg.ONLY_A_ROOM_LEADER_MAY_INVITE_OTHERS_TO_A_PARTY_ROOM);
      return;
    }
    if (room.getPlayers().size() >= room.getMaxMembersSize())
    {
      player.sendPacket(SystemMsg.THE_PARTY_ROOM_IS_FULL);
      return;
    }
    new Request(L2RequestType.PARTY_ROOM, player, targetPlayer).setTimeout(10000L);
    targetPlayer.sendPacket(new ExAskJoinPartyRoom(player.getName(), room.getTopic()));
    player.sendPacket(new SystemMessage2(SystemMsg.S1_HAS_SENT_AN_INVITATION_TO_ROOM_S2).addName(player).addString(room.getTopic()));
    targetPlayer.sendPacket(new SystemMessage2(SystemMsg.S1_HAS_SENT_AN_INVITATION_TO_ROOM_S2).addName(player).addString(room.getTopic()));
  }
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.