aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorleak <leakzx@googlemail.com>2011-04-28 22:54:30 +0200
committerleak <leakzx@googlemail.com>2011-04-28 22:54:30 +0200
commite2e9431ca3b4725f29e13350eb9ca0b46cc0aff1 (patch)
tree6b4ad21b0223031c16ac846a832d2ffd4d3c56d2 /src/server/game/AI/SmartScripts
parent3ab83417f5d6e18cf055195aa35beefdc4f98b9b (diff)
Core/ObjectMgr: Refactor sGOStorage
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index ac0f5d1a2be..cdd07afad52 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -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;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 37aa5588125..c686d0bc51d 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1282,7 +1282,7 @@ class SmartAIMgr
}
inline bool IsGameObjectValid(SmartScriptHolder e, uint32 entry)
{
- if (!sGOStorage.LookupEntry<GameObjectInfo>(uint32(entry)))
+ if (!sObjectMgr->GetGameObjectTemplate(entry))
{
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;