From: Daniel H. <wik...@us...> - 2006-05-28 14:15:52
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11950/src/games/stendhal/server/maps/quests Modified Files: SheepGrowing.java Log Message: use RPEntity.isEquipped() and RPEntity.drop() instead of chargePlayer(), removeItems() etc. to avoid useless code duplication Index: SheepGrowing.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests/SheepGrowing.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SheepGrowing.java 21 May 2006 20:34:33 -0000 1.12 --- SheepGrowing.java 28 May 2006 14:15:45 -0000 1.13 *************** *** 68,71 **** --- 68,75 ---- public boolean transactAgreedSale(SpeakerNPC seller, Player player) { if (!player.hasSheep()) { + if (! player.drop("money", getCharge(player))) { + seller.say("A real pity! You don't have enough money!"); + return false; + } seller.say("Congratulations! Here is your sheep! Keep it safe!"); StendhalRPZone zone = (StendhalRPZone) world *************** *** 83,87 **** world.modify(player); - chargePlayer(player); return true; } else { --- 87,90 ---- |