mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/SAI): GameObject smart_script based on GUID (#22710)
This commit is contained in:
@@ -202,10 +202,29 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!sObjectMgr->GetCreatureData(uint32(std::abs(temp.entryOrGuid))))
|
switch (source_type)
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid ({}) does not exist, skipped loading.", uint32(std::abs(temp.entryOrGuid)));
|
case SMART_SCRIPT_TYPE_CREATURE:
|
||||||
continue;
|
{
|
||||||
|
if (!sObjectMgr->GetCreatureData(uint32(std::abs(temp.entryOrGuid))))
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid ({}) does not exist, skipped loading.", uint32(std::abs(temp.entryOrGuid)));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SMART_SCRIPT_TYPE_GAMEOBJECT:
|
||||||
|
{
|
||||||
|
if (!sObjectMgr->GetGameObjectData(uint32(std::abs(temp.entryOrGuid))))
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: GameObject guid ({}) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type {}", (uint32)source_type);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user