Examples of FuncTemplate


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

    Stats stat = Stats.valueOfXml(n.getAttributes().getNamedItem("stat").getNodeValue());
    String order = n.getAttributes().getNamedItem("order").getNodeValue();
    Lambda lambda = getLambda(n, template);
    int ord = Integer.decode(getValue(order, template));
    Condition applayCond = parseCondition(n.getFirstChild(), template);
    FuncTemplate ft = new FuncTemplate(attachCond, applayCond, name, stat, ord, lambda);
    if(template instanceof L2Item)
    {
      ((L2Item) template).attach(ft);
    }
    else if(template instanceof L2Skill)
View Full Code Here

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

    String name = n.getNodeName();
    TextBuilder sb = new TextBuilder(name);
    sb.setCharAt(0, Character.toUpperCase(name.charAt(0)));
    name = sb.toString();
    Lambda lambda = getLambda(n, template);
    FuncTemplate ft = new FuncTemplate(null, null, name, null, calc.funcs.length, lambda);
    calc.addFunc(ft.getFunc(new Env(), calc));
  }
View Full Code Here

Examples of l2p.gameserver.skills.funcs.FuncTemplate

      }
      return;
    }
    if(_enchantAttributeFuncTemplate == null)
    {
      _enchantAttributeFuncTemplate = new FuncTemplate(null, _itemTemplate instanceof L2Weapon ? "Add" : "Sub", stat, 0x40, value);
      attachFunction(_enchantAttributeFuncTemplate);
    }
    else
    {
      _enchantAttributeFuncTemplate._stat = stat;
View Full Code Here

Examples of l2p.gameserver.skills.funcs.FuncTemplate

    double val = 0;
    if(n.getAttributes().getNamedItem("val") != null)
    {
      val = parseNumber(n.getAttributes().getNamedItem("val").getNodeValue()).doubleValue();
    }
    FuncTemplate ft = new FuncTemplate(applyCond, name, stat, ord, val);
    if(template instanceof L2Item)
    {
      ((L2Item) template).attachFunction(ft);
    }
    else if(template instanceof L2Skill)
View Full Code Here

Examples of l2p.gameserver.skills.funcs.FuncTemplate

    {
      _enchant4Skill = SkillTable.getInstance().getInfo(sId, sLv);
    }
    if(_pDef > 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.POWER_DEFENCE, 0x10, _pDef));
    }
    if(_mDef > 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.MAGIC_DEFENCE, 0x10, _mDef));
    }
    if(_mpBonus > 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.MAX_MP, 0x10, _mpBonus));
    }
    if(_evsmod != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.EVASION_RATE, 0x10, _evsmod));
    }
    if(_crystalType != Grade.NONE)
    {
      if(_pDef > 0)
      {
        attachFunction(new FuncTemplate(null, "Enchant", Stats.POWER_DEFENCE, 0x0C, 0));
        if(set.getInteger("type2") == L2Item.TYPE2_SHIELD_ARMOR)
        {
          attachFunction(new FuncTemplate(null, "Enchant", Stats.MAX_HP, 0x80, 0));
        }
      }
      if(_mDef > 0)
      {
        attachFunction(new FuncTemplate(null, "Enchant", Stats.MAGIC_DEFENCE, 0x0C, 0));
      }
    }
  }
View Full Code Here

Examples of l2p.gameserver.skills.funcs.FuncTemplate

    {
      _enchant4Skill = SkillTable.getInstance().getInfo(3426, 1);
    } // Maximum Ability
    if(_pDam != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.POWER_ATTACK, 0x10, _pDam));
    }
    if(_mDam != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.MAGIC_ATTACK, 0x10, _mDam));
    }
    if(_critical != 0)
    {
      attachFunction(new FuncTemplate(null, "Set", Stats.CRITICAL_BASE, 0x08, _critical * 10));
    }
    if(_aSpd != 0)
    {
      attachFunction(new FuncTemplate(null, "Set", Stats.ATK_BASE, 0x08, _aSpd));
    }
    if(_sDef != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.SHIELD_DEFENCE, 0x10, _sDef));
    }
    if(_accmod != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.ACCURACY_COMBAT, 0x10, _accmod));
    }
    if(_evsmod != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.EVASION_RATE, 0x10, _evsmod));
    }
    if(_rShld != 0)
    {
      attachFunction(new FuncTemplate(null, "Add", Stats.SHIELD_RATE, 0x10, _rShld));
    }
    if(_crystalType != Grade.NONE)
    {
      if(_sDef > 0)
      {
        attachFunction(new FuncTemplate(null, "Enchant", Stats.SHIELD_DEFENCE, 0x0C, 0));
        if(set.getInteger("type2") == L2Item.TYPE2_SHIELD_ARMOR)
        {
          attachFunction(new FuncTemplate(null, "Enchant", Stats.MAX_HP, 0x80, 0));
        }
      }
      if(_pDam > 0)
      {
        attachFunction(new FuncTemplate(null, "Enchant", Stats.POWER_ATTACK, 0x0C, 0));
      }
      if(_mDam > 0)
      {
        attachFunction(new FuncTemplate(null, "Enchant", Stats.MAGIC_ATTACK, 0x0C, 0));
      }
    }
  }
View Full Code Here

Examples of lineage2.gameserver.stats.funcs.FuncTemplate

    double val = 0;
    if (n.attributeValue("value") != null)
    {
      val = parseNumber(n.attributeValue("value")).doubleValue();
    }
    template.attachFunc(new FuncTemplate(applyCond, name, stat, ord, val));
  }
View Full Code Here

Examples of lineage2.gameserver.stats.funcs.FuncTemplate

    double val = 0;
    if (n.getAttributes().getNamedItem("val") != null)
    {
      val = parseNumber(n.getAttributes().getNamedItem("val").getNodeValue()).doubleValue();
    }
    template.attachFunc(new FuncTemplate(applyCond, name, stat, ord, val));
  }
View Full Code Here

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

        Stats stat = Stats.valueOfXml(n.getAttributes().getNamedItem("stat").getNodeValue());
        String order = n.getAttributes().getNamedItem("order").getNodeValue();
        Lambda lambda = getLambda(n, template);
        int ord = Integer.decode(getValue(order, template));
        Condition applayCond = parseCondition(n.getFirstChild(), template);
        FuncTemplate ft = new FuncTemplate(attachCond, applayCond, name, stat, ord, lambda);
        if (template instanceof L2Item) ((L2Item) template).attach(ft);
        else if (template instanceof L2Skill) ((L2Skill) template).attach(ft);
        else if (template instanceof EffectTemplate) ((EffectTemplate) template).attach(ft);
    }
View Full Code Here

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

        String name = n.getNodeName();
        TextBuilder sb = new TextBuilder(name);
        sb.setCharAt(0, Character.toUpperCase(name.charAt(0)));
        name = sb.toString();
        Lambda lambda = getLambda(n, template);
        FuncTemplate ft = new FuncTemplate(null, null, name, null, calc.funcs.length, lambda);
        calc.addFunc(ft.getFunc(new Env(), calc));
    }
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.