Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-01-23 23:23:53 +08:00
77 changed files with 1682 additions and 1680 deletions

View File

@@ -185,10 +185,7 @@ void Channel::JoinChannel(Player* player, std::string const& pass)
return;
}
if (HasFlag(CHANNEL_FLAG_LFG) &&
sWorld->getBoolConfig(CONFIG_RESTRICTED_LFG_CHANNEL) &&
AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) &&
player->GetGroup())
if (IsLFG() && sWorld->getBoolConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && !player->IsUsingLfg())
{
WorldPacket data;
MakeNotInLfg(&data);

View File

@@ -181,7 +181,7 @@ public:
[[nodiscard]] uint32 GetChannelDBId() const { return _channelDBId; }
[[nodiscard]] bool IsConstant() const { return _channelId != 0; }
[[nodiscard]] bool IsAnnounce() const { return _announce; }
[[nodiscard]] bool IsLFG() const { return GetFlags() & CHANNEL_FLAG_LFG; }
[[nodiscard]] bool IsLFG() const { return HasFlag(CHANNEL_FLAG_LFG); }
[[nodiscard]] std::string const& GetPassword() const { return _password; }
void SetPassword(std::string const& npassword) { _password = npassword; }
[[nodiscard]] uint32 GetNumPlayers() const { return playersStore.size(); }