refactor(Core/Channel): Cast moderation level to account types and avoid boolean evaluation. (#22283)
This commit is contained in:
parent
b400dcfdb1
commit
416955907d
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue