Core/SmartScripts: added new action SMART_ACTION_COMBAT_STOP

* this avoid using hacks like evade, faction change or rooting. I wonder how SAI could be without this

(cherry picked from commit d68df33c76)
This commit is contained in:
MitchesD
2015-07-24 22:54:15 +02:00
parent 8a9f1b871a
commit c40d3be6dc
3 changed files with 11 additions and 1 deletions

View File

@@ -765,6 +765,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
player->GroupEventHappens(e.action.quest.quest, GetBaseObject());
break;
}
case SMART_ACTION_COMBAT_STOP:
{
if (!me)
break;
me->CombatStop(true);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_COMBAT_STOP: %s CombatStop", me->GetGUID().ToString().c_str());
break;
}
case SMART_ACTION_REMOVEAURASFROMSPELL:
{
ObjectList* targets = GetTargets(e, unit);