Package lineage2.gameserver.templates.item

Examples of lineage2.gameserver.templates.item.WeaponTemplate


   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
View Full Code Here


  {
    if (npcId != actor.getDisplayId())
    {
      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
        {
View Full Code Here

          break;
        case 30:
        case 20:
        case 10:
        case 5:
          Announcements.getInstance().announceToAll(new SystemMessage(SystemMessage.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS__PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT).addNumber(shutdownCounter));
          break;
        case 0:
          switch (shutdownMode)
          {
            case SHUTDOWN:
View Full Code Here

    {
      return;
    }
    if (!Config.ALT_ALLOW_SHADOW_WEAPONS)
    {
      show(new CustomMessage("common.Disabled", player), player);
      return;
    }
    if ((player.getLevel() > 19) || (player.getClassLevel() > 1))
    {
      show("Your level is too high!", player);
View Full Code Here

    {
      return;
    }
    if (!Config.ALT_ALLOW_SHADOW_WEAPONS)
    {
      show(new CustomMessage("common.Disabled", player), player);
      return;
    }
    if ((player.getLevel() > 39) || (player.getClassLevel() > 2))
    {
      show("Your level is too high!", player);
View Full Code Here

      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
    }
    else
    {
      _log.info("Telnet server is currently disabled.");
    }
View Full Code Here

      _selectorThreads[i].start();
    }
    LoginServerCommunication.getInstance().start();
    if (Config.SERVICES_OFFLINE_TRADE_RESTORE_AFTER_RESTART)
    {
      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
View Full Code Here

    DuelEvent duelEvent = getEvent(DuelEvent.class);
    if ((duelEvent != null) && (target.getEvent(DuelEvent.class) != duelEvent))
    {
      duelEvent.abortDuel(getPlayer());
    }
    WeaponTemplate weaponItem = getActiveWeaponItem();
    if ((weaponItem != null) && ((weaponItem.getItemType() == WeaponType.BOW) || (weaponItem.getItemType() == WeaponType.CROSSBOW)))
    {
      double bowMpConsume = weaponItem.getMpConsume();
      if (bowMpConsume > 0)
      {
        double chance = calcStat(Stats.MP_USE_BOW_CHANCE, 0., target, null);
        if ((chance > 0) && Rnd.chance(chance))
        {
View Full Code Here

     * @param env Env
     */
    @Override
    public void calc(Env env)
    {
      WeaponTemplate weapon = env.character.getActiveWeaponItem();
      if (weapon != null)
      {
        env.value += weapon.getAttackRange();
      }
    }
View Full Code Here

      if (env.target.isRaid() && ((env.character.getLevel() - env.target.getLevel()) > Config.RAID_MAX_LEVEL_DIFF))
      {
        env.value = 1;
        return;
      }
      WeaponTemplate weapon = env.character.getActiveWeaponItem();
      if (weapon == null)
      {
        env.value *= 0.01 * env.target.calcStat(Stats.FIST_WPN_VULNERABILITY, env.character, env.skill);
      }
      else if (weapon.getItemType().getDefence() != null)
      {
        env.value *= 0.01 * env.target.calcStat(weapon.getItemType().getDefence(), env.character, env.skill);
      }
      env.value = Formulas.calcDamageResists(env.skill, env.character, env.target, env.value);
    }
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.