Package lineage2.gameserver.model.base

Examples of lineage2.gameserver.model.base.TeamType


  protected void onEvtAggression(Creature attacker, int aggro)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
    }
  }
View Full Code Here


    _zoneListener = new ZoneListener();
    for (String element : ZONES)
    {
      int random = Rnd.get(60 * 1000 * 1, 60 * 1000 * 7);
      int message;
      Zone zone = ReflectionUtils.getZone(element);
      ThreadPoolManager.getInstance().schedule(new CampDestroyTask(zone), random);
      if (random > (5 * 60000))
      {
        message = random - (5 * 60000);
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > (3 * 60000))
      {
        message = random - (3 * 60000);
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > 60000)
      {
        message = random - 60000;
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > 15000)
      {
        message = random - 15000;
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(1, zone), message);
      }
      zone.addListener(_zoneListener);
    }
    _buffTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new BuffTask(), TICK_BUFF_DELAY, TICK_BUFF_DELAY);
  }
View Full Code Here

  @Override
  public void onReload()
  {
    for (String element : ZONES)
    {
      Zone zone = ReflectionUtils.getZone(element);
      zone.removeListener(_zoneListener);
    }
    if (_buffTask != null)
    {
      _buffTask.cancel(false);
      _buffTask = null;
View Full Code Here

    @Override
    public void runImpl()
    {
      for (String element : ZONES)
      {
        Zone zone = ReflectionUtils.getZone(element);
        NpcInstance npc = getKasha(zone);
        if ((npc != null) && (zone != null))
        {
          int curseLvl = 0;
          int yearningLvl = 0;
          int despairLvl = 0;
          for (Creature c : zone.getObjects())
          {
            if (c.isMonster() && !c.isDead())
            {
              if (getRealNpcId((NpcInstance) c) == mobs[0])
              {
                curseLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[1])
              {
                yearningLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[2])
              {
                despairLvl++;
              }
            }
          }
          if ((yearningLvl > 0) || (curseLvl > 0) || (despairLvl > 0))
          {
            for (Creature cha : zone.getInsidePlayables())
            {
              boolean casted = false;
              if (curseLvl > 0)
              {
                addEffect(npc, cha.getPlayer(), SkillTable.getInstance().getInfo(_buffs[0], curseLvl), true);
View Full Code Here

  private void init()
  {
    _zoneListener = new ZoneListener();
    for (String s : zones)
    {
      Zone zone = ReflectionUtils.getZone(s);
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here

   * Method init.
   */
  private void init()
  {
    _zoneListener = new ZoneListener();
    Zone zone = ReflectionUtils.getZone(ZONE_NAME);
    if (zone != null)
    {
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here

   * @param player Player
   */
  @Override
  public void onDie(Player player)
  {
    TeamType team = player.getTeam();
    if ((team == TeamType.NONE) || _aborted)
    {
      return;
    }
    boolean allDead = true;
    List<DuelSnapshotObject> objs = getObjects(team.name());
    for (DuelSnapshotObject obj : objs)
    {
      if (obj.getPlayer() == player)
      {
        obj.setDead();
      }
      if (!obj.isDead())
      {
        allDead = false;
      }
    }
    if (allDead)
    {
      _winner = team.revert();
      stopEvent();
    }
  }
View Full Code Here

   * @param player Player
   */
  @Override
  public void onDie(Player player)
  {
    TeamType team = player.getTeam();
    if ((team == TeamType.NONE) || _aborted)
    {
      return;
    }
   
    sendPacket(SystemMsg.THE_OTHER_PARTY_IS_FROZEN, team.revert().name());
   
    player.stopAttackStanceTask();
    player.startFrozen();
    player.setTeam(TeamType.NONE);
   
    for (Player $player : World.getAroundPlayers(player))
    {
      $player.getAI().notifyEvent(CtrlEvent.EVT_FORGET_OBJECT, player);
      for (Summon summon : player.getSummonList())
      {
        $player.getAI().notifyEvent(CtrlEvent.EVT_FORGET_OBJECT, summon);
      }
    }
    player.sendChanges();
   
    boolean allDead = true;
    List<DuelSnapshotObject> objs = getObjects(team.name());
    for (DuelSnapshotObject obj : objs)
    {
      if (obj.getPlayer() == player)
      {
        obj.setDead();
      }
     
      if (!obj.isDead())
      {
        allDead = false;
      }
    }
   
    if (allDead)
    {
      _winner = team.revert();
     
      stopEvent();
    }
  }
View Full Code Here

   * @return boolean * @see lineage2.gameserver.handler.admincommands.IAdminCommandHandler#useAdminCommand(Enum<?>, String[], String, Player)
   */
  @Override
  public boolean useAdminCommand(Enum<?> comm, String[] wordList, String fullString, Player activeChar)
  {
    TeamType team = TeamType.NONE;
    if (wordList.length >= 2)
    {
      for (TeamType t : TeamType.values())
      {
        if (wordList[1].equalsIgnoreCase(t.name()))
View Full Code Here

    {
      return;
    }
    if (command.equalsIgnoreCase("request_nightzaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(nightZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(nightZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenNight(), nightZakenIzId);
      }
    }
    else if (command.equalsIgnoreCase("request_dayzaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(dayZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(dayZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenDay(), dayZakenIzId);
      }
    }
    else if (command.equalsIgnoreCase("request_ultrazaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(ultraZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(ultraZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenDay83(), ultraZakenIzId);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.base.TeamType

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.