Examples of Duel


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

  }

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

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

   * @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

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

   * @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

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

   * @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

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

   * @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
Copyright © 2018 www.massapi.com. 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.