From: Katie R. <ky...@us...> - 2010-06-10 22:04:53
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv697/src/games/stendhal/server/maps/quests Modified Files: IcecreamForAnnie.java Log Message: add a special isCompleted and isRepeatable for annie quest Index: IcecreamForAnnie.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests/IcecreamForAnnie.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** IcecreamForAnnie.java 28 Mar 2010 13:24:47 -0000 1.25 --- IcecreamForAnnie.java 10 Jun 2010 22:04:45 -0000 1.26 *************** *** 11,16 **** --- 11,19 ---- import games.stendhal.server.entity.npc.action.SetQuestAction; import games.stendhal.server.entity.npc.action.SetQuestAndModifyKarmaAction; + import games.stendhal.server.entity.npc.condition.AndCondition; import games.stendhal.server.entity.npc.condition.QuestInStateCondition; import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition; + import games.stendhal.server.entity.npc.condition.QuestStateStartsWithCondition; + import games.stendhal.server.entity.npc.condition.TimePassedCondition; import games.stendhal.server.entity.npc.parser.Sentence; import games.stendhal.server.entity.player.Player; *************** *** 193,195 **** --- 196,209 ---- return 10; } + + @Override + public boolean isRepeatable(final Player player) { + return new AndCondition(new QuestStateStartsWithCondition(QUEST_SLOT,"eating;"), + new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES, 1)).fire(player,null, null); + } + + @Override + public boolean isCompleted(final Player player) { + return new QuestStateStartsWithCondition(QUEST_SLOT,"eating;").fire(player, null, null); + } } |