Package lineage2.gameserver.model.entity

Examples of lineage2.gameserver.model.entity.Reflection


   * Method setReflection.
   * @param reflectionId int
   */
  public void setReflection(int reflectionId)
  {
    Reflection r = ReflectionManager.getInstance().get(reflectionId);
    if (r == null)
    {
      Log.debug("Trying to set unavailable reflection: " + reflectionId + " for object: " + this + "!", new Throwable().fillInStackTrace());
      return;
    }
View Full Code Here


  /**
   * Method onDelete.
   */
  protected void onDelete()
  {
    Reflection r = getReflection();
    if (!r.isDefault())
    {
      r.removeObject(this);
    }
    clearRef();
  }
View Full Code Here

    if (object.isPlayer())
    {
      player = (Player) object;
    }
    int oid = object.getObjectId();
    Reflection rid = object.getReflection();
    Player p;
    List<L2GameServerPacket> d = null;
    for (GameObject obj : this)
    {
      if ((obj.getObjectId() == oid) || (obj.getReflection() != rid))
View Full Code Here

    return null;
  }
 
  private void enterInstance(Player player)
  {
    Reflection r = player.getActiveReflection();
    if (r != null)
    {
      if (player.canReenterInstance(izId))
      {
        player.teleToLocation(r.getTeleportLoc(), r);
      }
    }
    else if (player.canEnterInstance(izId))
    {
      ReflectionUtils.enterReflection(player, izId);
View Full Code Here

   * Method addZone.
   * @param zone Zone
   */
  static void addZone(Zone zone)
  {
    Reflection reflection = zone.getReflection();
    Territory territory = zone.getTerritory();
    if (territory == null)
    {
      _log.info("World: zone - " + zone.getName() + " not has territory.");
      return;
View Full Code Here

   * Method removeZone.
   * @param zone Zone
   */
  static void removeZone(Zone zone)
  {
    Reflection reflection = zone.getReflection();
    Territory territory = zone.getTerritory();
    if (territory == null)
    {
      _log.info("World: zone - " + zone.getName() + " not has territory.");
      return;
View Full Code Here

    return null;
  }
 
  private void enterInstance(Player player)
  {
    Reflection reflection = player.getActiveReflection();
    if (reflection != null)
    {
      if (player.canReenterInstance(INSTANCE_ID))
      {
        player.teleToLocation(reflection.getTeleportLoc(), reflection);
      }
    }
    else if (player.canEnterInstance(INSTANCE_ID))
    {
      ReflectionUtils.enterReflection(player, INSTANCE_ID);
View Full Code Here

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

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

  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    Player player = st.getPlayer();
    String htmltext = event;
    Reflection ref = player.getReflection();
    if (event.equalsIgnoreCase("claudiaathebaldt_q195_2.htm"))
    {
      st.setCond(1);
      st.setState(STARTED);
      st.playSound(SOUND_ACCEPT);
    }
    else if (event.equalsIgnoreCase("john_q195_2.htm"))
    {
      st.setCond(2);
      st.giveItems(GuardsoftheDawnIdentityCard, 1);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("raymond_q195_3.htm"))
    {
      if ((player.getTransformation() != 0) || player.isMounted())
      {
        player.sendPacket(Msg.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
        return null;
      }
      st.playSound(SOUND_MIDDLE);
      negateSpeedBuffs(player);
      SkillTable.getInstance().getInfo(6204, 1).getEffects(player, player, false, false);
      st.setCond(3);
    }
    else if (event.equalsIgnoreCase("transformagain"))
    {
      if ((player.getTransformation() != 0) || player.isMounted())
      {
        player.sendPacket(Msg.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
        return null;
      }
      negateSpeedBuffs(player);
      SkillTable.getInstance().getInfo(6204, 1).getEffects(player, player, false, false);
      htmltext = "raymond_q195_4c.htm";
    }
    else if (event.equalsIgnoreCase("dispel"))
    {
      if (player.getTransformation() == 113)
      {
        player.setTransformation(0);
        htmltext = "raymond_q195_4d.htm";
      }
      else
      {
        htmltext = "raymond_q195_4b.htm";
      }
    }
    else if (event.equalsIgnoreCase("teleout"))
    {
      if (st.getQuestItemsCount(GuardsoftheDawnIdentityCard) > 0)
      {
        htmltext = "darknessofdawn_q195_1.htm";
      }
      else
      {
        htmltext = "darknessofdawn_q195_2.htm";
      }
      if (ref != null)
      {
        ref.collapse();
      }
    }
    else if (event.equalsIgnoreCase("telelater"))
    {
      return null;
    }
    else if (event.equalsIgnoreCase("open_door"))
    {
      if ((ref != null) && (player.getTransformation() == 113) && (st.getQuestItemsCount(GuardsoftheDawnIdentityCard) >= 1))
      {
        if (npc.getLoc().equals(new Location(-75695, 213537, -7128, 0)))
        {
          ref.openDoor(door1);
          ref.openDoor(door2);
          player.sendPacket(new SystemMessage(SystemMessage.BY_USING_THE_INVISIBLE_SKILL_SNEAK_INTO_THE_DAWN_S_DOCUMENT_STORAGE));
          player.sendPacket(new SystemMessage(SystemMessage.MALE_GUARDS_CAN_DETECT_THE_CONCEALMENT_BUT_THE_FEMALE_GUARDS_CANNOT));
          player.sendPacket(new SystemMessage(SystemMessage.FEMALE_GUARDS_NOTICE_THE_DISGUISES_FROM_FAR_AWAY_BETTER_THAN_THE_MALE_GUARDS_DO_SO_BEWARE));
          htmltext = "identityconfirmdevice_q195_1.htm";
        }
        else
        {
          ref.openDoor(door3);
          ref.openDoor(door4);
          player.sendPacket(new SystemMessage(SystemMessage.THE_DOOR_IN_FRONT_OF_US_IS_THE_ENTRANCE_TO_THE_DAWN_S_DOCUMENT_STORAGE_APPROACH_TO_THE_CODE));
          player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_RITUAL_OF_PRIEST);
          htmltext = "identityconfirmdevice_q195_1.htm";
        }
      }
      else
      {
        return "identityconfirmdevice_q195_2.htm";
      }
    }
    else if (event.equalsIgnoreCase("false_code"))
    {
      htmltext = "passwordentrydevice_q195_2.htm";
    }
    else if (event.equalsIgnoreCase("correct_code"))
    {
      if (ref != null)
      {
        ref.openDoor(door5);
        ref.openDoor(door6);
      }
      htmltext = "passwordentrydevice_q195_1.htm";
    }
    else if (event.equalsIgnoreCase("bookshelf_q195_2.htm"))
    {
      st.giveItems(EmperorShunaimansContract, 1);
      st.playSound(SOUND_ITEMGET);
    }
    else if (event.equalsIgnoreCase("bookshelf_q195_3.htm"))
    {
      if ((ref != null) && !ref.isDefault())
      {
        ref.collapse();
      }
    }
    else if (event.equalsIgnoreCase("raymond_q195_5.htm"))
    {
      player.setTransformation(0);
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.