mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/SAI: Fix some weird code in SmartAIMgr::IsTextValid
Additions to cb0e6cac63
This commit is contained in:
@@ -1270,11 +1270,11 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id)
|
||||
default:
|
||||
if (e.entryOrGuid < 0)
|
||||
{
|
||||
entry = uint32(-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 " SI64FMTD " SourceType %u Event %u Action %u using non-existent Creature guid " UI64FMTD ", skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u using non-existent Creature guid " UI64FMTD ", skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), guid);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user