Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2DoorInstance.onOpen()


      return;
    }
    L2ItemInstance ri = player.getInventory().destroyItem(item, 1, true);
    player.sendPacket(SystemMessage.removeItems(ri.getItemId(), 1), new SystemMessage("l2p.gameserver.skills.skillclasses.Unlock.Success", player));
    door.openMe();
    door.onOpen();
  }

  public int[] getItemIds()
  {
    return _itemIds;
View Full Code Here


        {
          L2DoorInstance target = (L2DoorInstance) targ;
          if(!target.isOpen() && (target.key > 0 || Rnd.chance(_unlockPower - target.level * 100)))
          {
            target.openMe();
            target.onOpen();
          }
          else
          {
            activeChar.sendPacket(Msg.YOU_HAVE_FAILED_TO_UNLOCK_THE_DOOR);
          }
 
View Full Code Here

        {
          return;
        }
        if(target.isFake())
        {
          target.onOpen((L2Player) activeChar);
          return;
        }
        double chance = getActivateRate();
        double levelmod = (double) getMagicLevel() - target.getLevel();
        chance += levelmod * getLevelModifier();
 
View Full Code Here

          activeChar.sendMessage(new CustomMessage("l2p.gameserver.skills.skillclasses.Unlock.Chance", activeChar).addString(getName()).addNumber((long) chance));
        }
        if(Rnd.chance(chance))
        {
          activeChar.sendMessage(new CustomMessage("l2p.gameserver.skills.skillclasses.Unlock.Success", activeChar));
          target.onOpen((L2Player) activeChar);
        }
        else
        {
          activeChar.sendPacket(new SystemMessage(SystemMessage.S1_HAS_FAILED).addString(getName()));
          target.doDie(activeChar);
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.