diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-10-02 22:24:59 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-10-02 22:24:59 +0200 |
commit | d10dc5ac3581be20bb852c1eec7c947cfcc40d3d (patch) | |
tree | b07be314ff3fd28acebae909b39f0705db00b933 /src | |
parent | 921457ae7b0b7744ac3c0eabadefb67aac928ce1 (diff) |
Core/Sai: Added better version for 4060fb1b592ef50ab0c5bd450ddc94a1461e900e
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index d20736523b3..6144a102e6c 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -242,17 +242,19 @@ void SmartAIMgr::LoadSmartAIFromDB() { for (auto e : mEventMap[i][itr->first]) { + bool found = false; if (e.link && e.link != e.event_id) { for (auto linked : mEventMap[i][itr->first]) { if (linked.event_id == e.link) - { - if (linked.GetActionType() && linked.GetEventType() != SMART_EVENT_LINK) - TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", - e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); - } + if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK) + found = true; } + + if (!found) + TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); } } } |