fix(Core/LoadSmartAIFromDB): Prevent loading if entryorguid = 0 (#5663)
Co-Authored-By: robinsch <8017650+robinsch@users.noreply.github.com>
This commit is contained in:
parent
6bb8972194
commit
40f2e5e8c1
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue