Skip to content
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

Fix/fixes 11/30 #647

Merged
merged 17 commits into from
Dec 6, 2024
Merged

Conversation

RyanYappert
Copy link
Collaborator

Another stack of general tweaks and fixes.

  • Further adjustments to player tracking across channels.
  • Playerproofing MSQ 26: A Servant's Pledge. If you somehow disconnect or leave the pawn creation dialogue, the quest will not auto-advance to completion until a pawn is included in the player's party. If a player gets stuck on this step, they should either re-log to reset to the step right before talking to Mysial (so they can create their pawn), or add their pawn to their party so it progresses.
  • Guard against null reference in a few places, including
    • WarpWarpStartHandler (saw it happen in a log)
    • WarpPartyWarpHandler (for leaderless parties)
    • ProfileGetCharacterProfileHandler (existing setup should have worked but didn't?)
    • BattleContentPartyMemberInfoHandler (for leaderless parties)
    • QuestCancelHandler (for leaderless parties)
    • ClanManager::EnqueueToClan
    • QuestQuestOrderHandler (some logging was reporting scheduleIds of 0???)
  • Extra verbose logging and checks in priority quest handlers because we've seen a bunch of issues in that stuff. Thanks @pacampbell.
  • Fix missing byte in S2CPawnExpeditionGetSallyInfoRes that was causing packet analysis to fail for @Sehkah.
  • More aggressively prevent double-inviting of pawns to the party, to prevent multiple dips of experience. Thanks @13masj.
  • Fix missing constructor for S2CChatSendTellMsgRes that was causing ResponseErrorExceptions to not work properly.

Checklist:

  • The project compiles
  • The PR targets develop branch

Logger.Error(client, $"Unable to fetch the quest state manager for ${questScheduleId}");
continue;
}

var questState = questStateManager.GetQuestState(questScheduleId);
Copy link
Collaborator

@pacampbell pacampbell Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the function that gets the quest state do all these checks instead? Looking at the fixes, it looks like we do the same steps in multiple handlers.

Copy link
Collaborator Author

@RyanYappert RyanYappert Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point you need to pass the check back to the handler; that means either throwing an error or returning a null, and I've spoken before about how much I dislike silently returning null to indicate a failure state. Should we throw a MissingQuestException or something and then catch it in the handler?

EDIT: I guess there's also the option of a wrapped object like how the PartyManager does it, but that honestly just seems like an awkward way of avoiding a legitimate try/catch.

@@ -38,6 +38,7 @@ public override void Handle(GameClient client, IPacket packet)
foreach (var questScheduleId in activeQuests)
{
var quest = QuestManager.GetQuestByScheduleId(questScheduleId);
if (quest is null) { continue; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (quest is null)
{
    continue;
}

@@ -8,8 +8,11 @@
"minimum_item_rank": 0,
"discoverable": true,
"order_conditions": [
{"type": "SoloWithPawns"},
{"type": "MainQuestCompleted", "Param1": 4}
{ "type": "SoloWithPawns" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you format this file back to the way it was?

…ill doesn't work it at least appears in the log.
…ResponseErrorExceptions to not work properly.
…ntryBoardItemEntryHandler to use a PacketQueue. Fix QuestStateManager::GetProcessState to not invent bad quests.
@RyanYappert RyanYappert merged commit 6372716 into sebastian-heinz:develop Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants