Core/SmartAI: add SMART_ACTION_SET_HEALTH_REGEN (102).

This commit is contained in:
Kandera
2012-09-17 13:56:12 -04:00
parent 64115461fa
commit 2e5e8331f3
4 changed files with 15 additions and 1 deletions

View File

@@ -1965,6 +1965,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
}
case SMART_ACTION_SET_HEALTH_REGEN:
{
if (!me || me->GetTypeId() != TYPEID_UNIT)
break;
me->setRegeneratingHealth(e.action.setHealthRegen.regenHealth ? true : false);
}
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;