diff --git a/data/XML/groups.xml b/data/XML/groups.xml index fc348a79eb..e8a377e6fe 100644 --- a/data/XML/groups.xml +++ b/data/XML/groups.xml @@ -54,6 +54,7 @@ + @@ -95,6 +96,7 @@ + @@ -136,6 +138,7 @@ + diff --git a/src/const.h b/src/const.h index 7e41643bec..70afbd3174 100644 --- a/src/const.h +++ b/src/const.h @@ -546,6 +546,7 @@ enum PlayerFlags : uint64_t { PlayerFlag_IgnoreWeaponCheck = static_cast(1) << 35, PlayerFlag_CannotBeMuted = static_cast(1) << 36, PlayerFlag_IsAlwaysPremium = static_cast(1) << 37, + PlayerFlag_ignoreYellCheck = static_cast(1) << 38, }; enum ReloadTypes_t : uint8_t { diff --git a/src/game.cpp b/src/game.cpp index 2a23a67ff5..cf40f1ee63 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3524,9 +3524,8 @@ bool Game::playerYell(Player* player, const std::string& text) } bool isAccessPlayer = player->isAccessPlayer(); - bool belowGamemaster = player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER; uint32_t minimumLevel = g_config.getNumber(ConfigManager::YELL_MINIMUM_LEVEL); - if (player->getLevel() < minimumLevel && (!isAccessPlayer || belowGamemaster)) { + if (player->getLevel() < minimumLevel && (!isAccessPlayer || !player->hasFlag(PlayerFlag_IgnoreYellCheck))) { if (g_config.getBoolean(ConfigManager::YELL_ALLOW_PREMIUM)) { if (!player->isPremium()) { player->sendTextMessage(MESSAGE_STATUS_SMALL, fmt::format("You may not yell unless you have reached level {:d} or have a premium account.", minimumLevel)); @@ -3538,7 +3537,7 @@ bool Game::playerYell(Player* player, const std::string& text) } } - if (belowGamemaster && !isAccessPlayer) { + if (!isAccessPlayer && !player->hasFlag(PlayerFlag_IgnoreYellCheck)) { Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_YELLTICKS, 30000, 0); player->addCondition(condition); } diff --git a/src/groups.cpp b/src/groups.cpp index efa79c86c6..4aa574b8ed 100644 --- a/src/groups.cpp +++ b/src/groups.cpp @@ -61,7 +61,8 @@ const std::unordered_map ParsePlayerFlagMap = { {"ignorespellcheck", PlayerFlag_IgnoreSpellCheck}, {"ignoreweaponcheck", PlayerFlag_IgnoreWeaponCheck}, {"cannotbemuted", PlayerFlag_CannotBeMuted}, - {"isalwayspremium", PlayerFlag_IsAlwaysPremium} + {"isalwayspremium", PlayerFlag_IsAlwaysPremium}, + {"ignoreyellcheck", PlayerFlag_IgnoreYellCheck} }; bool Groups::load() diff --git a/src/luascript.cpp b/src/luascript.cpp index b55a21e29c..5631bbd7b6 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -1621,6 +1621,7 @@ void LuaScriptInterface::registerFunctions() registerEnum(PlayerFlag_IgnoreWeaponCheck) registerEnum(PlayerFlag_CannotBeMuted) registerEnum(PlayerFlag_IsAlwaysPremium) + registerEnum(PlayerFlag_IgnoreYellCheck) registerEnum(PLAYERSEX_FEMALE) registerEnum(PLAYERSEX_MALE)