Core/SmartAI: add param2 to SMART_ACTION_UPDATE_TEMPLATE, allowing to specify if creature's level should remain the same between entry updates.

A value of 0 (default) forces the creature to keep its current level between entry updates.

Fixes #16371

(cherry picked from commit a6ef9d4539)
This commit is contained in:
SnapperRy
2016-08-23 23:46:24 +02:00
committed by joschiwald
parent 6a8ca9b0bf
commit 6ea973adec
4 changed files with 6 additions and 4 deletions
@@ -1035,7 +1035,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
if (IsCreature(*itr))
(*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature);
(*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature, nullptr, e.action.updateTemplate.updateLevel);
delete targets;
break;