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;
|
SmartScriptHolder temp;
|
||||||
|
|
||||||
temp.entryOrGuid = fields[0].GetInt32();
|
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();
|
SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8();
|
||||||
if (source_type >= SMART_SCRIPT_TYPE_MAX)
|
if (source_type >= SMART_SCRIPT_TYPE_MAX)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user