mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 11:34:07 -04:00
Core/SAI: Implemented SMART_ACTION_INTERRUPT_SPELL action.
Signed-off-by: Manuel Carrasco <manue.l@live.com.ar>
This commit is contained in:
@@ -1245,6 +1245,20 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
(*itr)->ToUnit()->RemoveByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.delunitByte.byte1);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_INTERRUPT_SPELL:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets)
|
||||
return;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->InterruptNonMeleeSpells(e.action.interruptSpellCasting.withDelayed,e.action.interruptSpellCasting.spell_id,e.action.interruptSpellCasting.withInstant);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user