aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSnapper <snapperryen@gmail.com>2016-06-01 13:41:58 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2017-01-12 00:02:29 +0100
commitfbb9fc02286fecc13a7a81c46a6d3da25b25a203 (patch)
treeed9e1e2061aca7a986c235c3518c13a37c0b5254
parentfcabeed7544285f3244465ccfc5337c59e63c6b0 (diff)
Core/SmartAI: remove unneeded check for SMART_ACTION_FORCE_DESPAWN.
Gameobjects do not need to use SmartAI in order to be targeted by other entities' scripts. (cherry picked from commit 9803e58392eea0828aac96cd79a794a77323d9d0)
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 0d4ed58d433..b2ea09c6d1e 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1059,10 +1059,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
target->DespawnOrUnsummon(e.action.forceDespawn.delay);
}
else if (GameObject* goTarget = (*itr)->ToGameObject())
- {
- if (IsSmartGO(goTarget))
- goTarget->SetRespawnTime(e.action.forceDespawn.delay + 1);
- }
+ goTarget->SetRespawnTime(e.action.forceDespawn.delay + 1);
}
delete targets;