aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1224be0e1ae..5a235e1e1e4 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1803,22 +1803,17 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- bool smart = false;
SmartAI* ai = NULL;
if (IsGameObject(*itr))
- {
- smart = IsSmartGO((*itr)->ToGameObject());
ai = CAST_AI(SmartAI, (*itr)->ToGameObject()->AI());
- }
if (IsCreature(*itr))
- {
- smart = IsSmart((*itr)->ToCreature());
ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI());
- }
- if (smart && ai)
+ if (ai)
ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id);
+ else
+ sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
break;
}