refactor(Core/ObjectMgr): Handle Profanity & Reserved Names in load (#19259)

* refactor(Core/ObjectMgr): Handle Profanity & Reserved Names in load

* closes https://github.com/azerothcore/azerothcore-wotlk/issues/18556

* Update ObjectMgr.cpp

* Update ObjectMgr.cpp

* I swear I am not drunk

* We already check all of these

* fix build

* Forgot we dont send the responsecode in senderrormessage

* last commit I swear
This commit is contained in:
Kitzunu
2024-07-03 00:23:32 +02:00
committed by GitHub
parent f96d4c8670
commit 0a8175ef03
11 changed files with 117 additions and 166 deletions

View File

@@ -780,17 +780,19 @@ public:
static bool HandleReloadReservedNameCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Re-Loading `reserved_player` Table!");
sObjectMgr->LoadReservedPlayersNames();
handler->SendGlobalGMSysMessage("DB table `reserved_name` reloaded.");
LOG_INFO("server.loading", "Re-Loading Reserved Names!");
sObjectMgr->LoadReservedPlayerNamesDB();
sObjectMgr->LoadReservedPlayerNamesDBC(); // Needed because we clear the store in LoadReservedPlayerNamesDB()
handler->SendGlobalGMSysMessage("Reserved Names reloaded.");
return true;
}
static bool HandleReloadProfanityNameCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Re-Loading `profanity_player` Table!");
sObjectMgr->LoadProfanityPlayersNames();
handler->SendGlobalGMSysMessage("DB table `profanity_player` reloaded.");
LOG_INFO("server.loading", "Re-Loading Profanity Names!");
sObjectMgr->LoadProfanityNamesFromDB();
sObjectMgr->LoadProfanityNamesFromDBC(); // Needed because we clear the store in LoadProfanityNamesFromDB()
handler->SendGlobalGMSysMessage("Profanity Names reloaded.");
return true;
}