Esempio n. 1
0
  private void kill(L2PcInstance activeChar, L2Character target) {
    if (target instanceof L2PcInstance) {
      if (!target.isGM()) {
        target.stopAllEffects(); // e.g. invincibility effect
      }
      target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar, null);
    } else {
      boolean targetIsInvul = false;
      if (target.isInvul()) {
        targetIsInvul = true;
        target.setIsInvul(false);
      }

      target.reduceCurrentHp(target.getMaxHp() + 1, activeChar, null);

      if (targetIsInvul) {
        target.setIsInvul(true);
      }
    }
    if (Config.DEBUG) {
      _log.log(
          Level.DEBUG,
          "GM: "
              + activeChar.getName()
              + '('
              + activeChar.getObjectId()
              + ')'
              + " killed character "
              + target.getObjectId());
    }
  }
Esempio n. 2
0
 public FlyToLocation(
     L2Character cha,
     int destX,
     int destY,
     int destZ,
     FlyType type,
     int flySpeed,
     int flyDelay,
     int animationSpeed) {
   _chaObjId = cha.getObjectId();
   _chaX = cha.getX();
   _chaY = cha.getY();
   _chaZ = cha.getZ();
   _destX = destX;
   _destY = destY;
   _destZ = destZ;
   _type = type;
   _flySpeed = flySpeed;
   _flyDelay = flyDelay;
   _animationSpeed = animationSpeed;
 }
Esempio n. 3
0
 public VehicleStart(L2Character boat, int state) {
   _objectId = boat.getObjectId();
   _state = state;
 }