Package lineage2.gameserver.templates.item

Examples of lineage2.gameserver.templates.item.WeaponTemplate


    if (player.getAutoSoulShot().contains(FishshotId))
    {
      isAutoSoulShot = true;
    }
    final ItemInstance weaponInst = player.getActiveWeaponInstance();
    final WeaponTemplate weaponItem = player.getActiveWeaponItem();
    if ((weaponInst == null) || (weaponItem.getItemType() != WeaponType.ROD))
    {
      if (!isAutoSoulShot)
      {
        player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
      }
      return false;
    }
    if (weaponInst.getChargedFishshot())
    {
      return false;
    }
    if (item.getCount() < 1)
    {
      if (isAutoSoulShot)
      {
        player.removeAutoSoulShot(FishshotId);
        player.sendPacket(new ExAutoSoulShot(FishshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(item.getName()));
        return false;
      }
      player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);
      return false;
    }
    final int grade = weaponItem.getCrystalType().externalOrdinal;
    if (((grade == 0) && (FishshotId != 6535)) || ((grade == 1) && (FishshotId != 6536)) || ((grade == 2) && (FishshotId != 6537)) || ((grade == 3) && (FishshotId != 6538)) || ((grade == 4) && (FishshotId != 6539)) || ((grade == 5) && (FishshotId != 6540)))
    {
      if (isAutoSoulShot)
      {
        return false;
View Full Code Here


   * @return int
   */
  @Override
  public int getRandomDamage()
  {
    WeaponTemplate weaponItem = getActiveWeaponItem();
    if (weaponItem == null)
    {
      return getTemplate().getBaseRandDam();
    }
    return weaponItem.getRandomDamage();
  }
View Full Code Here

    {
      return false;
    }
    final Player player = (Player) playable;
    final ItemInstance weaponInst = player.getActiveWeaponInstance();
    final WeaponTemplate weaponItem = player.getActiveWeaponItem();
    final int SoulshotId = item.getItemId();
    boolean isAutoSoulShot = false;
    if (player.getAutoSoulShot().contains(SoulshotId))
    {
      isAutoSoulShot = true;
    }
    if (weaponInst == null)
    {
      if (!isAutoSoulShot)
      {
        player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
      }
      return false;
    }
    if (weaponInst.getChargedSpiritshot() == ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
    {
      return false;
    }
    final int spiritshotId = item.getItemId();
    final int grade = weaponItem.getCrystalType().externalOrdinal;
    final int blessedsoulSpiritConsumption = weaponItem.getSpiritShotCount();
    if (blessedsoulSpiritConsumption == 0)
    {
      if (isAutoSoulShot)
      {
        player.removeAutoSoulShot(SoulshotId);
View Full Code Here

    {
      return false;
    }
    final Player player = (Player) playable;
    final ItemInstance weaponInst = player.getActiveWeaponInstance();
    final WeaponTemplate weaponItem = player.getActiveWeaponItem();
    final int SoulshotId = item.getItemId();
    boolean isAutoSoulShot = false;
    if (player.getAutoSoulShot().contains(SoulshotId))
    {
      isAutoSoulShot = true;
    }
    if (weaponInst == null)
    {
      if (!isAutoSoulShot)
      {
        player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
      }
      return false;
    }
    if (weaponInst.getChargedSpiritshot() != ItemInstance.CHARGED_NONE)
    {
      return false;
    }
    final int SpiritshotId = item.getItemId();
    final int grade = weaponItem.getCrystalType().externalOrdinal;
    final int soulSpiritConsumption = weaponItem.getSpiritShotCount();
    final long count = item.getCount();
    if (soulSpiritConsumption == 0)
    {
      if (isAutoSoulShot)
      {
View Full Code Here

   * @param template NpcTemplate
   */
  public Kama26BossInstance(int objectId, NpcTemplate template)
  {
    super(objectId, template);
    getMinionList().addMinion(new MinionData(18556, 1));
  }
View Full Code Here

    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
        if (template != null)
        {
          final NpcInstance a = template.getNewInstance();
          a.setCurrentHpMp(a.getMaxHp(), a.getMaxMp());
          a.spawnMe(actor.getLoc());
        }
      }
    }, 10000L);
View Full Code Here

      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
View Full Code Here

      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
    {
      if (player != null)
      {
        player.teleToLocation(new Location(207559, 86429, -1000));
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.item.WeaponTemplate

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.