mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-26 08:29:21 -04:00
Core/SAI: Add the ability to set UNIT_FIELD_BYTES_1 in SAI (action 90)
This commit is contained in:
@@ -1227,6 +1227,15 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_UNIT_FIELD_BYTES_1:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, 3, e.action.unitByte.byte);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user