Package l2p.util

Examples of l2p.util.Crontab


  {
//    if(player.isGM())
//    {
//      return 0;
//    }
    Crontab resetReuse = getResetReuseByName(name);
    if(resetReuse == null)
    {
      return 0;
    }
    String var = player.getVar(name);
    if(var == null)
    {
      return 0;
    }
    return (int) Math.max((resetReuse.timeNextUsage(Long.parseLong(var)) - System.currentTimeMillis()) / 60000, 0);
  }
View Full Code Here


      }
      Document doc = factory.newDocumentBuilder().parse(file);
      NamedNodeMap attrs;
      Integer instanceId;
      String name;
      Crontab resetReuse; // Сброс реюза по умолчанию в каждые сутки в 0:00
      int timelimit = -1;
      boolean dispellBuffs;
      Integer roomId;
      int mobId, doorId, respawn, respawnRnd, count;
      // 0 - точечный, в каждой указанной точке; 1 - один точечный спаун в рандомной точке; 2 - локационный
      int spawnType;
      L2Spawn spawnDat;
      L2NpcTemplate template;
      L2DoorInstance door;
      InstancedZone instancedZone;
      for(Node iz = doc.getFirstChild(); iz != null; iz = iz.getNextSibling())
      {
        if("list".equalsIgnoreCase(iz.getNodeName()))
        {
          for(Node area = iz.getFirstChild(); area != null; area = area.getNextSibling())
          {
            if("instance".equalsIgnoreCase(area.getNodeName()))
            {
              attrs = area.getAttributes();
              instanceId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
              name = attrs.getNamedItem("name").getNodeValue();
              if(!_names.contains(name))
              {
                _names.add(name);
              }
              resetReuse = new Crontab(attrs.getNamedItem("resetReuse").getNodeValue());
              Node nodeTimelimit = attrs.getNamedItem("timelimit");
              if(nodeTimelimit != null)
              {
                timelimit = Integer.parseInt(nodeTimelimit.getNodeValue());
              }
View Full Code Here

TOP

Related Classes of l2p.util.Crontab

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.