aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-02-28 16:39:59 -0300
committerariel- <ariel-@users.noreply.github.com>2017-02-28 16:39:59 -0300
commitff43a74822630c11851abae4cba35a6542e0c86a (patch)
tree4baf55aad164279a7d4dfd9dd3be57d56bd9bc8b /src/server/game/AI/SmartScripts
parent2e68736afcab26d0bb8e1408fa639d09d4772dfb (diff)
Core/Entities: spawned movementtype should override template movementtype
Core/SmartAI: pass the CreatureData pointer (if any) on updating template Closes #19223
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 8bb526f9373..20ad2721b67 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1025,9 +1025,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!targets)
break;
- for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
- if (IsCreature(*itr))
- (*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature, nullptr, e.action.updateTemplate.updateLevel != 0);
+ for (WorldObject* target : *targets)
+ if (IsCreature(target))
+ target->ToCreature()->UpdateEntry(e.action.updateTemplate.creature, target->ToCreature()->GetCreatureData(), e.action.updateTemplate.updateLevel != 0);
delete targets;
break;