Core/SAI: Fix text over errors

This commit is contained in:
Vincent-Michael
2014-10-07 21:49:50 +02:00
parent ba2ae251e3
commit def151bb18

View File

@@ -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;
}