Core/Entities: spawned movementtype should override template movementtype
Core/SmartAI: pass the CreatureData pointer (if any) on updating template (cherrypicked from ff43a74822630c11851abae4cba35a6542e0c86a) Closes #19223
This commit is contained in:
@@ -1183,9 +1183,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;
|
||||
|
||||
Reference in New Issue
Block a user