mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
feat(Core/Conf): handle custom creatures IDs and exclude them from checks (#10367)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "CharacterCache.h"
|
||||
#include "Chat.h"
|
||||
#include "Common.h"
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameEventMgr.h"
|
||||
@@ -1173,11 +1174,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
|
||||
const_cast<CreatureTemplate*>(cInfo)->DamageModifier *= Creature::_GetDamageMod(cInfo->rank);
|
||||
|
||||
// Hack for modules
|
||||
switch (cInfo->Entry)
|
||||
std::vector<uint32> CustomCreatures;
|
||||
std::string stringCreatureIds(sConfigMgr->GetOption<std::string>("Creatures.CustomIDs", ""));
|
||||
for (std::string_view id : Acore::Tokenize(stringCreatureIds, ',', false))
|
||||
{
|
||||
case 190010: // Transmog Module
|
||||
return;
|
||||
uint32 entry = Acore::StringTo<uint32>(id).value_or(0);
|
||||
CustomCreatures.emplace_back(entry);
|
||||
}
|
||||
|
||||
for (auto const& itr : CustomCreatures)
|
||||
{
|
||||
if (cInfo->Entry == itr)
|
||||
return;
|
||||
}
|
||||
|
||||
if (cInfo->GossipMenuId && !(cInfo->npcflag & UNIT_NPC_FLAG_GOSSIP))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: {}) has assigned gossip menu {}, but npcflag does not include UNIT_NPC_FLAG_GOSSIP (1).", cInfo->Entry, cInfo->GossipMenuId);
|
||||
|
||||
Reference in New Issue
Block a user