Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.sendPacket()


          player.getStat().removeExpAndSp(_requiredExp, _requiredSp);

          StatusUpdate su = new StatusUpdate(player.getObjectId());
          su.addAttribute(StatusUpdate.SP, player.getSp());
          player.sendPacket(su);

            SystemMessage ep = new SystemMessage(SystemMessageId.EXP_DECREASED_BY_S1);
            ep.addNumber(_requiredExp);
            sendPacket(ep);
View Full Code Here


            sp.addNumber(_requiredSp);
            sendPacket(sp);

          SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_SUCCEEDED_IN_ENCHANTING_THE_SKILL_S1);
          sm.addSkillName(_skillId);
          player.sendPacket(sm);
        }
        else
        {
          if (skill.getLevel() > 100)
          {
View Full Code Here

        // Check if Spiritshot can be used
        if (weaponInst == null || weaponItem.getSpiritShotCount() == 0)
        {
            if(!activeChar.getAutoSoulShot().containsKey(itemId))
                activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_USE_SPIRITSHOTS));
      return;
    }

        // Check if Spiritshot is already active
        if (weaponInst.getChargedSpiritshot() != L2ItemInstance.CHARGED_NONE) return;
View Full Code Here

            player.addSkill(SkillTable.getInstance().getInfo(_skillId, _skillLvl), true);
            player.sendSkillList();
          }
          SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_FAILED_TO_ENCHANT_THE_SKILL_S1);
          sm.addSkillName(_skillId);
          player.sendPacket(sm);
        }
        trainer.showEnchantSkillList(player, player.getClassId());

        // update all the shortcuts to this skill
        L2ShortCut[] allShortCuts = player.getAllShortCuts();
View Full Code Here

        for (L2ShortCut sc : allShortCuts)
        {
          if (sc.getId() == _skillId && sc.getType() == L2ShortCut.TYPE_SKILL)
          {
            L2ShortCut newsc = new L2ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), _skillLvl, 1);
            player.sendPacket(new ShortCutRegister(newsc));
            player.registerShortCut(newsc);
          }
        }
  }
View Full Code Here

        (weaponGrade == L2Item.CRYSTAL_B && itemId != 2512) ||
        (weaponGrade == L2Item.CRYSTAL_A && itemId != 2513) ||
        (weaponGrade == L2Item.CRYSTAL_S && itemId != 2514))
    {
            if(!activeChar.getAutoSoulShot().containsKey(itemId))
                activeChar.sendPacket(new SystemMessage(SystemMessageId.SPIRITSHOTS_GRADE_MISMATCH));
      return;
    }

        // Consume Spiritshot if player has enough of them
        if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))
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

                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);
            }
            else activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS));
      return;
    }
View Full Code Here

                SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                sm.addString(item.getItem().getName());
                activeChar.sendPacket(sm);
            }
            else activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS));
      return;
    }

        // Charge Spiritshot
    weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);
View Full Code Here

        // Charge Spiritshot
    weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);

        // Send message to client
    activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT));
        Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  }

  @Override
  public int[] getItemIds()
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.