Skip to content

Commit

Permalink
Add workaround to display "clothes" trigger in Supplies for Phalk quest
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Jun 13, 2024
1 parent 7f06ef1 commit d1c9618
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/games/stendhal/server/maps/quests/SuppliesForPhalk.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -139,6 +139,13 @@ private void receiveFood() {
// the extra parts in the quest state are for wrvil and mrotho not to give them cloaks and armor twice
actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "clothes;none;none", 2.0));
actions.add(new InflictStatusOnNPCAction("sandwich"));
actions.add(new ChatAction() {
@Override
public void fire(Player player, Sentence sentence, EventRaiser raiser) {
// workaround because "clothes" is not parsed from NPC dialogue
npc.forceWordsInCurrentConversation("clothes");
}
});

npc.add(ConversationStates.QUEST_ITEM_QUESTION, ConversationPhrases.YES_MESSAGES,
new AndCondition(
Expand Down Expand Up @@ -436,7 +443,13 @@ private void receiveClothes() {
new QuestInStateCondition(QUEST_SLOT, 0, "clothes"),
ConversationStates.ATTENDING,
"I am waiting for you to bring me new #clothes from Wrvil and Mrotho.",
null);
new ChatAction() {
@Override
public void fire(Player player, Sentence sentence, EventRaiser raiser) {
// workaround because "clothes" is not parsed from NPC dialogue
npc.forceWordsInCurrentConversation("clothes");
}
});
}

@Override
Expand Down

0 comments on commit d1c9618

Please sign in to comment.