Package games.stendhal.server.core.engine.dbcommand

Examples of games.stendhal.server.core.engine.dbcommand.ReadHallOfFamePointsCommand


  public NotifyPlayerAboutHallOfFamePoints(SpeakerNPC npc, String playerName, String fametype, String questSlot) {
    this.npc = npc;
    this.playerName = playerName;
    this.handle = new ResultHandle();
    this.questSlot = questSlot;
    DBCommand command = new ReadHallOfFamePointsCommand(playerName, fametype);
    DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
  }
View Full Code Here




  public void onTurnReached(int currentTurn) {
    // if there is no result, wait some more
    ReadHallOfFamePointsCommand command = DBCommandQueue.get().getOneResult(ReadHallOfFamePointsCommand.class, handle);
    if (command == null) {
      TurnNotifier.get().notifyInTurns(0, this);
      return;
    }

    // tell the player his score
    int points = command.getPoints();
    npc.say("Congratulations " + playerName + ", your score is now " + points + ".");

    // save the progress to a quest slot
    if (questSlot != null) {
      Player player = StendhalRPRuleProcessor.get().getPlayer(playerName);
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.dbcommand.ReadHallOfFamePointsCommand

Copyright © 2018 www.massapicom. 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.