Skip to content

Conversation

@glinesbdev
Copy link
Contributor

@glinesbdev glinesbdev commented Jan 12, 2026

Changes

Maple2\Maple2.Server.Game\PacketHandlers\QuestHandler.cs

  • Added HandleGoToDungeon within Handle logic.
image

Summary by CodeRabbit

  • New Features
    • Players can now transition directly into dungeons from quest interactions when the quest is active.
    • If the quest cannot be resolved or isn't started, the game will not attempt a transition and will ignore the request silently.

✏️ Tip: You can customize this high-level summary in your review settings.

# Changes

## `Maple2\Maple2.Server.Game\PacketHandlers\QuestHandler.cs`

* Added `HandleGoToDungeon` within `Handle` logic.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Walkthrough

A new GoToDungeon quest handler was added to QuestHandler. It reads a questId from the packet, resolves the quest, verifies it is started, and creates a dungeon room using the quest's GoToDungeon.mapId; if resolution or checks fail, it returns without action.

Changes

Cohort / File(s) Summary
Quest Handler Enhancement
Maple2.Server.Game/PacketHandlers/QuestHandler.cs
Added private static void HandleGoToDungeon(GameSession session, IByteReader packet) and wired it into the QuestHandler dispatch. Reads questId, resolves the quest, checks state, and invokes dungeon room creation with the quest's GoToDungeon.mapId (second parameter false).

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Server as GameServer
    participant QuestSvc as QuestResolver
    participant Dungeon as DungeonManager

    Client->>Server: Send GoToDungeon packet (questId)
    Server->>QuestSvc: Resolve quest by questId
    QuestSvc-->>Server: Quest or null
    alt quest found and started
        Server->>Dungeon: CreateDungeonRoom(mapId, false)
        Dungeon-->>Server: DungeonRoomCreated
        Server-->>Client: Confirm / teleport
    else quest not found or not started
        Server-->>Client: No action / ignore packet
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I nibble bytes and chase a quest,

A questId fetched, I do my best,
I tap the door, the dungeon wakes,
We hop inside for bold mistakes,
My whiskers twitch — adventure's guest.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding support for an 'Enter Alone' button for tracked quests, which aligns with the implementation of the HandleGoToDungeon command handler in QuestHandler.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1dd1e7 and f8dd1ba.

📒 Files selected for processing (1)
  • Maple2.Server.Game/PacketHandlers/QuestHandler.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Maple2.Server.Game/PacketHandlers/QuestHandler.cs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AngeloTadeucci AngeloTadeucci merged commit 070c1d0 into AngeloTadeucci:master Jan 12, 2026
3 of 4 checks 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