Fix: Get Field if no room id is specified - #399
Conversation
WalkthroughThis pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant FieldManagerFactory
participant MapFields
Client->>FieldManagerFactory: Call GetInternal(roomId)
alt roomId is zero
FieldManagerFactory->>MapFields: Check for available fields
alt Fields available
FieldManagerFactory->>Client: Return first available FieldManager
else No fields available
FieldManagerFactory->>Client: Proceed with normal field creation
end
else roomId != 0
FieldManagerFactory->>MapFields: Retrieve or create Field based on roomId
FieldManagerFactory->>Client: Return FieldManager
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Definitions (1)Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.Factory.cs (5)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit