From: Katie R. <ky...@us...> - 2011-01-04 20:33:32
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv11005/src/games/stendhal/server/maps/quests Modified Files: Tag: VERSION_00_RELEASE_91 DailyMonsterQuest.java Log Message: Backport fix [Stendhal] Daily monster quest completes twice - ID: 3151245 there was a standard condition and also a 'non standard version doing the same thing in another action called at the same time. remove all non standard stuff related to that action. Index: DailyMonsterQuest.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/quests/DailyMonsterQuest.java,v retrieving revision 1.71 retrieving revision 1.71.2.1 diff -C2 -d -r1.71 -r1.71.2.1 *** DailyMonsterQuest.java 1 Jan 2011 13:24:34 -0000 1.71 --- DailyMonsterQuest.java 4 Jan 2011 20:33:20 -0000 1.71.2.1 *************** *** 23,31 **** import games.stendhal.server.entity.npc.EventRaiser; import games.stendhal.server.entity.npc.SpeakerNPC; ! import games.stendhal.server.entity.npc.action.IncrementQuestAction; ! import games.stendhal.server.entity.npc.action.ProcessReachedQuestAchievementsAction; import games.stendhal.server.entity.npc.action.IncreaseXPDependentOnLevelAction; import games.stendhal.server.entity.npc.action.MultipleActions; import games.stendhal.server.entity.npc.action.SayTimeRemainingAction; import games.stendhal.server.entity.npc.condition.AndCondition; import games.stendhal.server.entity.npc.condition.KilledForQuestCondition; --- 23,34 ---- import games.stendhal.server.entity.npc.EventRaiser; import games.stendhal.server.entity.npc.SpeakerNPC; ! import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPDependentOnLevelAction; + import games.stendhal.server.entity.npc.action.IncrementQuestAction; import games.stendhal.server.entity.npc.action.MultipleActions; + import games.stendhal.server.entity.npc.action.ProcessReachedQuestAchievementsAction; import games.stendhal.server.entity.npc.action.SayTimeRemainingAction; + import games.stendhal.server.entity.npc.action.SetQuestAction; + import games.stendhal.server.entity.npc.action.SetQuestToTimeStampAction; import games.stendhal.server.entity.npc.condition.AndCondition; import games.stendhal.server.entity.npc.condition.KilledForQuestCondition; *************** *** 242,269 **** } - static class DailyQuestCompleteAction implements ChatAction { - - public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) { - final String questInfo = player.getQuest(QUEST_SLOT); - String questCount = null; - String questLast = null; - - //logger.info("Inside DailyQuestCompleteAction"); - final String[] tokens = (questInfo + ";0;0").split(";"); - //questLast = tokens[1]; - questCount = tokens[2]; - if (questCount.equals("null")) { - questCount = "0"; - } - - new IncreaseXPDependentOnLevelAction(5, 95.0).fire(player, sentence, raiser); - raiser.say("Good work! Let me thank you in the name of the people of Semos!"); - player.addKarma(5.0); - questCount = "" + (Integer.valueOf(questCount) + 1); - questLast = "" + (new Date()).getTime(); - player.setQuest(QUEST_SLOT, "done" + ";" + questLast + ";" + questCount); - } - } - static class DailyQuestAbortAction implements ChatAction { --- 245,248 ---- *************** *** 470,478 **** new KilledForQuestCondition(QUEST_SLOT, 0)), ConversationStates.ATTENDING, ! null, new MultipleActions( ! new DailyQuestCompleteAction(), new ProcessReachedQuestAchievementsAction(), ! new IncrementQuestAction(QUEST_SLOT, 2, 1) )); } --- 449,460 ---- new KilledForQuestCondition(QUEST_SLOT, 0)), ConversationStates.ATTENDING, ! "Good work! Let me thank you in the name of the people of Semos!", new MultipleActions( ! new IncreaseXPDependentOnLevelAction(5, 95.0), ! new IncreaseKarmaAction(5.0), new ProcessReachedQuestAchievementsAction(), ! new IncrementQuestAction(QUEST_SLOT, 2, 1), ! new SetQuestToTimeStampAction(QUEST_SLOT,1), ! new SetQuestAction(QUEST_SLOT,0,"done") )); } |