Package l2p.gameserver.skills

Examples of l2p.gameserver.skills.Calculator


    _calculators = new Calculator[Stats.NUM_STATS];
    if(isPlayer())
    {
      for(Stats stat : Stats.values())
      {
        _calculators[stat.ordinal()] = new Calculator(stat, this);
      }
    }
    if(template != null && (isNpc() || this instanceof L2Summon))
    {
      if(((L2NpcTemplate) template).getSkills().size() > 0)
View Full Code Here


      return;
    }
    int stat = f._stat.ordinal();
    if(_calculators[stat] == null)
    {
      _calculators[stat] = new Calculator(f._stat, this);
    }
    _calculators[stat].addFunc(f);
  }
View Full Code Here

      return;
    }
    int stat = l._stat.ordinal();
    if(_calculators[stat] == null)
    {
      _calculators[stat] = new Calculator(l._stat, this);
    }
    _calculators[l._stat.ordinal()].addListener(l);
  }
View Full Code Here

  }

  public final double calcStat(Stats stat, double init, L2Character object, L2Skill skill)
  {
    int id = stat.ordinal();
    Calculator c = _calculators[id];
    if(c == null)
    {
      return init;
    }
    Env env = new Env();
    env.character = this;
    env.target = object;
    env.skill = skill;
    env.value = init;
    c.calc(env);
    return env.value;
  }
View Full Code Here

  public final double calcStat(Stats stat, L2Character object, L2Skill skill)
  {
    Env env = new Env(this, object, skill);
    stat.getInit().calc(env);
    int id = stat.ordinal();
    Calculator c = _calculators[id];
    if(c != null)
    {
      c.calc(env);
    }
    return env.value;
  }
View Full Code Here

    {
      dialog.append("None");
    }
    else
    {
      Calculator c = calculators[stat.ordinal()];
      Func[] funcs = c.getFunctions();
      for(int i = 0; i < funcs.length; i++)
      {
        if(funcs[i]._funcOwner != null)
        {
          dialog.append(funcs[i]._funcOwner.toString()).append(" [").append(Integer.toHexString(funcs[i]._order)).append("]<br1>");
View Full Code Here

TOP

Related Classes of l2p.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.