Package l2p.gameserver.model.entity.olympiad

Examples of l2p.gameserver.model.entity.olympiad.OlympiadGame


          OlympiadManager manager = Olympiad._manager;
          if(manager != null)
          {
            for(int i = 0; i < Olympiad.STADIUMS.length; i++)
            {
              OlympiadGame game = manager.getOlympiadInstance(i);
              if(game != null && game.getState() > 0)
              {
                if(game.getType() == CompType.TEAM || game.getType() == CompType.TEAM_RANDOM)
                {
                  replace.append("<br1>Arena " + (i + 1) + ":&nbsp;<a action=\"bypass -h npc_%objectId%_Olympiad 3_" + i + "\">Team vs Team:</a>");
                  replace.append("<br1>- " + game.getTeam1Title() + "<br1>- " + game.getTeam2Title());
                }
                else
                {
                  replace.append("<br1>Arena " + (i + 1) + ":&nbsp;<a action=\"bypass -h npc_%objectId%_Olympiad 3_" + i + "\">" + manager.getOlympiadInstance(i).getTitle() + "</a>");
                }
View Full Code Here


    OlympiadManager manager = Olympiad._manager;
    if(manager != null)
    {
      for(int i = 0; i < Olympiad.STADIUMS.length; i++)
      {
        OlympiadGame game = manager.getOlympiadInstance(i);
        if(game != null && game.getState() > 0)
        {
          if(game.getType() == CompType.TEAM || game.getType() == CompType.TEAM_RANDOM)
          {
            msg.append("<br1>Arena " + i + ":&nbsp;<a action=\"bypass -h oly_" + (i + 1) + "\">Team vs Team:</a>");
            msg.append("<br1>- " + game.getTeam1Title() + "<br1>- " + game.getTeam2Title());
          }
          else
          {
            msg.append("<br1>Arena " + i + ":&nbsp;<a action=\"bypass -h oly_" + (i + 1) + "\">" + manager.getOlympiadInstance(i).getTitle() + "</a>");
          }
View Full Code Here

    int id = _olympiadGameId;
    if(id < 0)
    {
      return false;
    }
    OlympiadGame og = Olympiad.getOlympiadGame(id);
    return og != null && og.getState() == 2;
  }
View Full Code Here

    {
      _party.broadcastToPartyMembers(ps);
    }
    if(Config.ENABLE_OLYMPIAD && isInOlympiadMode() && isOlympiadCompStart())
    {
      OlympiadGame olymp_game = Olympiad.getOlympiadGame(getOlympiadGameId());
      if(olymp_game != null)
      {
        ExOlympiadSpelledInfo OlympiadSpelledInfo = new ExOlympiadSpelledInfo();
        for(L2Effect effect : effects)
        {
          if(effect != null && effect.isInUse())
          {
            effect.addOlympiadSpelledIcon(this, OlympiadSpelledInfo);
          }
        }
        if(olymp_game.getType() == CompType.CLASSED || olymp_game.getType() == CompType.NON_CLASSED)
        {
          for(L2Player member : olymp_game.getTeamMembers(this))
          {
            member.sendPacket(OlympiadSpelledInfo);
          }
        }
        for(L2Player member : olymp_game.getSpectators())
        {
          member.sendPacket(OlympiadSpelledInfo);
        }
      }
    }
View Full Code Here

    {
      getDuel().broadcastToOppositTeam(this, new ExDuelUpdateUserInfo(this));
    }
    if(isInOlympiadMode() && isOlympiadCompStart())
    {
      OlympiadGame game = Olympiad.getOlympiadGame(getOlympiadGameId());
      if(game != null)
      {
        game.broadcastInfo(this, null, false);
      }
    }
  }
View Full Code Here

        return;
      }
    }
    if(isInOlympiadMode())
    {
      OlympiadGame olymp_game = Olympiad.getOlympiadGame(getOlympiadGameId());
      if(olymp_game != null)
      {
        if(olymp_game.getState() <= 0)
        {
          attacker.getPlayer().sendPacket(Msg.INVALID_TARGET);
          return;
        }
        if(this != attacker)
        {
          olymp_game.addDamage(this, Math.min(hp, i));
        }
        if(i >= hp)
        {
          if(olymp_game.getType() != CompType.TEAM && olymp_game.getType() != CompType.TEAM_RANDOM)
          {
            olymp_game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
            olymp_game.endGame(20000, false);
            setCurrentHp(1, false);
            attacker.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
            attacker.sendActionFailed();
            return;
          }
          else if(olymp_game.doDie(this)) // Все умерли
          {
            olymp_game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
            olymp_game.endGame(20000, false);
          }
        }
      }
      else
      {
View Full Code Here

    {
      neighbor.showObjectsToPlayer(this);
    }
    if(getOlympiadObserveId() > -1)
    {
      OlympiadGame game = Olympiad.getOlympiadGame(getOlympiadObserveId());
      if(game != null)
      {
        game.broadcastInfo(null, this, true);
      }
    }
  }
View Full Code Here

    int id = _olympiadGameId;
    if(id < 0)
    {
      return false;
    }
    OlympiadGame og = Olympiad.getOlympiadGame(id);
    return og != null && og.getState() == 1;
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.entity.olympiad.OlympiadGame

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.