From 6ef51481eba65803c613f358f593050a427280af Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Fri, 3 Oct 2014 16:07:11 +0200 Subject: Core: Fix crash --- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3