Examples of Reflection


Examples of lineage2.gameserver.model.entity.Reflection

    {
      return htmltext;
    }
    if (event.equalsIgnoreCase("MemoryOfDisaster"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(MEMORY_OF_DISASTER_ID))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(MEMORY_OF_DISASTER_ID))
      {
        ReflectionUtils.enterReflection(player, new MemoryOfDisaster(player), MEMORY_OF_DISASTER_ID);
      }
      htmltext = null;
    }
    if (npc == null)
    {
      return htmltext;
    }
    switch (npc.getNpcId())
    {
      case CELLPHINE_ID:
        if (event.equalsIgnoreCase("quest_ac"))
        {
          st.setState(STARTED);
          st.setCond(1);
          st.playSound(SOUND_ACCEPT);
          htmltext = "0-2.htm";
        }
        break;
      case HADEL_ID:
        if (event.equalsIgnoreCase("1-5.htm"))
        {
          st.setCond(2);
          st.playSound(SOUND_MIDDLE);
        }
        else if (event.equalsIgnoreCase("EnterInstance"))
        {
          Reflection r = player.getActiveReflection();
          if (r != null)
          {
            if (player.canReenterInstance(INSTANCE_ID))
            {
              player.teleToLocation(r.getTeleportLoc(), r);
            }
          }
          else if (player.canEnterInstance(INSTANCE_ID))
          {
            if (st.getCond() < 3)
View Full Code Here

Examples of lineage2.gameserver.model.entity.Reflection

    if (isVisible())
    {
      decayMe();
      respawn = true;
    }
    Reflection r = getReflection();
    if (!r.isDefault())
    {
      r.removeObject(this);
    }
    _reflection = reflection;
    if (!reflection.isDefault())
    {
      reflection.addObject(this);
View Full Code Here

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

Examples of lineage2.gameserver.model.entity.Reflection

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

Examples of lineage2.gameserver.model.entity.Reflection

    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

Examples of lineage2.gameserver.model.entity.Reflection

    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

Examples of org.jboss.dna.common.util.Reflection

            }

            if (config.getProperties() != null) {
                for (Map.Entry<String, Object> entry : config.getProperties().entrySet()) {
                    // Set the JavaBean-style property on the RepositorySource instance ...
                    Reflection reflection = new Reflection(newInstance.getClass());
                    reflection.invokeSetterMethodOnTarget(entry.getKey(), newInstance, entry.getValue());
                }
            }
        } catch (Throwable e) {
            throw new SystemFailureException(e);
        }
View Full Code Here

Examples of org.jboss.dna.common.util.Reflection

            }
           
            if (config.getProperties() != null) {
                for (Map.Entry<String, Object> entry : config.getProperties().entrySet()) {
                    // Set the JavaBean-style property on the RepositorySource instance ...
                    Reflection reflection = new Reflection(newInstance.getClass());
                    reflection.invokeSetterMethodOnTarget(entry.getKey(), newInstance, entry.getValue());
                }
            }
        } catch (Throwable e) {
            throw new SystemFailureException(e);
        }
View Full Code Here

Examples of org.jboss.dna.common.util.Reflection

                     * dependency, we'll add code to handle the case of unexpected callback handlers with a setObject method.
                     */
                    try {
                        // Assume that a callback chain will ask for the user before the password
                        if (!userSet) {
                            new Reflection(callbacks[i].getClass()).invokeSetterMethodOnTarget("object",
                                                                                               callbacks[i],
                                                                                               this.userId);
                            userSet = true;
                        } else if (!passwordSet) {
                            // Jetty also seems to eschew passing passwords as char arrays
                            new Reflection(callbacks[i].getClass()).invokeSetterMethodOnTarget("object",
                                                                                               callbacks[i],
                                                                                               new String(this.password));
                            passwordSet = true;
                        }
                        // It worked - need to continue processing the callbacks
View Full Code Here

Examples of org.jboss.dna.common.util.Reflection

        setBeanPropertyIfExistsAndNotSet(source, "configurationSourceName", getConfigurationSourceName());
        setBeanPropertyIfExistsAndNotSet(source, "configurationWorkspaceName", getConfigurationWorkspaceName());
        setBeanPropertyIfExistsAndNotSet(source, "configurationPath", stringFactory.create(path));

        // Now set all the properties that we can, ignoring any property that doesn't fit the pattern ...
        Reflection reflection = new Reflection(source.getClass());
        for (Map.Entry<Name, Property> entry : properties.entrySet()) {
            Name propertyName = entry.getKey();
            Property property = entry.getValue();
            String javaPropertyName = propertyName.getLocalName();
            if (property.isEmpty()) continue;

            Object value = null;
            Method setter = null;
            try {
                setter = reflection.findFirstMethod("set" + javaPropertyName, false);
                if (setter == null) continue;
                // Determine the type of the one parameter ...
                Class<?>[] parameterTypes = setter.getParameterTypes();
                if (parameterTypes.length != 1) continue; // not a valid JavaBean property
                Class<?> paramType = parameterTypes[0];
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.