Examples of EnchantResult


Examples of com.l2jfrozen.gameserver.network.serverpackets.EnchantResult

    // Like L2OFF enchant window must close
    if(player.getActiveEnchantItem() != null)
    {
      sendPacket(new SystemMessage(SystemMessageId.ENCHANT_SCROLL_CANCELLED));
      player.sendPacket(new EnchantResult(0));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    // Weight limit Check
View Full Code Here

Examples of com.l2jfrozen.gameserver.network.serverpackets.EnchantResult

    StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
    activeChar.sendPacket(su);
    su = null;

    activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this...
    activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item
    activeChar.broadcastUserInfo();
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.network.serverpackets.EnchantResult

    }
   
    // Like L2OFF the enchant window will close
    if (activeChar.getActiveEnchantItem() != null)
    {
      activeChar.sendPacket(new EnchantResult(0));
      activeChar.setActiveEnchantItem(null);
    }
   
    if (_targetX == _originX && _targetY == _originY && _targetZ == _originZ)
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.network.serverpackets.EnchantResult

    // Like L2OFF enchant window must close
    if(player.getActiveEnchantItem() != null)
    {
      sendPacket(new SystemMessage(SystemMessageId.ENCHANT_SCROLL_CANCELLED));
      player.sendPacket(new EnchantResult(0));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    // Freight price from config or normal price per item slot (30)
View Full Code Here

Examples of com.l2jfrozen.gameserver.network.serverpackets.EnchantResult

  @Override
  public void onBypassFeedback(L2PcInstance player, String command)
  {
    // Like L2OFF if you have enchant window opened it will be closed
    if(player.getActiveEnchantItem() != null)
      player.sendPacket(new EnchantResult(0));

    if(command.startsWith("WithdrawP"))
    {
      showRetrieveWindow(player);
    }
View Full Code Here

Examples of l2p.gameserver.serverpackets.EnchantResult

            count = 1;
          }
          crystalsToAdd.setCount(count);
          inventory.addItem(crystalsToAdd);
          Log.LogItem(activeChar, Log.Sys_GetItem, crystalsToAdd);
          activeChar.sendPacket(new EnchantResult(1, crystalsToAdd.getItemId(), count), SystemMessage.obtainItems(crystalId, count, 0));
        }
        else
        {
          activeChar.sendPacket(EnchantResult.FAILED_NO_CRYSTALS);
        }
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.EnchantResult

        if (item.isWeapon())

          WorldStatisticsManager.getInstance().updateStat(player, CategoryType.WEAPON_ENCHANT_MAX, item.getCrystalType().ordinal(), item.getEnchantLevel());

        player.sendPacket(new EnchantResult(0, 0, 0L, item.getEnchantLevel()));

        if (Config.SHOW_ENCHANT_EFFECT_RESULT)
        {
          player.broadcastPacket(new L2GameServerPacket[] { new SystemMessage(3013).addName(player).addNumber(item.getEnchantLevel()).addItemName(item.getItemId()) });
          player.broadcastPacket(new L2GameServerPacket[] { new MagicSkillUse(player, player, 5965, 1, 500, 1500L) });
        }
      }
      else
      {
        switch (esi.getType())
        {
          case NORMAL:
            if (item.isEquipped())
            {
              player.sendDisarmMessage(item);
            }
            if (!inventory.destroyItem(item, 1L))
            {
              player.sendActionFailed();
              return;
            }
            int crystalId = item.getCrystalType().cry;
            if ((crystalId > 0) && (item.getTemplate().getCrystalCount() > 0))
            {
              int crystalAmount = (int) (item.getTemplate().getCrystalCount() * 0.87D);
              if (item.getEnchantLevel() > 3)
              {
                crystalAmount = (int) (crystalAmount + (item.getTemplate().getCrystalCount() * 0.25D * (item.getEnchantLevel() - 3)));
              }
              if (crystalAmount < 1)
              {
                crystalAmount = 1;
              }
              player.sendPacket(new EnchantResult(1, crystalId, crystalAmount));
              ItemFunctions.addItem(player, crystalId, crystalAmount, true);
            }
            else
            {
              player.sendPacket(EnchantResult.FAILED_NO_CRYSTALS);
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.EnchantResult

        StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
        su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
        activeChar.sendPacket(su);     
        su = null;
       
        activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this...
        activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item
        activeChar.broadcastUserInfo();
    }
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.