mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 03:22:40 -04:00
Core/ObjectMgr: Refactor sGOStorage
This commit is contained in:
@@ -137,7 +137,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
}
|
||||
case SMART_SCRIPT_TYPE_GAMEOBJECT:
|
||||
{
|
||||
if (!sGOStorage.LookupEntry<GameObjectInfo>((uint32)temp.entryOrGuid))
|
||||
if (!sObjectMgr->GetGameObjectTemplate((uint32)temp.entryOrGuid))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
continue;
|
||||
@@ -241,7 +241,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder e)
|
||||
case SMART_TARGET_GAMEOBJECT_DISTANCE:
|
||||
case SMART_TARGET_GAMEOBJECT_RANGE:
|
||||
{
|
||||
if (e.target.goDistance.entry && !sGOStorage.LookupEntry<GameObjectInfo>(e.target.goDistance.entry))
|
||||
if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user