Package lineage2.gameserver.model.instances

Examples of lineage2.gameserver.model.instances.NpcInstance.reduceCurrentHp()


            double targetCP = realTarget.getCurrentCp();
            if ((damage > targetCP) || !realTarget.isPlayer())
            {
              hp = (damage - targetCP) * _absorbPart;
            }
            realTarget.reduceCurrentHp(damage, reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
            if (!reflected)
            {
              realTarget.doCounterAttack(this, activeChar, false);
            }
          }
View Full Code Here


        if (getPower() > 0)
        {
          AttackInfo info = Formulas.calcPhysDam(activeChar, realTarget, this, false, false, ss, false);
          if (info.lethal_dmg > 0)
          {
            realTarget.reduceCurrentHp(info.lethal_dmg, info.reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
          }
          realTarget.reduceCurrentHp(info.damage, info.reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
          if (!reflected)
          {
            realTarget.doCounterAttack(this, activeChar, false);
View Full Code Here

          AttackInfo info = Formulas.calcPhysDam(activeChar, realTarget, this, false, false, ss, false);
          if (info.lethal_dmg > 0)
          {
            realTarget.reduceCurrentHp(info.lethal_dmg, info.reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
          }
          realTarget.reduceCurrentHp(info.damage, info.reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
          if (!reflected)
          {
            realTarget.doCounterAttack(this, activeChar, false);
          }
        }
View Full Code Here

      if (getPower() > 0)
      {
        AttackInfo info = Formulas.calcPhysDam(activeChar, realTarget, this, false, false, ss, false);
        if (info.lethal_dmg > 0)
        {
          realTarget.reduceCurrentHp(info.lethal_dmg, info.reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
        }
        realTarget.reduceCurrentHp(info.damage, info.reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
        if (!reflected)
        {
          realTarget.doCounterAttack(this, activeChar, false);
View Full Code Here

        AttackInfo info = Formulas.calcPhysDam(activeChar, realTarget, this, false, false, ss, false);
        if (info.lethal_dmg > 0)
        {
          realTarget.reduceCurrentHp(info.lethal_dmg, info.reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
        }
        realTarget.reduceCurrentHp(info.damage, info.reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
        if (!reflected)
        {
          realTarget.doCounterAttack(this, activeChar, false);
        }
      }
View Full Code Here

        obj = plyr;
      }
      if ((obj != null) && obj.isCreature())
      {
        Creature target = (Creature) obj;
        target.reduceCurrentHp(target.getMaxHp() + 1, 0, activeChar, null, true, true, true, false, false, false, true);
      }
      else
      {
        activeChar.sendPacket(Msg.INVALID_TARGET);
      }
View Full Code Here

    {
      activeChar.sendPacket(Msg.INVALID_TARGET);
      return;
    }
    Creature cha = (Creature) obj;
    cha.reduceCurrentHp(damage, 0, activeChar, null, true, true, false, false, false, false, true);
    activeChar.sendMessage("You gave " + damage + " damage to " + cha.getName() + ".");
  }
}
View Full Code Here

          {
            Location loc = Location.findAroundPosition(177134, -18807, -2256, 50, 100, npc.getGeoIndex());
            npc.teleToLocation(loc);
            if (npc == GustavInstance.this)
            {
              npc.reduceCurrentHp(npc.getCurrentHp(), 0, npc, null, false, false, false, false, false, false, false);
            }
          }
        }, 10000L);
      }
    }
View Full Code Here

     */
    @Override
    public void runImpl()
    {
      final NpcInstance actor = getActor();
      actor.reduceCurrentHp(500, 0, actor, null, true, false, true, false, false, false, false);
    }
  }
 
  /**
   * @author Mobius
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.