Package com.l2jfrozen.gameserver.skills

Examples of com.l2jfrozen.gameserver.skills.Calculator


      for(int i = 0; i < Stats.NUM_STATS; i++)
      {
        if(NPC_STD_CALCULATOR[i] != null)
        {
          _calculators[i] = new Calculator(NPC_STD_CALCULATOR[i]);
        }
      }
    }

    // Select the Calculator of the affected state in the Calculator set
    int stat = f.stat.ordinal();

    if(_calculators[stat] == null)
    {
      _calculators[stat] = new Calculator();
    }

    // Add the Func to the calculator corresponding to the state
    _calculators[stat].addFunc(f);
View Full Code Here


    if(_activeChar == null)
      return init;

    int id = stat.ordinal();

    Calculator c = _activeChar.getCalculators()[id];

    // If no Func object found, no modifier is applied
    if(c == null || c.size() == 0)
      return init;

    // Create and init an Env object to pass parameters to the Calculator
    Env env = new Env();
    env.player = _activeChar;
    env.target = target;
    env.skill = skill;
    env.value = init;
    env.baseValue = init;

    // Launch the calculation
    c.calc(env);
    // avoid some troubles with negative stats (some stats should never be
    // negative)
    if(env.value <= 0)
    {
      switch(stat)
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.skills.Calculator

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.