Core/SmartAI: Implement SMART_ACTION_SET_ROOT (103)

This commit is contained in:
Vincent_Michael
2013-02-02 18:18:27 +01:00
parent 73d2f315af
commit 9d7d68395c
4 changed files with 40 additions and 10 deletions

View File

@@ -1996,6 +1996,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
me->setRegeneratingHealth(e.action.setHealthRegen.regenHealth ? true : false);
break;
}
case SMART_ACTION_SET_ROOT:
{
if (me)
me->SetControlled(e.action.setRoot.root ? true : false, UNIT_STATE_ROOT);
break;
}
default:
sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
break;