mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
refactor(Core/Channel): Cast moderation level to account types and avoid boolean evaluation. (#22283)
This commit is contained in:
@@ -1230,8 +1230,8 @@ void Channel::ToggleModeration(Player* player)
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32 level = sWorld->getIntConfig(CONFIG_GM_LEVEL_CHANNEL_MODERATION);
|
||||
const bool gm = (level && player->GetSession()->GetSecurity() >= level);
|
||||
const AccountTypes level = static_cast<AccountTypes>(sWorld->getIntConfig(CONFIG_GM_LEVEL_CHANNEL_MODERATION));
|
||||
const bool gm = (player->GetSession()->GetSecurity() >= level);
|
||||
|
||||
if (!playersStore[guid].IsModerator() && !gm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user