mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/SAI: Fix text over errors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user