Package lineage2.gameserver.model.entity

Examples of lineage2.gameserver.model.entity.Reflection


            {
              st.giveItems(DungeonLeaderMark, RewardMarksCount);
              st.playSound(SOUND_ITEMGET);
              st.getPlayer().sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(5));
            }
            Reflection r = ReflectionManager.getInstance().get(prison.getReflectionId());
            if (r != null)
            {
              r.startCollapseTimer(300000);
            }
            break;
        }
        break;
      }
View Full Code Here


          return null;
        }
      }
      prison = new Prison(fort.getId(), iz);
      _prisons.put(prison.getFortId(), prison);
      Reflection r = ReflectionManager.getInstance().get(prison.getReflectionId());
      r.setReturnLoc(player.getLoc());
      for (Player member : player.getParty().getPartyMembers())
      {
        if (member != player)
        {
          newQuestState(member, STARTED);
        }
        member.setReflection(r);
        member.teleToLocation(iz.getTeleportCoord());
        member.setVar("backCoords", r.getReturnLoc().toXYZString(), -1);
        member.setInstanceReuse(iz.getId(), System.currentTimeMillis());
      }
      player.getParty().setReflection(r);
      r.setParty(player.getParty());
      r.startCollapseTimer(iz.getTimelimit() * 60 * 1000L);
      player.getParty().broadCast(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(iz.getTimelimit()));
      prison.initSpawn(type1[Rnd.get(type1.length)], true);
    }
    return null;
  }
View Full Code Here

   
    public Prison(int id, InstantZone iz)
    {
      try
      {
        Reflection r = new Reflection();
        r.init(iz);
        _reflectionId = r.getId();
        _fortId = id;
        _lastEnter = System.currentTimeMillis();
      }
      catch (Exception e)
      {
View Full Code Here

   * @param player Player
   * @param floor int
   */
  private void enterInstance(Player player, int floor)
  {
    Reflection r = player.getActiveReflection();
    if (r != null)
    {
      if (player.canReenterInstance(getIz(floor)))
      {
        player.teleToLocation(r.getTeleportLoc(), r);
      }
    }
    else if (player.canEnterInstance(getIz(floor)))
    {
      ReflectionUtils.enterReflection(player, getIz(floor));
View Full Code Here

  @Override
  protected void onEvtFinishCasting(int skill_id, boolean success)
  {
    if (skill_id == ENRAGED_SKILL_ID)
    {
      final Reflection r = getActor().getReflection();
      if (r instanceof MemoryOfDisaster)
      {
        ((MemoryOfDisaster) r).startFinalScene();
      }
      addTimer(2, 50);
View Full Code Here

        final Skill sk = SkillTable.getInstance().getInfo(SKILL_ID, 1);
        addTaskBuff(getActor(), sk);
        doTask();
        break;
      case 2:
        final Reflection r = getActor().getReflection();
        if (r instanceof MemoryOfDisaster)
        {
          ((MemoryOfDisaster) r).spawnWyrm();
        }
        getActor().deleteMe();
View Full Code Here

    if (member == null)
    {
      activeChar.sendActionFailed();
      return;
    }
    Reflection r = party.getReflection();
    if (r != null)
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestOustPartyMember.CantOustInDungeon", activeChar));
    }
    else
View Full Code Here

   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    final Reflection ref = actor.getReflection();
    if (checkAllDestroyed(actor.getNpcId()))
    {
      ref.openDoor(DOOR);
      ref.addSpawnWithoutRespawn(TIAT_NPC_ID, TIAT_LOC, 0);
    }
    super.onEvtDead(killer);
  }
View Full Code Here

   */
  @Override
  protected void onEvtTimer(int timerId, Object arg1, Object arg2)
  {
    super.onEvtTimer(timerId, arg1, arg2);
    final Reflection r = getActor().getReflection();
    if (r.equals(ReflectionManager.DEFAULT))
    {
      return;
    }
    List<NpcInstance> list;
    switch (timerId)
    {
      case 1:
        Functions.npcSayInRange(getActor(), 1500, NpcString.CHIEF_REPORTING_IN);
        addTimer(2, 1600);
        break;
      case 2:
        Functions.npcSayInRange(getActor(), 1500, NpcString.ENEMIES_ARE_APPROACHING_FROM_THE_SOUTH);
        list = r.getAllByNpcId(BRONK_ID, true);
        if (list.size() > 0)
        {
          final NpcInstance bronk = list.get(0);
          bronk.getAI().notifyEvent(CtrlEvent.EVT_SCRIPT_EVENT, "BRONK_1");
        }
        break;
      case 3:
        Functions.npcSayInRange(getActor(), 1500, NpcString.THE_ELDERS_HAVENT_BEEN_MOVED_TO_SAFETY);
        addTimer(4, 1600);
        break;
      case 4:
        Functions.npcSayInRange(getActor(), 1500, NpcString.MANY_RESIDENTS_STILL_HAVENT_LEFT_THEIR_HOMES);
        list = r.getAllByNpcId(BRONK_ID, true);
        if (list.size() > 0)
        {
          final NpcInstance bronk = list.get(0);
          bronk.getAI().notifyEvent(CtrlEvent.EVT_SCRIPT_EVENT, "BRONK_2");
        }
View Full Code Here

    {
      return true;
    }
    if (!_failed && (_lastAttackTime != 0) && ((_lastAttackTime + COLLAPSE_BY_INACTIVITY_INTERVAL) < System.currentTimeMillis()))
    {
      final Reflection r = actor.getReflection();
      _failed = true;
      ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          for (Player pl : r.getPlayers())
          {
            pl.showQuestMovie(ExStartScenePlayer.SCENE_TIAT_FAIL);
          }
          r.clearReflection(5, true);
        }
      }, 1000);
      return true;
    }
    return super.thinkActive();
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.Reflection

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.