diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
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; } |