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

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


        L2Clan clan = activeChar.getClan();
        if (clan == null) return;

        if((activeChar.getClanPrivileges() & L2Clan.CP_CL_MASTER_RIGHTS) != L2Clan.CP_CL_MASTER_RIGHTS)
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_THE_RIGHT_TO_DISMISS_AN_APPRENTICE));
          return;
        }

        L2ClanMember currentMember = clan.getClanMember(_currPlayerName);
        L2ClanMember targetMember = clan.getClanMember(_targetPlayerName);
View Full Code Here


          sm = new SystemMessage(SystemMessageId.S2_HAS_BEEN_DESIGNATED_AS_APPRENTICE_OF_CLAN_MEMBER_S1);
        }
        sm.addString(sponsorMember.getName());
      sm.addString(apprenticeMember.getName());
      if (sponsor != activeChar && sponsor != apprentice) activeChar.sendPacket(sm);
      if (sponsor != null) sponsor.sendPacket(sm);
      if (apprentice != null) apprentice.sendPacket(sm);
    }
   
    @Override
    public String getType()
View Full Code Here

        int itemId = item.getItemId();

        if (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;
          return;
        }

        // Check if Blessed Spiritshot can be used
View Full Code Here

        // Check if Blessed 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 Blessed Spiritshot is already active (it can be charged over Spiritshot)
        if (weaponInst.getChargedSpiritshot() != L2ItemInstance.CHARGED_NONE) return;
View Full Code Here

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

        // Consume Blessed 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

      switch (_mana)
      {
        case 10:
          sm = new SystemMessage(SystemMessageId.S1S_REMAINING_MANA_IS_NOW_10);
          sm.addString(getItemName());
          player.sendPacket(sm);
          break;
        case 5:
          sm = new SystemMessage(SystemMessageId.S1S_REMAINING_MANA_IS_NOW_5);
          sm.addString(getItemName());
          player.sendPacket(sm);
View Full Code Here

          player.sendPacket(sm);
          break;
        case 5:
          sm = new SystemMessage(SystemMessageId.S1S_REMAINING_MANA_IS_NOW_5);
          sm.addString(getItemName());
          player.sendPacket(sm);
          break;
        case 1:
          sm = new SystemMessage(SystemMessageId.S1S_REMAINING_MANA_IS_NOW_1);
          sm.addString(getItemName());
          player.sendPacket(sm);
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 Blessed Spiritshot
        weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);
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.