public static void load() {
    PerformanceTimer timer = new PerformanceTimer();
    System.out.print("loading TreasureBox...");
    try {
      JAXBContext context = JAXBContext.newInstance(L1TreasureBox.TreasureBoxList.class);

      Unmarshaller um = context.createUnmarshaller();

      File file = new File(PATH);
      TreasureBoxList list = (TreasureBoxList) um.unmarshal(file);

      for (L1TreasureBox each : list) {
        each.init();
        _dataMap.put(each.getBoxId(), each);
      }
    } catch (Exception e) {
      _log.log(Level.SEVERE, PATH + "のロードに失敗。", e);
      System.exit(0);
    }
    System.out.println("OK! " + timer.elapsedTimeMillis() + "ms");
  }
Esempio n. 2
0
 private AutoShopBuyTable() {
   PerformanceTimer timer = new PerformanceTimer();
   System.out.print("[AutoShopBuyTable] loading AutoShopBuyItemPrice...");
   weaponAddDamage();
   System.out.println("OK! " + timer.get() + " ms");
 }