Examples of TurnListenerDecorator


Examples of games.stendhal.server.core.events.TurnListenerDecorator

       
      } else {
        // that player is not logged in. Do they exist at all or are they just offline? Try sending a message with postman.
        DBCommand command = new StoreMessageCommand(player.getName(), action.get(TARGET), "In answer to your support question:\n" + reply + " \nIf you wish to reply, use /support.", "S");
        DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
        TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
      }
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

   */
  public void onTurnReached(int currentTurn) {
    StoreMessageCommand checkcommand = DBCommandQueue.get().getOneResult(StoreMessageCommand.class, handle);
   
    if (checkcommand == null) {
      TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
      return;
    }

    boolean characterExists = checkcommand.targetCharacterExists();
    String adminName = checkcommand.getSource();
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

    }
  }

  private void actInternal(Player caster, Player target) {
    playerToHeal = target;
    SingletonRepository.getTurnNotifier().notifyInTurns(0, new TurnListenerDecorator(this));
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

  public void onTurnReached(int currentTurn) {
    if(restAmount > 0) {
      int toHeal = Math.min(restAmount, getRegen());
      playerToHeal.heal(toHeal);
      restAmount = restAmount - toHeal;
      SingletonRepository.getTurnNotifier().notifyInTurns(getRate(), new TurnListenerDecorator(this));
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

      }

      // invoke the check for valid character names
      DBCommand command = new QueryCanonicalCharacterNamesCommand(player, player.getBuddies());
      DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
      TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

  public void onTurnReached(int currentTurn) {
    QueryCanonicalCharacterNamesCommand checkCommand = DBCommandQueue.get().getOneResult(QueryCanonicalCharacterNamesCommand.class, handle);

    if (checkCommand == null) {
      TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
      return;
    }

    Collection<String> queriedNames = checkCommand.getQueriedNames();
    Collection<String> validNames = checkCommand.getValidNames();
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

    }
    if (action.has(TARGET) && action.has(TEXT)) {
      String message = action.get(TEXT);
      DBCommand command = new StoreMessageCommand(player.getName(), action.get(TARGET), message, "P");
      DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
      TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

   */
  public void onTurnReached(int currentTurn) {
    StoreMessageCommand checkcommand = DBCommandQueue.get().getOneResult(StoreMessageCommand.class, handle);
   
    if (checkcommand == null) {
      TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
      return;
    }

    boolean characterExists = checkcommand.targetCharacterExists();
    String source = checkcommand.getSource();
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

    if(numberOfLeftOverHits > 0) {
      int damageDone = damageOrigin.damageDone(rpEntityToDamage, getAtk(), getNature());
      rpEntityToDamage.damage(damageDone, damageOrigin);
      numberOfLeftOverHits = numberOfLeftOverHits -1;
      if (numberOfLeftOverHits > 0) {
        SingletonRepository.getTurnNotifier().notifyInTurns(getRate(), new TurnListenerDecorator(this));
      }
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.events.TurnListenerDecorator

    // remember caster and target
    rpEntityToDamage = target;
    damageOrigin = caster;
    numberOfLeftOverHits = this.getAmount();
    // use turn notifier to enable for damage over a certain amount of time
    SingletonRepository.getTurnNotifier().notifyInTurns(0, new TurnListenerDecorator(this));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.