-
Notifications
You must be signed in to change notification settings - Fork 83
Multiple fixes #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple fixes #358
Changes from all commits
6ee44b3
ab238dd
76ab562
10b5543
f79d3ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,10 +82,10 @@ private void HandleCraft(GameSession session, IByteReader packet) { | |
| } | ||
|
|
||
| foreach (int questId in entry.RequiredQuests) { | ||
| if (!session.Quest.TryGetQuest(questId, out Quest? quest) || quest.State != QuestState.Completed) { | ||
| session.Send(MasteryPacket.Error(MasteryError.s_mastery_error_lack_quest)); | ||
| return; | ||
| } | ||
| if (session.Quest.TryGetQuest(questId, out _)) continue; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isnt this supposed to be the reverse?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it found a quest, then it's fine. If not send error
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then it should break, ya? instead of continue
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we break we won't check the next quests. If it loops through all quests and they are found we can keep going, if any of them are not found then we send the error and exit early |
||
|
|
||
| session.Send(MasteryPacket.Error(MasteryError.s_mastery_error_lack_quest)); | ||
| return; | ||
| } | ||
|
|
||
| if (session.Mastery[entry.Type] < entry.RequiredMastery) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.