Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

This commit is contained in:
Vincent-Michael
2014-10-10 05:29:06 +02:00
39 changed files with 610 additions and 193 deletions

View File

@@ -1220,7 +1220,26 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) // unused
uint32 entry = 0;
if (e.entryOrGuid >= 0)
entry = uint32(e.entryOrGuid);
{
if (e.GetEventType() == SMART_EVENT_TEXT_OVER)
{
entry = e.event.textOver.creatureEntry;
id = e.event.textOver.textGroupID;
}
else
{
switch (e.GetTargetType())
{
case SMART_TARGET_CREATURE_DISTANCE:
case SMART_TARGET_CREATURE_RANGE:
case SMART_TARGET_CLOSEST_CREATURE:
return true; // ignore
default:
entry = uint32(e.entryOrGuid);
break;
}
}
}
else
{
entry = uint32(abs(e.entryOrGuid));
@@ -1239,7 +1258,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.event_id, e.GetActionType(), id);
return false;
}