From: Martin F. <mar...@us...> - 2007-12-06 23:47:49
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/sedah/gatehouse In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv14108/src/games/stendhal/server/maps/sedah/gatehouse Modified Files: GateKeeperNPC.java Log Message: use ConversationParser in the NPC finite state machine engine (see developer track entry 1845168) Index: GateKeeperNPC.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/sedah/gatehouse/GateKeeperNPC.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GateKeeperNPC.java 4 Dec 2007 20:04:12 -0000 1.7 --- GateKeeperNPC.java 6 Dec 2007 23:47:19 -0000 1.8 *************** *** 6,10 **** import games.stendhal.server.config.ZoneConfigurator; import games.stendhal.server.entity.item.Item; - import games.stendhal.server.entity.npc.ConversationParser; import games.stendhal.server.entity.npc.Sentence; import games.stendhal.server.entity.npc.SpeakerNPC; --- 6,9 ---- *************** *** 48,53 **** addGreeting(null, new SpeakerNPC.ChatAction() { @Override ! public void fire(Player player, String text, ! SpeakerNPC engine) { if (!player.isEquipped("sedah_gate_key")) { engine.say("What do you want?"); --- 47,51 ---- addGreeting(null, new SpeakerNPC.ChatAction() { @Override ! public void fire(Player player, Sentence sentence, SpeakerNPC engine) { if (!player.isEquipped("sedah_gate_key")) { engine.say("What do you want?"); *************** *** 74,81 **** addReply("bribe", null, new SpeakerNPC.ChatAction() { @Override ! public void fire(Player player, String text, ! SpeakerNPC engine) { ! Sentence sentence = ConversationParser.parse(text); ! int amount = sentence.getAmount(); String item = sentence.getItemName(); --- 72,76 ---- addReply("bribe", null, new SpeakerNPC.ChatAction() { @Override ! public void fire(Player player, Sentence sentence, SpeakerNPC engine) { int amount = sentence.getAmount(); String item = sentence.getItemName(); |