L2JMobius

Prelude of War Facing Sadness Quest Small fix

angelus_ira · 5 · 5671

Offline angelus_ira

  • Vassal
  • *
    • Posts: 5
Hi,
I did not know if i should put this here or in bug section, because the comment:
"ALSO don't use the word "bug" if something doesn't work as you wish it to work ("retail")." on bug section rules.
Server Files, Prelude of War (last version of git files)
In my test with the L2JMobius Free serverfiles for fun i saw that after a player completed the Facing Sadness quest, it would still get quest items.
How to replicate the bug:
Just do the quest and after the 8k items and getting the complete quest items, go and kill some mobs

Diff file:

https://pastebin.com/Q45nb6Gp

Use at your own risk, i am not a java programmer, i am not even a programmer, i am not used to work with Eclipse.

Delete or remove the post if it is not the right section.
GL


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16129
If you tested it and it works without sideffects I see no reason not to commit it. :)


Offline angelus_ira

  • Vassal
  • *
    • Posts: 5
I will create a new toon today and do the quest, to check again if work as intended. I was playing my solo server  ;D ;D

If any other can test is better  :)


Offline angelus_ira

  • Vassal
  • *
    • Posts: 5
I found a small bug in the fix. When you reached the 8k quest items, the quest didnt notify to go get the reward and you needed to kill 1 more mob.

The new fix, that works as intended (tested, works and do not break anything). if you want you can commit this one):

Diff: https://pastebin.com/cSSY5zWU


The bug my old fix had in a pic (yellow arrow after you killed one mob):


I really do not know why the first one give that bug and the second one do not. Can someone explain to me why was working like that, both codes should do the same.

My first fix, that needed to pass the 8k items by one at least

Code: [Select]
if (getQuestItemsCount(player, PROOF_OF_DISPOSAL) >= 8000)
{
qs.setCond(2, true);
}
else
{
giveItems(player, PROOF_OF_DISPOSAL, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
The fix that works as intended:
Code: [Select]
if (getQuestItemsCount(player, PROOF_OF_DISPOSAL) < 8000)
{
giveItems(player, PROOF_OF_DISPOSAL, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (getQuestItemsCount(player, PROOF_OF_DISPOSAL) >= 8000)
{
qs.setCond(2, true);
}