Package net.sf.l2j.gameserver.serverpackets

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


                  if (_itemId < 6535 || _itemId > 6540) {
                      // Attempt to charge first shot on activation
                      if (_itemId == 6645 || _itemId == 6646 || _itemId == 6647)
                      {
                          activeChar.addAutoSoulShot(_itemId);
                          ExAutoSoulShot atk = new ExAutoSoulShot(_itemId, _type);
                          activeChar.sendPacket(atk);

                          //start the auto soulshot use
                          SystemMessage sm = new SystemMessage(SystemMessageId.USE_OF_S1_WILL_BE_AUTO);
                          sm.addString(item.getItemName());
                          activeChar.sendPacket(sm);
                          sm = null;

                          activeChar.rechargeAutoSoulShot(true, true, true);
                      }
                      else {
                        if (activeChar.getActiveWeaponItem() != activeChar.getFistsWeaponItem()
                            && item.getItem().getCrystalType() == activeChar.getActiveWeaponItem().getCrystalType())
                        {
                          if (_itemId>=3947 && _itemId<=3952 && activeChar.isInOlympiadMode()){
                            SystemMessage sm = new SystemMessage(SystemMessageId.THIS_ITEM_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT);
                            sm.addString(item.getItemName());
                            activeChar.sendPacket(sm);
                            sm = null;
                          }else{
                            activeChar.addAutoSoulShot(_itemId);
                            ExAutoSoulShot atk = new ExAutoSoulShot(_itemId, _type);
                            activeChar.sendPacket(atk);

                            // start the auto soulshot use
                            SystemMessage sm = new SystemMessage(SystemMessageId.USE_OF_S1_WILL_BE_AUTO);
                            sm.addString(item.getItemName());
                            activeChar.sendPacket(sm);
                            sm = null;

                            activeChar.rechargeAutoSoulShot(true, true, false);
                          }
                        }
                        else {
                          if ((_itemId >= 2509 && _itemId <= 2514) || (_itemId >= 3947 && _itemId <= 3952) || _itemId == 5790)
                            activeChar.sendPacket(new SystemMessage(SystemMessageId.SPIRITSHOTS_GRADE_MISMATCH));
                          else
                            activeChar.sendPacket(new SystemMessage(SystemMessageId.SOULSHOTS_GRADE_MISMATCH));
                        }
                      }
                    }
                }
                else if (_type == 0)
                {
                    activeChar.removeAutoSoulShot(_itemId);
                    ExAutoSoulShot atk = new ExAutoSoulShot(_itemId, _type);
                    activeChar.sendPacket(atk);

                    //cancel the auto soulshot use
                    SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                    sm.addString(item.getItemName());
View Full Code Here


        if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))
        {
            if(activeChar.getAutoSoulShot().containsKey(itemId))
            {
                activeChar.removeAutoSoulShot(itemId);
                activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));

                SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                sm.addString(item.getItem().getName());
                activeChar.sendPacket(sm);
            }
View Full Code Here

        if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))
    {
            if(activeChar.getAutoSoulShot().containsKey(itemId))
            {
                activeChar.removeAutoSoulShot(itemId);
                activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));

                SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                sm.addString(item.getItem().getName());
                activeChar.sendPacket(sm);
            }
View Full Code Here

        if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))
        {
            if (activeOwner.getAutoSoulShot().containsKey(itemId))
            {
                activeOwner.removeAutoSoulShot(itemId);
                activeOwner.sendPacket(new ExAutoSoulShot(itemId, 0));

                SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                sm.addString(item.getItem().getName());
                activeOwner.sendPacket(sm);
                return;
View Full Code Here

        if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))
        {
            if (activeOwner.getAutoSoulShot().containsKey(itemId))
            {
                activeOwner.removeAutoSoulShot(itemId);
                activeOwner.sendPacket(new ExAutoSoulShot(itemId, 0));

                SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                sm.addString(item.getItem().getName());
                activeOwner.sendPacket(sm);
                return;
View Full Code Here

          if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), SSCount, null, false))
          {
            if(activeChar.getAutoSoulShot().containsKey(itemId))
            {
              activeChar.removeAutoSoulShot(itemId);
              activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));

              SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
              sm.addString(item.getItem().getName());
              activeChar.sendPacket(sm);
            }
View Full Code Here

      L2ItemInstance item = _owner.getInventory().getItemByObjectId(old.getId());

          if ((item != null) && (item.getItemType() == L2EtcItemType.SHOT))
          {
            _owner.removeAutoSoulShot(item.getItemId());
              _owner.sendPacket(new ExAutoSoulShot(item.getItemId(), 0));
          }
    }

        _owner.sendPacket(new ShortCutInit(_owner));

        for (int shotId : _owner.getAutoSoulShot().values())
            _owner.sendPacket(new ExAutoSoulShot(shotId, 1));
    }
View Full Code Here

      {
        int _itemId = ss.getItemId();
       
        if ((((_itemId >= 2509) && (_itemId <= 2514)) || ((_itemId >= 3947) && (_itemId <= 3952)) || ((_itemId <= 1804) && (_itemId >= 1808)) || (_itemId == 5789) || (_itemId == 5790) || (_itemId == 1835)) && (ss.getItem().getCrystalType() == unequipped.getItem().getCrystalType()))
        {
          sendPacket(new ExAutoSoulShot(_itemId, 0));
         
          SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
          sm.addString(ss.getItemName());
          sendPacket(sm);
        }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.ExAutoSoulShot

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.