Core/SAI: Fix some weird code in SmartAIMgr::IsTextValid

Additions to cb0e6cac63638fd229cce16c341c6d3d2d77d0d9

(cherry picked from commit 57da378dea2b13c092dab71b181c859790e41b99)

Conflicts:
	src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
This commit is contained in:
DDuarte committed 2015-07-20 01:16:06 +01:00
1 parent 0350088fd2
commit 24ae640de3
1 file changed
+3 -3
@@ -1228,11 +1228,11 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id)
default:
if (e.entryOrGuid < 0)
{
entry = uint32(std::abs(e.entryOrGuid));
CreatureData const* data = sObjectMgr->GetCreatureData(entry);
ObjectGuid::LowType guid = ObjectGuid::LowType(-e.entryOrGuid);
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
if (!data)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), guid);
return false;
}
else