From def151bb18b31e829ebe3761ff857990fca92a7e Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Tue, 7 Oct 2014 21:49:50 +0200 Subject: Core/SAI: Fix text over errors --- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 15 +++++++++++++-- 1 file changed, 13 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 4b93c35787c..9979891e2e6 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1183,7 +1183,18 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) // unused uint32 entry = 0; if (e.entryOrGuid >= 0) - entry = uint32(e.entryOrGuid); + { + switch (e.GetEventType()) + { + case SMART_EVENT_TEXT_OVER: + entry = e.event.textOver.creatureEntry; + id = e.event.textOver.textGroupID; + break; + default: + entry = uint32(e.entryOrGuid); + break; + } + } else { entry = uint32(abs(e.entryOrGuid)); @@ -1202,7 +1213,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) // unused if (error) { - TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id); + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType(), id); return false; } -- cgit v1.2.3