/**
   * Actions:
   *
   * <ul>
   *   <li>Check if the killing object is a player, and then find the party they belong to.
   *   <li>Add a blood offering item to the leader of the party.
   *   <li>Update the party leader's inventory to show the new item addition.
   * </ul>
   */
  @Override
  public void doItemDrop(L2Character lastAttacker) {
    L2PcInstance killingChar = null;

    if (!(lastAttacker instanceof L2PcInstance)) {
      return;
    }

    killingChar = (L2PcInstance) lastAttacker;
    L2Party associatedParty = killingChar.getParty();

    if (associatedParty == null) {
      return;
    }

    L2PcInstance partyLeader = associatedParty.getLeader();
    L2ItemInstance addedOfferings =
        partyLeader
            .getInventory()
            .addItem(
                "Sign",
                SevenSignsFestival.FESTIVAL_OFFERING_ID,
                _bonusMultiplier,
                partyLeader,
                this);

    InventoryUpdate iu = new InventoryUpdate();

    if (addedOfferings.getCount() != _bonusMultiplier) {
      iu.addModifiedItem(addedOfferings);
    } else {
      iu.addNewItem(addedOfferings);
    }

    partyLeader.sendPacket(iu);

    super.doItemDrop(lastAttacker); // Normal drop
  }
Exemplo n.º 2
0
 @Override
 public void onSpawn() {
   setIsNoRndWalk(true);
   super.onSpawn();
 }
Exemplo n.º 3
0
 /**
  * Reduce the current HP of the L2Attackable, update its _aggroList and launch the doDie Task if
  * necessary.<br>
  * <br>
  */
 @Override
 public void reduceCurrentHp(double damage, L2Character attacker, boolean awake) {
   super.reduceCurrentHp(damage, attacker, awake);
 }
Exemplo n.º 4
0
 @Override
 public void onSpawn() {
   super.onSpawn();
 }