コード例 #1
0
ファイル: TaskRecom.java プロジェクト: Hl4p3x/mobius-source
  /**
   * Method onTimeElapsed.
   *
   * @param task ExecutedTask
   */
  @Override
  public void onTimeElapsed(ExecutedTask task) {
    _log.info("Recommendation Global Task: launched.");

    for (Player player : GameObjectsStorage.getAllPlayersForIterate()) {
      player.restartRecom();
    }

    _log.info("Recommendation Global Task: completed.");
  }
コード例 #2
0
  @Override
  public void onBypassFeedback(Player player, String command) {
    if (!canBypassCheck(player, this)) {
      return;
    }

    if (command.startsWith("start1")) {
      Reflection r = player.getActiveReflection();
      if (r != null) {
        if (player.canReenterInstance(instanceId)) {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      } else if (player.canEnterInstance(193)) {
        ReflectionUtils.enterReflection(player, new AltarShilen(), instanceId);
      }
    } else if (command.startsWith("start2")) {

      for (Player party : GameObjectsStorage.getAllPlayersForIterate()) {
        party.unsetVar("Altar1");
        party.setVar("Altar2", "true", -1);
        party.teleToLocation(FLOOR2, player.getReflection());
      }
    } else if (command.startsWith("start3")) {
      for (Player party : GameObjectsStorage.getAllPlayersForIterate()) {
        party.unsetVar("Altar2");
        party.setVar("Altar3", "true", -1);
        party.teleToLocation(FLOOR3, player.getReflection());
      }

    } else if (command.startsWith("exit")) {
      for (Player party : GameObjectsStorage.getAllPlayersForIterate()) {
        party.unsetVar("Altar3");
        party.teleToLocation(OFF, 0);
      }
    } else {
      super.onBypassFeedback(player, command);
    }
  }
コード例 #3
0
 /**
  * Method announce.
  *
  * @param sm SystemMessage
  */
 private void announce(SystemMessage sm) {
   for (Player player : GameObjectsStorage.getAllPlayersForIterate()) {
     player.sendPacket(sm);
   }
 }