mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Core/LoadSmartAIFromDB): Prevent loading if entryorguid = 0 (#5663)
Co-Authored-By: robinsch <8017650+robinsch@users.noreply.github.com>
This commit is contained in:
@@ -128,6 +128,12 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
SmartScriptHolder temp;
|
||||
|
||||
temp.entryOrGuid = fields[0].GetInt32();
|
||||
if (!temp.entryOrGuid)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: invalid entryorguid (0), skipped loading.");
|
||||
continue;
|
||||
}
|
||||
|
||||
SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8();
|
||||
if (source_type >= SMART_SCRIPT_TYPE_MAX)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user