Esempio n. 1
0
 QuestTimer removeQuestTimer(String name) {
   QuestTimer timer = getTimers().remove(name);
   if (timer != null) {
     timer.setQuestState(null);
   }
   return timer;
 }
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();
 }