Package net.sf.l2j.gameserver.model.entity

Examples of net.sf.l2j.gameserver.model.entity.Duel$ScheduleStartDuelTask


        playerB.sendMessage(engagedInPvP);
        return;
      }
    }

    Duel duel = new Duel(playerA, playerB, partyDuel, getNextDuelId());
    _duels.add(duel);
  }
View Full Code Here


  }

  public void doSurrender(L2PcInstance player)
  {
    if (player == null || !player.isInDuel()) return;
    Duel duel = getDuel(player.getDuelId());
    duel.doSurrender(player);
  }
View Full Code Here

   * @param player - the dieing player
   */
  public void onPlayerDefeat(L2PcInstance player)
  {
    if (player == null || !player.isInDuel()) return;
    Duel duel = getDuel(player.getDuelId());
    if (duel != null) duel.onPlayerDefeat(player);
  }
View Full Code Here

   * @param buff
   */
  public void onBuff(L2PcInstance player, L2Effect buff)
  {
    if (player == null || !player.isInDuel() || buff == null) return;
    Duel duel = getDuel(player.getDuelId());
    if (duel != null) duel.onBuff(player, buff);
  }
View Full Code Here

   * @param player - the removed player
   */
  public void onRemoveFromParty(L2PcInstance player)
  {
    if (player == null || !player.isInDuel()) return;
    Duel duel = getDuel(player.getDuelId());
    if (duel != null) duel.onRemoveFromParty(player);
  }
View Full Code Here

   * @param packet
   */
  public void broadcastToOppositTeam(L2PcInstance player, L2GameServerPacket packet)
  {
    if (player == null || !player.isInDuel()) return;
    Duel duel = getDuel(player.getDuelId());
    if (duel == null) return;
    if (duel.getPlayerA() == null || duel.getPlayerB() == null) return;

    if (duel.getPlayerA() == player)
    {
      duel.broadcastToTeam2(packet);
    }
    else if (duel.getPlayerB() == player)
    {
      duel.broadcastToTeam1(packet);
    }
    else if (duel.isPartyDuel())
    {
      if (duel.getPlayerA().getParty() != null &&
          duel.getPlayerA().getParty().getPartyMembers().contains(player))
      {
        duel.broadcastToTeam2(packet);
      }
      else if (duel.getPlayerB().getParty() != null &&
          duel.getPlayerB().getParty().getPartyMembers().contains(player))
      {
        duel.broadcastToTeam1(packet);
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.entity.Duel$ScheduleStartDuelTask

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.