Пример #1
0
 public void rejuv(Room here, int tickID) {
   Tick almostTock = null;
   TockClient C = null;
   Tickable E2 = null;
   boolean doItems = ((tickID == 0) || (tickID == Tickable.TICKID_ROOM_ITEM_REJUV));
   boolean doMobs = ((tickID == 0) || (tickID == Tickable.TICKID_MOB));
   for (Iterator<Tick> e = tickGroups(); e.hasNext(); ) {
     almostTock = e.next();
     try {
       for (Iterator i = almostTock.tickers(); i.hasNext(); ) {
         C = (TockClient) i.next();
         E2 = C.clientObject;
         if ((doItems)
             && (E2 instanceof ItemTicker)
             && ((here == null) || (((ItemTicker) E2).properLocation() == here))) {
           C.tickDown = 0;
           if (Tick.tickTicker(C, false)) almostTock.delTicker(C);
         } else if ((doMobs)
             && (E2 instanceof MOB)
             && (((MOB) E2).amDead())
             && ((here == null) || (((MOB) E2).getStartRoom() == here))
             && (((MOB) E2).baseEnvStats().rejuv() > 0)
             && (((MOB) E2).baseEnvStats().rejuv() < Integer.MAX_VALUE)
             && (((MOB) E2).envStats().rejuv() > 0)) {
           C.tickDown = 0;
           ((MOB) E2).envStats().setRejuv(0);
           if (Tick.tickTicker(C, false)) almostTock.delTicker(C);
         }
       }
     } catch (NoSuchElementException ex) {
     }
   }
 }
Пример #2
0
 public void tickAllTickers(Room here) {
   Tick almostTock = null;
   TockClient C = null;
   Tickable E2 = null;
   for (Iterator<Tick> e = tickGroups(); e.hasNext(); ) {
     almostTock = e.next();
     try {
       for (Iterator<TockClient> i = almostTock.tickers(); i.hasNext(); ) {
         C = i.next();
         E2 = C.clientObject;
         if (here == null) {
           if (Tick.tickTicker(C, false)) almostTock.delTicker(C);
         } else if (isHere(E2, here)) {
           if (Tick.tickTicker(C, isSuspended)) almostTock.delTicker(C);
         } else if ((E2 instanceof Ability) && (isHere(((Ability) E2).affecting(), here))) {
           if (Tick.tickTicker(C, isSuspended)) almostTock.delTicker(C);
         }
       }
     } catch (NoSuchElementException ex) {
     }
   }
 }