From: MadMetzger <mad...@us...> - 2011-06-30 19:38:00
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/npc/action In directory vz-cvs-4.sog:/tmp/cvs-serv28636/src/games/stendhal/server/entity/npc/action Modified Files: RepairingBehaviourAction.java Log Message: fix usage of behaviour action method usage Index: RepairingBehaviourAction.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/npc/action/RepairingBehaviourAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RepairingBehaviourAction.java 28 Jun 2011 05:42:07 -0000 1.1 --- RepairingBehaviourAction.java 30 Jun 2011 19:37:58 -0000 1.2 *************** *** 20,30 **** public void fireRequestOK(ItemParserResult res, Player player, Sentence sentence, EventRaiser npc) { ! if (behaviour.getItemNames().contains(res.getChosenItemName())) { ! int price = behaviour.getPrice(res.getChosenItemName(), player); ! if(player.drop("money", price)) { ! behaviour.transactAgreedDeal(res, npc, player); ! } else { ! npc.say("You cannot afford to repair your "+res.getChosenItemName()); ! } } else { npc.say("I am sorry, but I am not able to repair your " + res.getChosenItemName() + "."); --- 20,26 ---- public void fireRequestOK(ItemParserResult res, Player player, Sentence sentence, EventRaiser npc) { ! String chosen = res.getChosenItemName(); ! if(behaviour.canDealWith(chosen)) { ! npc.say("repairing will cost x money"); } else { npc.say("I am sorry, but I am not able to repair your " + res.getChosenItemName() + "."); *************** *** 38,40 **** } ! } --- 34,36 ---- } ! } \ No newline at end of file |