Package games.stendhal.server.entity.item

Examples of games.stendhal.server.entity.item.Item.repair()


      // check if item is damaged
      if(toRepair.getDeterioration() > 0) {
        int price = priceCalculator.calculatePrice(toRepair, player);
        //only repair if player can afford it
        if (player.isEquipped("money", price)) {
          toRepair.repair();
          player.drop("money", price);
          //tell player about result of repairing as for more than one found item the most damaged one is repaired
          if(foundMoreThanOne) {
            seller.say("You do carry more than one "+res.getChosenItemName()+" with you. So I repaired the most damaged one.");
          } else {
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.