Examples of OlympiadGame


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

    {
      _party.broadCast(ps);
    }
    if (isInOlympiadMode() && isOlympiadCompStart())
    {
      OlympiadGame olymp_game = _olympiadGame;
      if (olymp_game != null)
      {
        ExOlympiadSpelledInfo olympiadSpelledInfo = new ExOlympiadSpelledInfo();
        for (Effect effect : effects)
        {
          if ((effect != null) && effect.isInUse())
          {
            effect.addOlympiadSpelledIcon(this, olympiadSpelledInfo);
          }
        }
        if ((olymp_game.getType() == CompType.CLASSED) || (olymp_game.getType() == CompType.NON_CLASSED))
        {
          for (Player member : olymp_game.getTeamMembers(this))
          {
            member.sendPacket(olympiadSpelledInfo);
          }
        }
        for (Player member : olymp_game.getSpectators())
        {
          member.sendPacket(olympiadSpelledInfo);
        }
      }
    }
View Full Code Here

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

        return;
      }
    }
    if (isInOlympiadMode())
    {
      OlympiadGame game = _olympiadGame;
      if ((this != attacker) && ((skill == null) || skill.isOffensive()))
      {
        game.addDamage(this, Math.min(hp, damage));
      }
      if ((hp - damage) <= 1)
      {
        if (game.getType() != CompType.TEAM)
        {
          game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
          game.endGame(20000, false);
          setCurrentHp(1, false);
          attacker.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
          attacker.sendActionFailed();
          return;
        }
        else if (game.doDie(this))
        {
          game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
          game.endGame(20000, false);
        }
      }
    }
    super.onReduceCurrentHp(damage, attacker, skill, awake, standUp, directHp);
  }
View Full Code Here

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

    if (!observerRegion.equals(currentRegion))
    {
      observerRegion.addObject(this);
    }
    World.showObjectsToPlayer(this);
    OlympiadGame game = getOlympiadObserveGame();
    if (game != null)
    {
      game.addSpectator(this);
      game.broadcastInfo(null, this, true);
    }
  }
View Full Code Here

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

    WorldRegion observerRegion = World.getRegion(loc);
    if (observerRegion == null)
    {
      return;
    }
    OlympiadGame oldGame = getOlympiadObserveGame();
    if (!_observerMode.compareAndSet(oldGame != null ? OBSERVER_STARTED : OBSERVER_NONE, OBSERVER_STARTING))
    {
      return;
    }
    setTarget(null);
    stopMove();
    World.removeObjectsFromPlayer(this);
    setObserverRegion(observerRegion);
    if (oldGame != null)
    {
      oldGame.removeSpectator(this);
      sendPacket(ExOlympiadMatchEnd.STATIC);
    }
    else
    {
      block();
View Full Code Here

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

   * Method leaveOlympiadObserverMode.
   * @param removeFromGame boolean
   */
  public void leaveOlympiadObserverMode(boolean removeFromGame)
  {
    OlympiadGame game = getOlympiadObserveGame();
    if (game == null)
    {
      return;
    }
    if (!_observerMode.compareAndSet(OBSERVER_STARTED, OBSERVER_LEAVING))
    {
      return;
    }
    if (removeFromGame)
    {
      game.removeSpectator(this);
    }
    setOlympiadObserveGame(null);
    WorldRegion currentRegion = getCurrentRegion();
    WorldRegion observerRegion = getObserverRegion();
    if ((observerRegion != null) && (currentRegion != null) && !observerRegion.equals(currentRegion))
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.