feat(Core/ChatHandler/Conf): Flood Control Addon Messages (#12603)

* feat(Core/ChatHandler): Flood Control Addon Messages

Original Closed PR by @Kitzunu
https://github.com/azerothcore/azerothcore-wotlk/pull/11675

Cherrypicked TC:
cherry-pick commit (TrinityCore/TrinityCore@5384fc1)
cherry-pick commit (stoneharry/TrinityCore@a0629fc)

Co-Authored-By: stoneharry 3818405+stoneharry@users.noreply.github.com
Co-Authored-By: Shauren shauren.trinity@gmail.com
Co-Authored-By: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* update: (pr): Review Response

* update: (core): Chathandler

No reason why this case should even exist. Previous or current.  This cast is under two sided interations which will always lead to you being in a group of some sorts. there is literally zero sense having a above or equal to level 80 if statement here.

* update (cleanup): Code Style

suggestion per @Nefertumm

Co-Authored-By: Angelo Venturini <nefertum.dev@protonmail.com>

Co-authored-by: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Angelo Venturini <nefertum.dev@protonmail.com>
This commit is contained in:
M'Dic
2022-08-17 10:37:34 -04:00
committed by GitHub
parent b2e449fd15
commit 8b9541873a
9 changed files with 70 additions and 32 deletions
+2
View File
@@ -267,6 +267,8 @@ enum WorldIntConfigs
CONFIG_EXPANSION,
CONFIG_CHATFLOOD_MESSAGE_COUNT,
CONFIG_CHATFLOOD_MESSAGE_DELAY,
CONFIG_CHATFLOOD_ADDON_MESSAGE_COUNT,
CONFIG_CHATFLOOD_ADDON_MESSAGE_DELAY,
CONFIG_CHATFLOOD_MUTE_TIME,
CONFIG_EVENT_ANNOUNCE,
CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY,
+2
View File
@@ -1022,6 +1022,8 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfigMgr->GetOption<int32>("ChatFlood.MessageCount", 10);
m_int_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfigMgr->GetOption<int32>("ChatFlood.MessageDelay", 1);
m_int_configs[CONFIG_CHATFLOOD_ADDON_MESSAGE_COUNT] = sConfigMgr->GetOption<int32>("ChatFlood.AddonMessageCount", 100);
m_int_configs[CONFIG_CHATFLOOD_ADDON_MESSAGE_DELAY] = sConfigMgr->GetOption<int32>("ChatFlood.AddonMessageDelay", 1);
m_int_configs[CONFIG_CHATFLOOD_MUTE_TIME] = sConfigMgr->GetOption<int32>("ChatFlood.MuteTime", 10);
m_bool_configs[CONFIG_CHAT_MUTE_FIRST_LOGIN] = sConfigMgr->GetOption<bool>("Chat.MuteFirstLogin", false);
m_int_configs[CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN] = sConfigMgr->GetOption<int32>("Chat.MuteTimeFirstLogin", 120);