Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Player.calcStat()


      {
        int damage = Math.min(reward._dmg, maxHp);
        if(damage > 0)
        {
          double[] xpsp = calculateExpAndSp(attacker, attacker.getLevel(), damage);
          double neededExp = attacker.calcStat(Stats.SOULS_CONSUME_EXP, 0, this, null); // Начисление душ камаэлянам
          if(neededExp > 0 && xpsp[0] > neededExp)
          {
            broadcastPacket(new SpawnEmitter(this, attacker));
            ThreadPoolManager.getInstance().scheduleGeneral(new SoulConsumeTask(attacker), 1000);
          }
View Full Code Here


      {
        return Msg.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM;
      }
      // Проверяем на количество слотов и одинаковые талисманы
      int talismans_count = 0;
      int max = (int) owner.calcStat(Stats.TALISMANS_LIMIT, 0, null, null);
      for(int slot = PAPERDOLL_DECO1; slot <= PAPERDOLL_DECO6; slot++)
      {
        if(_paperdoll[slot] != null && (_paperdoll[slot].getItemId() == itemId || ++talismans_count >= max))
        {
          return Msg.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM;
View Full Code Here

      player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
      return;
    }
    if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)
    {
      int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
      if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
      {
        soulShotConsumption = newSS;
      }
    }
View Full Code Here

      return;
    }
    if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)
    {
      int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
      if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
      {
        soulShotConsumption = newSS;
      }
    }
    if(count < soulShotConsumption)
View Full Code Here

      return false;
    }
    double manaDam = calc();
    if(getSkill().isMagic())
    {
      manaDam = player.calcStat(Stats.MP_MAGIC_SKILL_CONSUME, manaDam, null, getSkill());
    }
    else
    {
      manaDam = player.calcStat(Stats.MP_PHYSICAL_SKILL_CONSUME, manaDam, null, getSkill());
    }
View Full Code Here

    {
      manaDam = player.calcStat(Stats.MP_MAGIC_SKILL_CONSUME, manaDam, null, getSkill());
    }
    else
    {
      manaDam = player.calcStat(Stats.MP_PHYSICAL_SKILL_CONSUME, manaDam, null, getSkill());
    }
    if(manaDam > player.getCurrentMp() && getSkill().isToggle())
    {
      player.sendPacket(Msg.NOT_ENOUGH_MP, new SystemMessage(SystemMessage.THE_EFFECT_OF_S1_HAS_BEEN_REMOVED).addSkillName(getSkill().getId(), getSkill().getDisplayLevel()));
      player.setRelax(false);
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.