Core/Entities: spawned movementtype should override template movementtype

Core/SmartAI: pass the CreatureData pointer (if any) on updating template

Closes #19223
This commit is contained in:
ariel- authored and Aokromes committed 2017-03-03 01:30:25 +01:00
1 parent 3ceeffde86
commit 7544544cf1
2 files changed
+4 -4

No files matched your search

@@ -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;