Package com.l2jfrozen.gameserver.model.actor.stat

Examples of com.l2jfrozen.gameserver.model.actor.stat.CharStat


   */
  public CharStat getStat()
  {
    if(_stat == null)
    {
      _stat = new CharStat(this);
    }

    return _stat;
  }
View Full Code Here


    @Override
    public void run()
    {
      try
      {
        final CharStat charstat = getActiveChar().getStat();

        // Modify the current CP of the L2Character and broadcast Server->Client packet StatusUpdate
        if(getCurrentCp() < charstat.getMaxCp())
        {
          setCurrentCp(getCurrentCp() + Formulas.calcCpRegen(getActiveChar()), false);
        }

        // Modify the current HP of the L2Character and broadcast Server->Client packet StatusUpdate
        if(getCurrentHp() < charstat.getMaxHp())
        {
          setCurrentHp(getCurrentHp() + Formulas.calcHpRegen(getActiveChar()), false);
        }

        // Modify the current MP of the L2Character and broadcast Server->Client packet StatusUpdate
        if(getCurrentMp() < charstat.getMaxMp())
        {
          setCurrentMp(getCurrentMp() + Formulas.calcMpRegen(getActiveChar()), false);
        }

        if(!getActiveChar().isInActiveRegion())
        {
          // no broadcast necessary for characters that are in inactive regions.
          // stop regeneration for characters who are filled up and in an inactive region.
          if(getCurrentCp() == charstat.getMaxCp() && getCurrentHp() == charstat.getMaxHp() && getCurrentMp() == charstat.getMaxMp())
          {
            stopHpMpRegeneration();
          }
        }
        else
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.actor.stat.CharStat

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.