fix(Core/Battlegrounds): log errors about creatures not found (#1587)

This commit is contained in:
Alan
2019-04-07 08:19:45 -03:00
committed by Francesco Borzì
parent 2014610723
commit 3b82a3d903
3 changed files with 11 additions and 14 deletions

View File

@@ -4295,6 +4295,8 @@ void SmartScript::OnUpdate(uint32 const diff)
void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger const* at)
{
(void)at; // ensure that the variable is referenced even if extra logs are disabled in order to pass compiler checks
if (e.empty())
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
@@ -4326,10 +4328,6 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger c
}
mEvents.push_back((*i));//NOTE: 'world(0)' events still get processed in ANY instance mode
}
if (mEvents.empty() && obj)
sLog->outErrorDb("SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
if (mEvents.empty() && at)
sLog->outErrorDb("SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->entry);
}
void SmartScript::GetScript()