Package games.stendhal.server.util

Examples of games.stendhal.server.util.AsynchronousProgramExecutor


    public void fire(Player player, Sentence sentence, EventRaiser npc) {
      int fee = TradingUtility.calculateFee(player, price).intValue();
      if (TradingUtility.canPlayerAffordTradingFee(player, price)) {
        if (createOffer(player, item, price, quantity)) {
          TradingUtility.substractTradingFee(player, price);
          new AsynchronousProgramExecutor("trade", buildTweetMessage(item, quantity, price)).start();
          npc.say("I added your offer to the trading center and took the fee of "+ fee +".");
          npc.setCurrentState(ConversationStates.ATTENDING);
        } else {
          npc.say("You don't have " + Grammar.quantityplnoun(quantity, item.getName(), "a") + ".");
        }
View Full Code Here

TOP

Related Classes of games.stendhal.server.util.AsynchronousProgramExecutor

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.