Esempio n. 1
0
 public boolean cancelQuestTimer(String name) {
   QuestTimer timer = removeQuestTimer(name);
   if (timer != null) {
     timer.stop();
   }
   return timer != null;
 }
Esempio n. 2
0
 public void stopQuestTimers() {
   for (QuestTimer timer : getTimers().values()) {
     timer.setQuestState(null);
     timer.stop();
   }
   _timers.clear();
 }
Esempio n. 3
0
 /**
  * Add a timer to the quest.<br>
  * <br>
  *
  * @param name: name of the timer (also passed back as "event" in notifyEvent)
  * @param time: time in ms for when to fire the timer
  * @param npc: npc associated with this timer (can be null)
  */
 public void startQuestTimer(String name, long time, NpcInstance npc) {
   QuestTimer timer = new QuestTimer(name, time, npc);
   timer.setQuestState(this);
   QuestTimer oldTimer = getTimers().put(name, timer);
   if (oldTimer != null) {
     oldTimer.stop();
   }
   timer.start();
 }