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

限制随机本组队,等级过低或过高无法加入副本; #4

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/server/game/DungeonFinding/LFGMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@ namespace lfg
lockData = LFG_LOCKSTATUS_NOT_IN_SEASON;
else if (ar)
{
// 检查玩家等级是否超出副本的允许范围
if (dungeon->minlevel > level)
{
lockData = LFG_LOCKSTATUS_TOO_LOW_LEVEL; // 玩家等级过低,无法加入副本
}
else if (dungeon->maxlevel < level)
{
lockData = LFG_LOCKSTATUS_TOO_HIGH_LEVEL; // 玩家等级过高,无法加入副本
}

// Check required items
for (const ProgressionRequirement* itemRequirement : ar->items)
{
Expand Down