Examples of LambdaConst


Examples of com.l2jfrozen.gameserver.skills.funcs.LambdaConst

      if(_active)
        return;

      for(int i = 0; i < _stats.length; i++)
      {
        player.addStatFunc(new FuncAdd(_stats[i], 0x40, this, new LambdaConst(_values[i])));
      }

      _active = true;
    }
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.funcs.LambdaConst

    Node nval = n.getAttributes().getNamedItem("val");
    if(nval != null)
    {
      String val = nval.getNodeValue();
      if(val.charAt(0) == '#')
        return new LambdaConst(Double.parseDouble(getTableValue(val)));
      else if(val.charAt(0) == '$')
      {
        if(val.equalsIgnoreCase("$player_level"))
          return new LambdaStats(LambdaStats.StatsType.PLAYER_LEVEL);

        if(val.equalsIgnoreCase("$target_level"))
          return new LambdaStats(LambdaStats.StatsType.TARGET_LEVEL);

        if(val.equalsIgnoreCase("$player_max_hp"))
          return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_HP);

        if(val.equalsIgnoreCase("$player_max_mp"))
          return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_MP);

        // try to find value out of item fields
        StatsSet set = getStatsSet();
        String field = set.getString(val.substring(1));
        if(field != null)
          return new LambdaConst(Double.parseDouble(getValue(field, template)));
        // failed
        throw new IllegalArgumentException("Unknown value " + val);
      }
      else
        return new LambdaConst(Double.parseDouble(val));
    }
    LambdaCalc calc = new LambdaCalc();
    n = n.getFirstChild();
    while(n != null && n.getNodeType() != Node.ELEMENT_NODE)
    {
View Full Code Here

Examples of net.sf.l2j.gameserver.skills.funcs.LambdaConst

        if (nval != null)
        {
            String val = nval.getNodeValue();
            if (val.charAt(0) == '#')
            { // table by level
                return new LambdaConst(Double.parseDouble(getTableValue(val)));
            }
            else if (val.charAt(0) == '$')
            {
                if (val.equalsIgnoreCase("$player_level"))
                    return new LambdaStats(LambdaStats.StatsType.PLAYER_LEVEL);
                if (val.equalsIgnoreCase("$target_level"))
                    return new LambdaStats(LambdaStats.StatsType.TARGET_LEVEL);
                if (val.equalsIgnoreCase("$player_max_hp"))
                    return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_HP);
                if (val.equalsIgnoreCase("$player_max_mp"))
                    return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_MP);
                // try to find value out of item fields
                StatsSet set = getStatsSet();
                String field = set.getString(val.substring(1));
                if (field != null)
                {
                  return new LambdaConst(Double.parseDouble(getValue(field, template)));
                }
                // failed
                throw new IllegalArgumentException("Unknown value " + val);
            }
            else
            {
                return new LambdaConst(Double.parseDouble(val));
            }
        }
        LambdaCalc calc = new LambdaCalc();
        n = n.getFirstChild();
        while (n != null && n.getNodeType() != Node.ELEMENT_NODE)
View Full Code Here

Examples of net.sf.l2j.gameserver.skills.funcs.LambdaConst

    {
      // make sure the boni are not applyed twice..
      if (_active) return;

      for (int i=0; i < _stats.length; i++)
        ((L2Character)player).addStatFunc(new FuncAdd(_stats[i], 0x40, this, new LambdaConst(_values[i])));

      _active = true;
    }
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.