aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-10-03 16:07:11 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-10-03 16:07:11 +0200
commit6ef51481eba65803c613f358f593050a427280af (patch)
tree5bfefabd764def11dfc6682198b17e7cac03568f
parent758b8ee1646c3e6386a63432f0a6d77ae1ef01c0 (diff)
Core: Fix crash
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index a4f9b45a6d5..272c563557d 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -706,12 +706,18 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
CreatureTextMap::const_iterator sList = sCreatureTextMgr->GetTextMap().find(e.entryOrGuid);
if (sList == sCreatureTextMgr->GetTextMap().end())
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find Text for Creature", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find Text for Creature, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ return false;
+ }
CreatureTextHolder const& textHolder = sList->second;
CreatureTextHolder::const_iterator itr = textHolder.find(e.action.talk.textGroupID);
if (itr == textHolder.end())
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find TextGroup %u for Creature", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.talk.textGroupID);
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find TextGroup %u for Creature , skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.talk.textGroupID);
+ return false;
+ }
}
break;
}