L2JMobius

Free Users => Solved/Invalid Bug Reports => Topic started by: altronrain on June 26, 2022, 07:10:08 PM

Title: Q159_ProtectTheWaterSource: wrong stage condition prevents quest completition
Post by: altronrain on June 26, 2022, 07:10:08 PM
On the second part of the quest player should bring up 5 more "Plague Dust" items to quest giver.
But due to wrong quest stage condition required items don't drop (killed 20+ for the test -- no drop (chance 40%)).

1) After completing 1st part of the quest it is set to condition 3:
https://imgur.com/yhHlrNF

2) OnKill function's "else if" condition for the second part of the quest is waiting for quest condition 2:
https://imgur.com/8gwGKvZ

3) After manually changing else if to st.isCond(3) I could get required quest items and end the quest:
https://imgur.com/rfbn5SS

Diff patch for the quest:
Code: [Select]
diff -U 3 dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java
--- dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java Sun Jun 19 12:05:08 2022
+++ dist/game/data/scripts/quests/Q159_ProtectTheWaterSource/Q159_ProtectTheWaterSource.java Sun Jun 26 18:44:03 2022
@@ -140,7 +140,7 @@
  {
  st.setCond(2);
  }
- else if (st.isCond(2) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
+ else if (st.isCond(3) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
  {
  st.setCond(4);
  }

Title: Re: Q159_ProtectTheWaterSource: wrong stage condition prevents quest completition
Post by: Mobius on July 13, 2022, 12:48:38 AM
Fixed with https://bitbucket.org/MobiusDev/l2j_mobius/commits/74381666892ba4c82f6798a8081862eeeca0141a
Thanks :D